From ad0efc2d16a84c674307ad2df9d44153b44a9cf8 Mon Sep 17 00:00:00 2001
From: Johannes Ranke <jranke@uni-bremen.de>
Date: Thu, 20 Apr 2023 19:51:37 +0200
Subject: Small changes to the multistart vignette

- Fix legend positions and y axis scaling
- Include two more variants in the model comparison at the end,
and fix the logic of the discussion
---
 vignettes/web_only/multistart.rmd | 27 +++++++++++----------------
 1 file changed, 11 insertions(+), 16 deletions(-)

(limited to 'vignettes/web_only/multistart.rmd')

diff --git a/vignettes/web_only/multistart.rmd b/vignettes/web_only/multistart.rmd
index 27a8a96a..2a9b3599 100644
--- a/vignettes/web_only/multistart.rmd
+++ b/vignettes/web_only/multistart.rmd
@@ -1,7 +1,7 @@
 ---
 title: Short demo of the multistart method
 author: Johannes Ranke
-date: Last change 26 September 2022 (rebuilt `r Sys.Date()`)
+date: Last change 20 April 2023 (rebuilt `r Sys.Date()`)
 output:
   html_document
 vignette: >
@@ -38,9 +38,9 @@ function tells us that the confidence interval for the standard deviation
 of 'log_k2' includes zero. We check this assessment using multiple runs
 with different starting values.
 
-```{r}
+```{r, warnings = FALSE}
 f_saem_full_multi <- multistart(f_saem_full, n = 16, cores = 16)
-parplot(f_saem_full_multi)
+parplot(f_saem_full_multi, lpos = "topleft")
 ```
 
 This confirms that the variance of k2 is the most problematic parameter, so we
@@ -51,7 +51,7 @@ for k2.
 f_saem_reduced <- update(f_saem_full, no_random_effect = "log_k2")
 illparms(f_saem_reduced)
 f_saem_reduced_multi <- multistart(f_saem_reduced, n = 16, cores = 16)
-parplot(f_saem_reduced_multi, lpos = "topright")
+parplot(f_saem_reduced_multi, lpos = "topright", ylim = c(0.5, 2))
 ```
 
 The results confirm that all remaining parameters can be determined with sufficient
@@ -63,20 +63,15 @@ We can also analyse the log-likelihoods obtained in the multiple runs:
 llhist(f_saem_reduced_multi)
 ```
 
-The parameter histograms can be further improved by excluding the result with
-the low likelihood.
-
-```{r}
-parplot(f_saem_reduced_multi, lpos = "topright", llmin = -326, ylim = c(0.5, 2))
-```
-
-We can use the `anova` method to compare the models, including a likelihood ratio
-test if the models are nested.
+We can use the `anova` method to compare the models.
 
 ```{r}
-anova(f_saem_full, best(f_saem_reduced_multi), test = TRUE)
+anova(f_saem_full, best(f_saem_full_multi),
+  f_saem_reduced, best(f_saem_reduced_multi))
 ```
 
-While AIC and BIC are lower for the reduced model, the likelihood ratio test
-does not indicate a significant difference between the fits.
+The reduced model gives the lowest information criteria and similar
+likelihoods as the best variant of the full model. The multistart method
+leads to a much lower improvement of the likelihood for the reduced model,
+indicating that it converges faster.
 
-- 
cgit v1.2.1

