From 59566e315c5d05a0aa4a46ab80c5fda33c5c2f1e Mon Sep 17 00:00:00 2001 From: Johannes Ranke Date: Sat, 29 Oct 2022 00:36:22 +0200 Subject: Update multistart docs --- docs/dev/articles/web_only/multistart.html | 10 +- .../figure-html/unnamed-chunk-3-1.png | Bin 59606 -> 59586 bytes .../figure-html/unnamed-chunk-4-1.png | Bin 55167 -> 55154 bytes .../figure-html/unnamed-chunk-5-1.png | Bin 21474 -> 21455 bytes .../figure-html/unnamed-chunk-6-1.png | Bin 54481 -> 54302 bytes docs/dev/news/index.html | 4 +- docs/dev/pkgdown.yml | 2 +- docs/dev/reference/Rplot001.png | Bin 19755 -> 20021 bytes docs/dev/reference/Rplot002.png | Bin 17365 -> 17243 bytes docs/dev/reference/index.html | 8 +- docs/dev/reference/logLik.saem.mmkin.html | 2 +- docs/dev/reference/multistart-1.png | Bin 59284 -> 60852 bytes docs/dev/reference/multistart-2.png | Bin 54871 -> 54922 bytes docs/dev/reference/multistart.html | 9 +- docs/dev/reference/parplot.html | 172 +++++++++++++++++++++ docs/dev/reference/status.html | 171 ++++++++++++++++++++ docs/dev/reference/summary.mmkin.html | 17 +- docs/dev/sitemap.xml | 6 + 18 files changed, 376 insertions(+), 25 deletions(-) create mode 100644 docs/dev/reference/parplot.html create mode 100644 docs/dev/reference/status.html (limited to 'docs') diff --git a/docs/dev/articles/web_only/multistart.html b/docs/dev/articles/web_only/multistart.html index 275fc520..0c08905a 100644 --- a/docs/dev/articles/web_only/multistart.html +++ b/docs/dev/articles/web_only/multistart.html @@ -109,7 +109,7 @@

Short demo of the multistart method

Johannes Ranke

-

Last change 26 September 2022 (rebuilt 2022-10-26)

+

Last change 26 September 2022 (rebuilt 2022-10-28)

Source: vignettes/web_only/multistart.rmd @@ -139,7 +139,7 @@

We see that not all variability parameters are identifiable. The illparms 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.

 f_saem_full_multi <- multistart(f_saem_full, n = 16, cores = 16)
-parhist(f_saem_full_multi)
+parplot(f_saem_full_multi)

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.

@@ -148,7 +148,7 @@
 
## character(0)
 f_saem_reduced_multi <- multistart(f_saem_reduced, n = 16, cores = 16)
-parhist(f_saem_reduced_multi, lpos = "topright")
+parplot(f_saem_reduced_multi, lpos = "topright")

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:

@@ -157,7 +157,7 @@

The parameter histograms can be further improved by excluding the result with the low likelihood.

-parhist(f_saem_reduced_multi, lpos = "topright", llmin = -326, ylim = c(0.5, 2))
+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.

@@ -165,7 +165,7 @@
 
## 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.81 661.93 -322.90                    
+## best(f_saem_reduced_multi)    9 663.64 661.77 -322.82                    
 ## f_saem_full                  10 668.27 666.19 -324.13     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.

diff --git a/docs/dev/articles/web_only/multistart_files/figure-html/unnamed-chunk-3-1.png b/docs/dev/articles/web_only/multistart_files/figure-html/unnamed-chunk-3-1.png index e3baa59b..79543765 100644 Binary files a/docs/dev/articles/web_only/multistart_files/figure-html/unnamed-chunk-3-1.png and b/docs/dev/articles/web_only/multistart_files/figure-html/unnamed-chunk-3-1.png differ diff --git a/docs/dev/articles/web_only/multistart_files/figure-html/unnamed-chunk-4-1.png b/docs/dev/articles/web_only/multistart_files/figure-html/unnamed-chunk-4-1.png index d32e1214..4466d437 100644 Binary files a/docs/dev/articles/web_only/multistart_files/figure-html/unnamed-chunk-4-1.png and b/docs/dev/articles/web_only/multistart_files/figure-html/unnamed-chunk-4-1.png differ diff --git a/docs/dev/articles/web_only/multistart_files/figure-html/unnamed-chunk-5-1.png b/docs/dev/articles/web_only/multistart_files/figure-html/unnamed-chunk-5-1.png index d72722f0..3dd36f91 100644 Binary files a/docs/dev/articles/web_only/multistart_files/figure-html/unnamed-chunk-5-1.png and b/docs/dev/articles/web_only/multistart_files/figure-html/unnamed-chunk-5-1.png differ diff --git a/docs/dev/articles/web_only/multistart_files/figure-html/unnamed-chunk-6-1.png b/docs/dev/articles/web_only/multistart_files/figure-html/unnamed-chunk-6-1.png index f9b5aff2..3963e993 100644 Binary files a/docs/dev/articles/web_only/multistart_files/figure-html/unnamed-chunk-6-1.png and b/docs/dev/articles/web_only/multistart_files/figure-html/unnamed-chunk-6-1.png differ diff --git a/docs/dev/news/index.html b/docs/dev/news/index.html index 029b6999..b509aca3 100644 --- a/docs/dev/news/index.html +++ b/docs/dev/news/index.html @@ -86,11 +86,11 @@
-
diff --git a/docs/dev/pkgdown.yml b/docs/dev/pkgdown.yml index 2bb496a8..12a9b003 100644 --- a/docs/dev/pkgdown.yml +++ b/docs/dev/pkgdown.yml @@ -12,7 +12,7 @@ articles: compiled_models: web_only/compiled_models.html dimethenamid_2018: web_only/dimethenamid_2018.html multistart: web_only/multistart.html -last_built: 2022-10-26T08:33Z +last_built: 2022-10-28T21:37Z urls: reference: https://pkgdown.jrwb.de/mkin/reference article: https://pkgdown.jrwb.de/mkin/articles diff --git a/docs/dev/reference/Rplot001.png b/docs/dev/reference/Rplot001.png index f7b4238e..6841f086 100644 Binary files a/docs/dev/reference/Rplot001.png and b/docs/dev/reference/Rplot001.png differ diff --git a/docs/dev/reference/Rplot002.png b/docs/dev/reference/Rplot002.png index 018559d0..11f6a1cd 100644 Binary files a/docs/dev/reference/Rplot002.png and b/docs/dev/reference/Rplot002.png differ diff --git a/docs/dev/reference/index.html b/docs/dev/reference/index.html index 3d9d40b7..0fac6842 100644 --- a/docs/dev/reference/index.html +++ b/docs/dev/reference/index.html @@ -114,9 +114,9 @@ degradation models and one or more error models

Extract model parameters

-

convergence() print(<convergence.mmkin>)

+

status() print(<status.mmkin>) print(<status.mhmkin>)

-

Method to get convergence information

+

Method to get status information for fit array objects

illparms() print(<illparms.mmkin>) print(<illparms.mhmkin>)

@@ -253,9 +253,9 @@ degradation models and one or more error models

Plot the distribution of log likelihoods from multistart objects

-

parhist()

+

parplot()

-

Plot parameter distributions from multistart objects

+

Plot parameter variability of multistart objects

Datasets and known results

diff --git a/docs/dev/reference/logLik.saem.mmkin.html b/docs/dev/reference/logLik.saem.mmkin.html index 9694232c..99b3b906 100644 --- a/docs/dev/reference/logLik.saem.mmkin.html +++ b/docs/dev/reference/logLik.saem.mmkin.html @@ -91,7 +91,7 @@
# S3 method for saem.mmkin
-logLik(object, ..., method = c("lin", "is", "gq"))
+logLik(object, ..., method = c("is", "lin", "gq"))
diff --git a/docs/dev/reference/multistart-1.png b/docs/dev/reference/multistart-1.png index 25362568..7fc24a04 100644 Binary files a/docs/dev/reference/multistart-1.png and b/docs/dev/reference/multistart-1.png differ diff --git a/docs/dev/reference/multistart-2.png b/docs/dev/reference/multistart-2.png index cf8c097e..7553a51a 100644 Binary files a/docs/dev/reference/multistart-2.png and b/docs/dev/reference/multistart-2.png differ diff --git a/docs/dev/reference/multistart.html b/docs/dev/reference/multistart.html index c874bf50..176d40c0 100644 --- a/docs/dev/reference/multistart.html +++ b/docs/dev/reference/multistart.html @@ -175,7 +175,7 @@ doi: 10.1186/s12859-021-04373-4.

See also

- +
@@ -195,7 +195,7 @@ doi: 10.1186/s12859-021-04373-4.

f_mmkin <- mmkin("DFOP", dmta_ds, error_model = "tc", cores = 7, quiet = TRUE) f_saem_full <- saem(f_mmkin) f_saem_full_multi <- multistart(f_saem_full, n = 16, cores = 16) -parhist(f_saem_full_multi, lpos = "bottomleft") +parplot(f_saem_full_multi, lpos = "topleft") illparms(f_saem_full) #> [1] "sd(log_k2)" @@ -208,11 +208,10 @@ doi: 10.1186/s12859-021-04373-4.

# nodes, as it is referred to when updating the saem object on the nodes. library(parallel) cl <- makePSOCKcluster(12) -clusterExport(cl, "f_mmkin") -#> Error in get(name, envir = envir): object 'f_mmkin' not found f_saem_reduced_multi <- multistart(f_saem_reduced, n = 16, cluster = cl) -parhist(f_saem_reduced_multi, lpos = "topright") +parplot(f_saem_reduced_multi, lpos = "topright") +stopCluster(cl) # }
diff --git a/docs/dev/reference/parplot.html b/docs/dev/reference/parplot.html new file mode 100644 index 00000000..38a93e27 --- /dev/null +++ b/docs/dev/reference/parplot.html @@ -0,0 +1,172 @@ + +Plot parameter variability of multistart objects — parplot • mkin + + +
+
+ + + +
+
+ + +
+

Produces a boxplot with all parameters from the multiple runs, scaled +either by the parameters of the run with the highest likelihood, +or by their medians as proposed in the paper by Duchesne et al. (2021).

+
+ +
+
parplot(object, ...)
+
+# S3 method for multistart.saem.mmkin
+parplot(
+  object,
+  llmin = -Inf,
+  scale = c("best", "median"),
+  lpos = "bottomleft",
+  main = "",
+  ...
+)
+
+ +
+

Arguments

+
object
+

The multistart object

+ + +
...
+

Passed to boxplot

+ + +
llmin
+

The minimum likelihood of objects to be shown

+ + +
scale
+

By default, scale parameters using the best available fit. +If 'median', parameters are scaled using the median parameters from all fits.

+ + +
lpos
+

Positioning of the legend.

+ + +
main
+

Title of the plot

+ +
+
+

References

+

Duchesne R, Guillemin A, Gandrillon O, Crauste F. Practical +identifiability in the frame of nonlinear mixed effects models: the example +of the in vitro erythropoiesis. BMC Bioinformatics. 2021 Oct 4;22(1):478. +doi: 10.1186/s12859-021-04373-4.

+
+
+

See also

+ +
+ +
+ +
+ + +
+ +
+

Site built with pkgdown 2.0.6.

+
+ +
+ + + + + + + + diff --git a/docs/dev/reference/status.html b/docs/dev/reference/status.html new file mode 100644 index 00000000..778446b3 --- /dev/null +++ b/docs/dev/reference/status.html @@ -0,0 +1,171 @@ + +Method to get status information for fit array objects — status • mkin + + +
+
+ + + +
+
+ + +
+

Method to get status information for fit array objects

+
+ +
+
status(object, ...)
+
+# S3 method for mmkin
+status(object, ...)
+
+# S3 method for status.mmkin
+print(x, ...)
+
+# S3 method for mhmkin
+status(object, ...)
+
+# S3 method for status.mhmkin
+print(x, ...)
+
+ +
+

Arguments

+
object
+

The object to investigate

+ + +
...
+

For potential future extensions

+ + +
x
+

The object to be printed

+ +
+
+

Value

+ + +

An object with the same dimensions as the fit array +suitable printing method.

+
+ +
+

Examples

+
# \dontrun{
+fits <- mmkin(
+  c("SFO", "FOMC"),
+  list("FOCUS A" = FOCUS_2006_A,
+       "FOCUS B" = FOCUS_2006_C),
+  quiet = TRUE)
+status(fits)
+#>       dataset
+#> model  FOCUS A FOCUS B
+#>   SFO  OK      OK     
+#>   FOMC OK      OK     
+#> 
+#> OK: No warnings
+# }
+
+
+
+ +
+ + +
+ +
+

Site built with pkgdown 2.0.6.

+
+ +
+ + + + + + + + diff --git a/docs/dev/reference/summary.mmkin.html b/docs/dev/reference/summary.mmkin.html index e440e4a9..145e3ba1 100644 --- a/docs/dev/reference/summary.mmkin.html +++ b/docs/dev/reference/summary.mmkin.html @@ -1,5 +1,5 @@ -Summary method for class "mmkin" — summary.mmkin • mkinSummary method for class "mmkin" — summary.mmkin • mkin