From 004fce2520d6889d82226e21bc443426e81d93f2 Mon Sep 17 00:00:00 2001 From: Johannes Ranke Date: Mon, 17 Apr 2023 19:39:09 +0200 Subject: Improve docs of multistart method --- docs/dev/articles/web_only/multistart.html | 60 +++++++++++------------------- 1 file changed, 22 insertions(+), 38 deletions(-) (limited to 'docs/dev/articles/web_only/multistart.html') diff --git a/docs/dev/articles/web_only/multistart.html b/docs/dev/articles/web_only/multistart.html index d3d9d76d..b5635df2 100644 --- a/docs/dev/articles/web_only/multistart.html +++ b/docs/dev/articles/web_only/multistart.html @@ -127,15 +127,13 @@ -
+

-

This confirms that the variance of k2 is the most problematic -parameter, so we reduce the parameter distribution model by removing the -intersoil variability for k2.

+

This confirms that the variance of k2 is the most problematic parameter, so we reduce the parameter distribution model by removing the intersoil variability 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")
+f_saem_reduced_multi <- multistart(f_saem_reduced, n = 16, cores = 8) +parplot(f_saem_reduced_multi, lpos = "topright", ylim = c(0.5, 2))

-

The results confirm that all remaining parameters can be determined -with sufficient certainty.

-

We can also analyse the log-likelihoods obtained in the multiple -runs:

+

The results confirm that all remaining parameters can be determined with sufficient certainty.

+

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.

+

We can use the anova method to compare the models.

-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.

-
-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), test = TRUE)
## Data: 155 observations of 1 variable(s) grouped in 6 datasets
 ## 
-##                            npar    AIC    BIC     Lik Chisq Df Pr(>Chisq)
-## best(f_saem_reduced_multi)    9 663.69 661.82 -322.85                    
-## f_saem_full                  10 669.77 667.69 -324.89     0  1          1
-

While AIC and BIC are lower for the reduced model, the likelihood -ratio test does not indicate a significant difference between the -fits.

+## npar AIC BIC Lik Chisq Df Pr(>Chisq) +## f_saem_reduced 9 663.74 661.87 -322.87 +## best(f_saem_reduced_multi) 9 663.60 661.72 -322.80 0.1476 0 +## f_saem_full 10 670.35 668.26 -325.17 0.0000 1 1 +## best(f_saem_full_multi) 10 665.61 663.53 -322.80 4.7372 0 +

The reduced model results in lower AIC and BIC values, so it is clearly preferable. Using multiple starting values gives a large improvement in case of the full model, because it is less well-defined, which impedes convergence. For the reduced model, using multiple starting values only results in a small improvement of the model fit.