From 2a521ab0a4b7d981a2042353e2c60b8a877489b8 Mon Sep 17 00:00:00 2001 From: Johannes Ranke Date: Fri, 16 Sep 2022 10:51:48 +0200 Subject: Improve docs and update pkgdown --- docs/dev/articles/FOCUS_L.html | 36 +-- docs/dev/articles/web_only/benchmarks.html | 22 +- docs/dev/articles/web_only/dimethenamid_2018.html | 34 +- docs/dev/news/index.html | 3 +- docs/dev/pkgdown.yml | 2 +- docs/dev/reference/aw.html | 202 +++++------- docs/dev/reference/dimethenamid_2018.html | 6 +- docs/dev/reference/index.html | 22 +- docs/dev/reference/mkinfit.html | 17 +- docs/dev/reference/multistart.html | 195 ++++++++++++ docs/dev/reference/parms.html | 366 ++++++++++------------ docs/dev/reference/saem.html | 18 +- docs/dev/reference/summary.mkinfit.html | 6 +- docs/dev/reference/summary.mmkin.html | 2 +- docs/dev/reference/summary.saem.mmkin.html | 6 +- docs/dev/sitemap.xml | 3 + 16 files changed, 526 insertions(+), 414 deletions(-) create mode 100644 docs/dev/reference/multistart.html (limited to 'docs') diff --git a/docs/dev/articles/FOCUS_L.html b/docs/dev/articles/FOCUS_L.html index 610d1bdd..43ed0f69 100644 --- a/docs/dev/articles/FOCUS_L.html +++ b/docs/dev/articles/FOCUS_L.html @@ -106,7 +106,7 @@

Example evaluation of FOCUS Laboratory Data L1 to L3

Johannes Ranke

-

Last change 18 May 2022 (rebuilt 2022-08-10)

+

Last change 18 May 2022 (rebuilt 2022-09-16)

Source: vignettes/FOCUS_L.rmd @@ -134,15 +134,15 @@ summary(m.L1.SFO)
## mkin version used for fitting:    1.1.2 
 ## R version used for fitting:       4.2.1 
-## Date of fit:     Wed Aug 10 15:28:18 2022 
-## Date of summary: Wed Aug 10 15:28:18 2022 
+## Date of fit:     Fri Sep 16 10:31:35 2022 
+## Date of summary: Fri Sep 16 10:31:35 2022 
 ## 
 ## Equations:
 ## d_parent/dt = - k_parent * parent
 ## 
 ## Model predictions using solution type analytical 
 ## 
-## Fitted using 133 model solutions performed in 0.031 s
+## Fitted using 133 model solutions performed in 0.032 s
 ## 
 ## Error model: Constant variance 
 ## 
@@ -240,15 +240,15 @@
 ## doubtful
## mkin version used for fitting:    1.1.2 
 ## R version used for fitting:       4.2.1 
-## Date of fit:     Wed Aug 10 15:28:18 2022 
-## Date of summary: Wed Aug 10 15:28:18 2022 
+## Date of fit:     Fri Sep 16 10:31:36 2022 
+## Date of summary: Fri Sep 16 10:31:36 2022 
 ## 
 ## Equations:
 ## d_parent/dt = - (alpha/beta) * 1/((time/beta) + 1) * parent
 ## 
 ## Model predictions using solution type analytical 
 ## 
-## Fitted using 369 model solutions performed in 0.082 s
+## Fitted using 369 model solutions performed in 0.081 s
 ## 
 ## Error model: Constant variance 
 ## 
@@ -352,15 +352,15 @@
 summary(m.L2.FOMC, data = FALSE)
## mkin version used for fitting:    1.1.2 
 ## R version used for fitting:       4.2.1 
-## Date of fit:     Wed Aug 10 15:28:19 2022 
-## Date of summary: Wed Aug 10 15:28:19 2022 
+## Date of fit:     Fri Sep 16 10:31:36 2022 
+## Date of summary: Fri Sep 16 10:31:36 2022 
 ## 
 ## Equations:
 ## d_parent/dt = - (alpha/beta) * 1/((time/beta) + 1) * parent
 ## 
 ## Model predictions using solution type analytical 
 ## 
-## Fitted using 239 model solutions performed in 0.048 s
+## Fitted using 239 model solutions performed in 0.049 s
 ## 
 ## Error model: Constant variance 
 ## 
@@ -433,8 +433,8 @@
 summary(m.L2.DFOP, data = FALSE)
## mkin version used for fitting:    1.1.2 
 ## R version used for fitting:       4.2.1 
-## Date of fit:     Wed Aug 10 15:28:19 2022 
-## Date of summary: Wed Aug 10 15:28:19 2022 
+## Date of fit:     Fri Sep 16 10:31:37 2022 
+## Date of summary: Fri Sep 16 10:31:37 2022 
 ## 
 ## Equations:
 ## d_parent/dt = - ((k1 * g * exp(-k1 * time) + k2 * (1 - g) * exp(-k2 *
@@ -539,8 +539,8 @@
 summary(mm.L3[["DFOP", 1]])
## mkin version used for fitting:    1.1.2 
 ## R version used for fitting:       4.2.1 
-## Date of fit:     Wed Aug 10 15:28:20 2022 
-## Date of summary: Wed Aug 10 15:28:20 2022 
+## Date of fit:     Fri Sep 16 10:31:37 2022 
+## Date of summary: Fri Sep 16 10:31:38 2022 
 ## 
 ## Equations:
 ## d_parent/dt = - ((k1 * g * exp(-k1 * time) + k2 * (1 - g) * exp(-k2 *
@@ -652,8 +652,8 @@
 summary(mm.L4[["SFO", 1]], data = FALSE)
## mkin version used for fitting:    1.1.2 
 ## R version used for fitting:       4.2.1 
-## Date of fit:     Wed Aug 10 15:28:21 2022 
-## Date of summary: Wed Aug 10 15:28:21 2022 
+## Date of fit:     Fri Sep 16 10:31:38 2022 
+## Date of summary: Fri Sep 16 10:31:38 2022 
 ## 
 ## Equations:
 ## d_parent/dt = - k_parent * parent
@@ -717,8 +717,8 @@
 summary(mm.L4[["FOMC", 1]], data = FALSE)
## mkin version used for fitting:    1.1.2 
 ## R version used for fitting:       4.2.1 
-## Date of fit:     Wed Aug 10 15:28:21 2022 
-## Date of summary: Wed Aug 10 15:28:21 2022 
+## Date of fit:     Fri Sep 16 10:31:38 2022 
+## Date of summary: Fri Sep 16 10:31:38 2022 
 ## 
 ## Equations:
 ## d_parent/dt = - (alpha/beta) * 1/((time/beta) + 1) * parent
diff --git a/docs/dev/articles/web_only/benchmarks.html b/docs/dev/articles/web_only/benchmarks.html
index 3dbf2881..e5bc5a21 100644
--- a/docs/dev/articles/web_only/benchmarks.html
+++ b/docs/dev/articles/web_only/benchmarks.html
@@ -106,7 +106,7 @@
       

Benchmark timings for mkin

Johannes Ranke

-

Last change 14 July 2022 (rebuilt 2022-08-10)

+

Last change 14 July 2022 (rebuilt 2022-09-16)

Source: vignettes/web_only/benchmarks.rmd @@ -337,8 +337,8 @@ Ryzen 7 1700 4.2.1 1.1.2 -1.940 -3.619 +1.957 +3.633 @@ -507,9 +507,9 @@ Ryzen 7 1700 4.2.1 1.1.2 -1.490 -6.035 -2.799 +1.503 +6.147 +2.803 @@ -729,12 +729,12 @@ Ryzen 7 1700 4.2.1 1.1.2 -0.857 +0.861 1.295 -1.483 -2.989 -1.919 -2.766 +1.507 +3.102 +1.961 +2.852 diff --git a/docs/dev/articles/web_only/dimethenamid_2018.html b/docs/dev/articles/web_only/dimethenamid_2018.html index 81b15cb9..60f1ab5a 100644 --- a/docs/dev/articles/web_only/dimethenamid_2018.html +++ b/docs/dev/articles/web_only/dimethenamid_2018.html @@ -106,7 +106,7 @@

Example evaluations of the dimethenamid data from 2018

Johannes Ranke

-

Last change 1 July 2022, built on 10 Aug 2022

+

Last change 1 July 2022, built on 16 Sep 2022

Source: vignettes/web_only/dimethenamid_2018.rmd @@ -457,24 +457,24 @@ attached base packages: [1] stats graphics grDevices utils datasets methods base other attached packages: -[1] saemix_3.1 npde_3.2 nlme_3.1-158 mkin_1.1.2 knitr_1.39 +[1] nlme_3.1-158 mkin_1.1.2 knitr_1.39 loaded via a namespace (and not attached): - [1] deSolve_1.33 zoo_1.8-10 tidyselect_1.1.2 xfun_0.31 - [5] bslib_0.4.0 purrr_0.3.4 lattice_0.20-45 colorspace_2.0-3 - [9] vctrs_0.4.1 generics_0.1.3 htmltools_0.5.3 yaml_2.3.5 -[13] utf8_1.2.2 rlang_1.0.4 pkgdown_2.0.6 jquerylib_0.1.4 -[17] pillar_1.8.0 glue_1.6.2 DBI_1.1.3 lifecycle_1.0.1 -[21] stringr_1.4.0 munsell_0.5.0 gtable_0.3.0 ragg_1.2.2 -[25] codetools_0.2-18 memoise_2.0.1 evaluate_0.15 fastmap_1.1.0 -[29] lmtest_0.9-40 parallel_4.2.1 fansi_1.0.3 highr_0.9 -[33] scales_1.2.0 cachem_1.0.6 desc_1.4.1 jsonlite_1.8.0 -[37] systemfonts_1.0.4 fs_1.5.2 textshaping_0.3.6 gridExtra_2.3 -[41] ggplot2_3.3.6 digest_0.6.29 stringi_1.7.8 dplyr_1.0.9 -[45] grid_4.2.1 rprojroot_2.0.3 cli_3.3.0 tools_4.2.1 -[49] magrittr_2.0.3 sass_0.4.2 tibble_3.1.8 pkgconfig_2.0.3 -[53] assertthat_0.2.1 rmarkdown_2.14.3 R6_2.5.1 mclust_5.4.10 -[57] compiler_4.2.1
+ [1] deSolve_1.33 zoo_1.8-10 tidyselect_1.1.2 xfun_0.31 + [5] bslib_0.4.0 purrr_0.3.4 lattice_0.20-45 colorspace_2.0-3 + [9] vctrs_0.4.1 generics_0.1.3 htmltools_0.5.3 yaml_2.3.5 +[13] utf8_1.2.2 rlang_1.0.4 pkgdown_2.0.6 saemix_3.1 +[17] jquerylib_0.1.4 pillar_1.8.0 glue_1.6.2 DBI_1.1.3 +[21] lifecycle_1.0.1 stringr_1.4.0 munsell_0.5.0 gtable_0.3.0 +[25] ragg_1.2.2 memoise_2.0.1 evaluate_0.15 npde_3.2 +[29] fastmap_1.1.0 lmtest_0.9-40 parallel_4.2.1 fansi_1.0.3 +[33] highr_0.9 KernSmooth_2.23-20 scales_1.2.0 cachem_1.0.6 +[37] desc_1.4.1 jsonlite_1.8.0 systemfonts_1.0.4 fs_1.5.2 +[41] textshaping_0.3.6 gridExtra_2.3 ggplot2_3.3.6 digest_0.6.29 +[45] stringi_1.7.8 dplyr_1.0.9 grid_4.2.1 rprojroot_2.0.3 +[49] cli_3.3.0 tools_4.2.1 magrittr_2.0.3 sass_0.4.2 +[53] tibble_3.1.8 pkgconfig_2.0.3 assertthat_0.2.1 rmarkdown_2.14.3 +[57] mclust_5.4.10 R6_2.5.1 compiler_4.2.1

References diff --git a/docs/dev/news/index.html b/docs/dev/news/index.html index b501ed55..c8863ec6 100644 --- a/docs/dev/news/index.html +++ b/docs/dev/news/index.html @@ -83,7 +83,8 @@
-
  • ‘R/mhmkin.R’: New method for performing multiple hierarchical mkin fits in one function call, optionally in parallel.

  • +
    • ‘R/multistart.R’: New method for testing multiple start parameters for hierarchical model fits, with diagnostic plotting functions ‘llhist’ and ‘parhist’.

    • +
    • ‘R/mhmkin.R’: New method for performing multiple hierarchical mkin fits in one function call, optionally in parallel.

    • ‘R/saem.R’: Implement and test saemix transformations for FOMC and HS. Also, error out if saemix transformations are requested but not supported.

    • ‘R/saem.R’: ‘logLik’ and ‘update’ methods for ‘saem.mmkin’ objects.

    • ‘R/convergence.R’: New generic to show convergence information with methods for ‘mmkin’ and ‘mhmkin’ objects.

    • diff --git a/docs/dev/pkgdown.yml b/docs/dev/pkgdown.yml index 453b4590..1fee5d96 100644 --- a/docs/dev/pkgdown.yml +++ b/docs/dev/pkgdown.yml @@ -11,7 +11,7 @@ articles: benchmarks: web_only/benchmarks.html compiled_models: web_only/compiled_models.html dimethenamid_2018: web_only/dimethenamid_2018.html -last_built: 2022-08-10T14:05Z +last_built: 2022-09-16T08:50Z urls: reference: https://pkgdown.jrwb.de/mkin/reference article: https://pkgdown.jrwb.de/mkin/articles diff --git a/docs/dev/reference/aw.html b/docs/dev/reference/aw.html index 3b06f2a6..57dfa06c 100644 --- a/docs/dev/reference/aw.html +++ b/docs/dev/reference/aw.html @@ -1,69 +1,14 @@ - - - - - - - -Calculate Akaike weights for model averaging — aw • mkin - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Calculate Akaike weights for model averaging — aw • mkin - - - - - - - - - + + - - - - -
      -
      -

- - -
+
@@ -151,76 +90,85 @@ expected Kullback-Leibler information as specified by Burnham and Anderson (2004).

-
aw(object, ...)
-
-# S3 method for mkinfit
-aw(object, ...)
-
-# S3 method for mmkin
-aw(object, ...)
+
+
aw(object, ...)
+
+# S3 method for mkinfit
+aw(object, ...)
+
+# S3 method for mmkin
+aw(object, ...)
+
+# S3 method for mixed.mmkin
+aw(object, ...)
+
+# S3 method for multistart
+aw(object, ...)
+
-

Arguments

- - - - - - - - - - -
object

An mmkin column object, containing two or more -mkinfit models that have been fitted to the same data, +

+

Arguments

+
object
+

An mmkin column object, containing two or more +mkinfit models that have been fitted to the same data, or an mkinfit object. In the latter case, further mkinfit objects fitted to the same data should be specified -as dots arguments.

...

Not used in the method for mmkin column objects, -further mkinfit objects in the method for mkinfit objects.

+as dots arguments.

+ -

References

+
...
+

Not used in the method for mmkin column objects, +further mkinfit objects in the method for mkinfit objects.

+
+
+

References

Burnham KP and Anderson DR (2004) Multimodel Inference: Understanding AIC and BIC in Model Selection. Sociological Methods & Research 33(2) 261-304

+
-

Examples

-
# \dontrun{ -f_sfo <- mkinfit("SFO", FOCUS_2006_D, quiet = TRUE) -f_dfop <- mkinfit("DFOP", FOCUS_2006_D, quiet = TRUE) -aw_sfo_dfop <- aw(f_sfo, f_dfop) -sum(aw_sfo_dfop) -
#> [1] 1
aw_sfo_dfop # SFO gets more weight as it has less parameters and a similar fit -
#> [1] 0.5970258 0.4029742
f <- mmkin(c("SFO", "FOMC", "DFOP"), list("FOCUS D" = FOCUS_2006_D), cores = 1, quiet = TRUE) -aw(f) -
#> [1] 0.4808722 0.1945539 0.3245740
sum(aw(f)) -
#> [1] 1
aw(f[c("SFO", "DFOP")]) -
#> [1] 0.5970258 0.4029742
# } -
+
+

Examples

+
# \dontrun{
+f_sfo <- mkinfit("SFO", FOCUS_2006_D, quiet = TRUE)
+f_dfop <- mkinfit("DFOP", FOCUS_2006_D, quiet = TRUE)
+aw_sfo_dfop <- aw(f_sfo, f_dfop)
+sum(aw_sfo_dfop)
+#> [1] 1
+aw_sfo_dfop # SFO gets more weight as it has less parameters and a similar fit
+#> [1] 0.5970258 0.4029742
+f <- mmkin(c("SFO", "FOMC", "DFOP"), list("FOCUS D" = FOCUS_2006_D), cores = 1, quiet = TRUE)
+aw(f)
+#> [1] 0.4808722 0.1945539 0.3245740
+sum(aw(f))
+#> [1] 1
+aw(f[c("SFO", "DFOP")])
+#> [1] 0.5970258 0.4029742
+# }
+
+
+ -
- +
- - + + diff --git a/docs/dev/reference/dimethenamid_2018.html b/docs/dev/reference/dimethenamid_2018.html index 7a356284..2454a609 100644 --- a/docs/dev/reference/dimethenamid_2018.html +++ b/docs/dev/reference/dimethenamid_2018.html @@ -203,8 +203,8 @@ specific pieces of information in the comments.

#> saemix version used for fitting: 3.1 #> mkin version used for pre-fitting: 1.1.2 #> R version used for fitting: 4.2.1 -#> Date of fit: Wed Aug 10 15:24:12 2022 -#> Date of summary: Wed Aug 10 15:24:12 2022 +#> Date of fit: Fri Sep 16 10:29:07 2022 +#> Date of summary: Fri Sep 16 10:29:07 2022 #> #> Equations: #> d_DMTA/dt = - k_DMTA * DMTA @@ -217,7 +217,7 @@ specific pieces of information in the comments.

#> #> Model predictions using solution type deSolve #> -#> Fitted in 791.863 s +#> Fitted in 797.539 s #> Using 300, 100 iterations and 9 chains #> #> Variance model: Two-component variance function diff --git a/docs/dev/reference/index.html b/docs/dev/reference/index.html index 98f170b6..3372a69a 100644 --- a/docs/dev/reference/index.html +++ b/docs/dev/reference/index.html @@ -107,6 +107,10 @@ degradation models and one or more error models

Generic functions introduced by the package

+

parms()

+ +

Extract model parameters

+

convergence() print(<convergence.mmkin>)

Method to get convergence information

@@ -119,6 +123,10 @@ degradation models and one or more error models

Function to calculate endpoints for further use from kinetic models fitted with mkinfit

+ +

aw()

+ +

Calculate Akaike weights for model averaging

Show results

Functions working with mkinfit objects

@@ -131,10 +139,6 @@ with mkinfit

summary(<mkinfit>) print(<summary.mkinfit>)

Summary method for class "mkinfit"

- -

parms()

- -

Extract model parameters from mkinfit models

confint(<mkinfit>)

@@ -155,10 +159,6 @@ with mkinfit

mkinerrmin()

Calculate the minimum error to assume in order to pass the variance test

- -

aw()

- -

Calculate Akaike weights for model averaging

CAKE_export()

@@ -193,7 +193,7 @@ of an mmkin object

Create an nlme model for an mmkin row object

-

saem() print(<saem.mmkin>) saemix_model() saemix_data()

+

saem() print(<saem.mmkin>) saemix_model() saemix_data() parms(<saem.mmkin>)

Fit nonlinear mixed models with SAEM

@@ -233,6 +233,10 @@ degradation models and one or more error models

intervals(<saem.mmkin>)

Confidence intervals for parameters in saem.mmkin objects

+ +

multistart() print(<multistart>) parms(<multistart>) parhist() llhist()

+ +

Perform a hierarchical model fit with multiple starting values

Datasets and known results

diff --git a/docs/dev/reference/mkinfit.html b/docs/dev/reference/mkinfit.html index a00a0458..bcc86ded 100644 --- a/docs/dev/reference/mkinfit.html +++ b/docs/dev/reference/mkinfit.html @@ -380,8 +380,8 @@ Degradation Data. Environments 6(12) 124 summary(fit) #> mkin version used for fitting: 1.1.2 #> R version used for fitting: 4.2.1 -#> Date of fit: Wed Aug 10 15:24:16 2022 -#> Date of summary: Wed Aug 10 15:24:16 2022 +#> Date of fit: Fri Sep 16 10:29:10 2022 +#> Date of summary: Fri Sep 16 10:29:10 2022 #> #> Equations: #> d_parent/dt = - (alpha/beta) * 1/((time/beta) + 1) * parent @@ -528,10 +528,11 @@ Degradation Data. Environments 6(12) 124 analytical = mkinfit(SFO_SFO, FOCUS_D, quiet = TRUE, error_model = "tc", solution_type = "analytical")) } +#> Loading required package: rbenchmark #> test relative elapsed -#> 3 analytical 1.000 0.605 -#> 1 deSolve_compiled 1.448 0.876 -#> 2 eigen 2.479 1.500 +#> 3 analytical 1.000 0.577 +#> 1 deSolve_compiled 1.537 0.887 +#> 2 eigen 2.551 1.472 # } # Use stepwise fitting, using optimised parameters from parent only fit, FOMC-SFO @@ -560,8 +561,8 @@ Degradation Data. Environments 6(12) 124 #> Warning: diag(.) had 0 or NA entries; non-finite result is doubtful #> mkin version used for fitting: 1.1.2 #> R version used for fitting: 4.2.1 -#> Date of fit: Wed Aug 10 15:24:27 2022 -#> Date of summary: Wed Aug 10 15:24:27 2022 +#> Date of fit: Fri Sep 16 10:29:21 2022 +#> Date of summary: Fri Sep 16 10:29:21 2022 #> #> Equations: #> d_parent/dt = - (alpha/beta) * 1/((time/beta) + 1) * parent @@ -570,7 +571,7 @@ Degradation Data. Environments 6(12) 124 #> #> Model predictions using solution type deSolve #> -#> Fitted using 3729 model solutions performed in 2.475 s +#> Fitted using 3729 model solutions performed in 2.48 s #> #> Error model: Two-component variance function #> diff --git a/docs/dev/reference/multistart.html b/docs/dev/reference/multistart.html new file mode 100644 index 00000000..9f2d297e --- /dev/null +++ b/docs/dev/reference/multistart.html @@ -0,0 +1,195 @@ + +Perform a hierarchical model fit with multiple starting values — multistart • mkin + + +
+
+ + + +
+
+ + +
+

The purpose of this method is to check if a certain algorithm for fitting +nonlinear hierarchical models (also known as nonlinear mixed-effects models) +will reliably yield results that are sufficiently similar to each other, if +started with a certain range of reasonable starting parameters. It is +inspired by the article on practical identifiabiliy in the frame of nonlinear +mixed-effects models by Duchesne et al (2021).

+
+ +
+
multistart(object, n = 50, cores = 1, ...)
+
+# S3 method for saem.mmkin
+multistart(object, n = 50, cores = 1, ...)
+
+# S3 method for multistart
+print(x, ...)
+
+# S3 method for multistart
+parms(object, ...)
+
+parhist(object, lpos = "topleft", main = "", ...)
+
+llhist(object, breaks = "Sturges", lpos = "topleft", main = "", ...)
+
+ +
+

Arguments

+
object
+

The fit object to work with

+ + +
n
+

How many different combinations of starting parameters should be +used?

+ + +
cores
+

How many fits should be run in parallel?

+ + +
...
+

Passed to the update function, or to the basic plotting +function in the case of the graphical functions.

+ + +
x
+

The multistart object to print

+ + +
lpos
+

Positioning of the legend.

+ + +
main
+

title of the plot

+ + +
breaks
+

Passed to hist

+ +
+
+

Value

+ + +

A list of saem.mmkin objects, with class attributes +'multistart.saem.mmkin' and 'multistart'.

+
+
+

Details

+

Currently, parallel execution of the fits is only supported using +parallel::mclapply, i.e. not available on Windows.

+
+
+

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.

+
+ +
+ +
+ + +
+ +
+

Site built with pkgdown 2.0.6.

+
+ +
+ + + + + + + + diff --git a/docs/dev/reference/parms.html b/docs/dev/reference/parms.html index 9f6f4225..ded4567a 100644 --- a/docs/dev/reference/parms.html +++ b/docs/dev/reference/parms.html @@ -1,69 +1,14 @@ - - - - - - - -Extract model parameters from mkinfit models — parms • mkin - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Extract model parameters — parms • mkin - + + - - - -
-
- -
- -
+
-

This function always returns degradation model parameters as well as error -model parameters, in order to avoid working with a fitted model without -considering the error structure that was assumed for the fit.

+

This function returns degradation model parameters as well as error +model parameters per default, in order to avoid working with a fitted model +without considering the error structure that was assumed for the fit.

+
+ +
+
parms(object, ...)
+
+# S3 method for mkinfit
+parms(object, transformed = FALSE, errparms = TRUE, ...)
+
+# S3 method for mmkin
+parms(object, transformed = FALSE, errparms = TRUE, ...)
-
parms(object, ...)
+    
+

Arguments

+
object
+

A fitted model object.

+ + +
...
+

Not used

-# S3 method for mkinfit -parms(object, transformed = FALSE, ...) -# S3 method for mmkin -parms(object, transformed = FALSE, ...)
+
transformed
+

Should the parameters be returned as used internally +during the optimisation?

-

Arguments

- - - - - - - - - - - - - - -
object

A fitted model object. Methods are implemented for -mkinfit() objects and for mmkin() objects.

...

Not used

transformed

Should the parameters be returned -as used internally during the optimisation?

-

Value

+
errparms
+

Should the error model parameters be returned +in addition to the degradation parameters?

-

For mkinfit objects, a numeric vector of fitted model parameters. -For mmkin row objects, a matrix with the parameters with a -row for each dataset. If the mmkin object has more than one row, a list of -such matrices is returned.

+
+
+

Value

+ -

Examples

-
# mkinfit objects -fit <- mkinfit("SFO", FOCUS_2006_C, quiet = TRUE) -parms(fit) -
#> parent_0 k_parent sigma -#> 82.4921598 0.3060633 4.6730124
parms(fit, transformed = TRUE) -
#> parent_0 log_k_parent sigma -#> 82.492160 -1.183963 4.673012
-# mmkin objects -ds <- lapply(experimental_data_for_UBA_2019[6:10], - function(x) subset(x$data[c("name", "time", "value")])) -names(ds) <- paste("Dataset", 6:10) -# \dontrun{ -fits <- mmkin(c("SFO", "FOMC", "DFOP"), ds, quiet = TRUE, cores = 1) -parms(fits["SFO", ]) -
#> Dataset 6 Dataset 7 Dataset 8 Dataset 9 Dataset 10 -#> parent_0 88.52275400 82.666781678 86.8547308 91.7779306 82.14809450 -#> k_parent 0.05794659 0.009647805 0.2102974 0.1232258 0.00720421 -#> sigma 5.15274487 7.040168584 3.6769645 6.4669234 6.50457673
parms(fits[, 2]) -
#> $SFO -#> Dataset 7 -#> parent_0 82.666781678 -#> k_parent 0.009647805 -#> sigma 7.040168584 -#> -#> $FOMC -#> Dataset 7 -#> parent_0 92.6837649 -#> alpha 0.4967832 -#> beta 14.1451255 -#> sigma 1.9167519 -#> -#> $DFOP -#> Dataset 7 -#> parent_0 91.058971589 -#> k1 0.044946770 -#> k2 0.002868336 -#> g 0.526942415 -#> sigma 2.221302196 -#>
parms(fits) -
#> $SFO -#> Dataset 6 Dataset 7 Dataset 8 Dataset 9 Dataset 10 -#> parent_0 88.52275400 82.666781678 86.8547308 91.7779306 82.14809450 -#> k_parent 0.05794659 0.009647805 0.2102974 0.1232258 0.00720421 -#> sigma 5.15274487 7.040168584 3.6769645 6.4669234 6.50457673 -#> -#> $FOMC -#> Dataset 6 Dataset 7 Dataset 8 Dataset 9 Dataset 10 -#> parent_0 95.558575 92.6837649 90.719787 98.383939 94.8481459 -#> alpha 1.338667 0.4967832 1.639099 1.074460 0.2805272 -#> beta 13.033315 14.1451255 5.007077 4.397126 6.9052224 -#> sigma 1.847671 1.9167519 1.066063 3.146056 1.6222778 -#> -#> $DFOP -#> Dataset 6 Dataset 7 Dataset 8 Dataset 9 Dataset 10 -#> parent_0 96.55213663 91.058971589 90.34509493 98.14858820 94.311323734 -#> k1 0.21954588 0.044946770 0.41232288 0.31697588 0.080663857 -#> k2 0.02957934 0.002868336 0.07581766 0.03260384 0.003425417 -#> g 0.44845068 0.526942415 0.66091967 0.65322767 0.342652880 -#> sigma 1.35690468 2.221302196 1.34169076 2.87159846 1.942067831 -#>
parms(fits, transformed = TRUE) -
#> $SFO -#> Dataset 6 Dataset 7 Dataset 8 Dataset 9 Dataset 10 -#> parent_0 88.522754 82.666782 86.854731 91.777931 82.148094 -#> log_k_parent -2.848234 -4.641025 -1.559232 -2.093737 -4.933090 -#> sigma 5.152745 7.040169 3.676964 6.466923 6.504577 -#> -#> $FOMC -#> Dataset 6 Dataset 7 Dataset 8 Dataset 9 Dataset 10 -#> parent_0 95.5585751 92.6837649 90.7197870 98.38393897 94.848146 -#> log_alpha 0.2916741 -0.6996015 0.4941466 0.07181816 -1.271085 -#> log_beta 2.5675088 2.6493701 1.6108523 1.48095106 1.932278 -#> sigma 1.8476712 1.9167519 1.0660627 3.14605557 1.622278 -#> -#> $DFOP -#> Dataset 6 Dataset 7 Dataset 8 Dataset 9 Dataset 10 -#> parent_0 96.5521366 91.0589716 90.3450949 98.1485882 94.3113237 -#> log_k1 -1.5161940 -3.1022764 -0.8859486 -1.1489296 -2.5174647 -#> log_k2 -3.5206791 -5.8540232 -2.5794240 -3.4233253 -5.6765322 -#> g_qlogis -0.2069326 0.1078741 0.6673953 0.6332573 -0.6514943 -#> sigma 1.3569047 2.2213022 1.3416908 2.8715985 1.9420678 -#>
# } -
+

Depending on the object, a numeric vector of fitted model parameters, +a matrix (e.g. for mmkin row objects), or a list of matrices (e.g. for +mmkin objects with more than one row).

+
+
+

See also

+ +
+ +
+

Examples

+
# mkinfit objects
+fit <- mkinfit("SFO", FOCUS_2006_C, quiet = TRUE)
+parms(fit)
+#>   parent_0   k_parent      sigma 
+#> 82.4921598  0.3060633  4.6730124 
+parms(fit, transformed = TRUE)
+#>     parent_0 log_k_parent        sigma 
+#>    82.492160    -1.183963     4.673012 
+
+# mmkin objects
+ds <- lapply(experimental_data_for_UBA_2019[6:10],
+ function(x) subset(x$data[c("name", "time", "value")]))
+names(ds) <- paste("Dataset", 6:10)
+# \dontrun{
+fits <- mmkin(c("SFO", "FOMC", "DFOP"), ds, quiet = TRUE, cores = 1)
+parms(fits["SFO", ])
+#>            Dataset 6    Dataset 7  Dataset 8  Dataset 9  Dataset 10
+#> parent_0 88.52275400 82.666781678 86.8547308 91.7779306 82.14809450
+#> k_parent  0.05794659  0.009647805  0.2102974  0.1232258  0.00720421
+#> sigma     5.15274487  7.040168584  3.6769645  6.4669234  6.50457673
+parms(fits[, 2])
+#> $SFO
+#>             Dataset 7
+#> parent_0 82.666781678
+#> k_parent  0.009647805
+#> sigma     7.040168584
+#> 
+#> $FOMC
+#>           Dataset 7
+#> parent_0 92.6837649
+#> alpha     0.4967832
+#> beta     14.1451255
+#> sigma     1.9167519
+#> 
+#> $DFOP
+#>             Dataset 7
+#> parent_0 91.058971589
+#> k1        0.044946770
+#> k2        0.002868336
+#> g         0.526942415
+#> sigma     2.221302196
+#> 
+parms(fits)
+#> $SFO
+#>            Dataset 6    Dataset 7  Dataset 8  Dataset 9  Dataset 10
+#> parent_0 88.52275400 82.666781678 86.8547308 91.7779306 82.14809450
+#> k_parent  0.05794659  0.009647805  0.2102974  0.1232258  0.00720421
+#> sigma     5.15274487  7.040168584  3.6769645  6.4669234  6.50457673
+#> 
+#> $FOMC
+#>          Dataset 6  Dataset 7 Dataset 8 Dataset 9 Dataset 10
+#> parent_0 95.558575 92.6837649 90.719787 98.383939 94.8481459
+#> alpha     1.338667  0.4967832  1.639099  1.074460  0.2805272
+#> beta     13.033315 14.1451255  5.007077  4.397126  6.9052224
+#> sigma     1.847671  1.9167519  1.066063  3.146056  1.6222778
+#> 
+#> $DFOP
+#>            Dataset 6    Dataset 7   Dataset 8   Dataset 9   Dataset 10
+#> parent_0 96.55213663 91.058971589 90.34509493 98.14858820 94.311323734
+#> k1        0.21954588  0.044946770  0.41232288  0.31697588  0.080663857
+#> k2        0.02957934  0.002868336  0.07581766  0.03260384  0.003425417
+#> g         0.44845068  0.526942415  0.66091967  0.65322767  0.342652880
+#> sigma     1.35690468  2.221302196  1.34169076  2.87159846  1.942067831
+#> 
+parms(fits, transformed = TRUE)
+#> $SFO
+#>              Dataset 6 Dataset 7 Dataset 8 Dataset 9 Dataset 10
+#> parent_0     88.522754 82.666782 86.854731 91.777931  82.148094
+#> log_k_parent -2.848234 -4.641025 -1.559232 -2.093737  -4.933090
+#> sigma         5.152745  7.040169  3.676964  6.466923   6.504577
+#> 
+#> $FOMC
+#>            Dataset 6  Dataset 7  Dataset 8   Dataset 9 Dataset 10
+#> parent_0  95.5585751 92.6837649 90.7197870 98.38393897  94.848146
+#> log_alpha  0.2916741 -0.6996015  0.4941466  0.07181816  -1.271085
+#> log_beta   2.5675088  2.6493701  1.6108523  1.48095106   1.932278
+#> sigma      1.8476712  1.9167519  1.0660627  3.14605557   1.622278
+#> 
+#> $DFOP
+#>           Dataset 6  Dataset 7  Dataset 8  Dataset 9 Dataset 10
+#> parent_0 96.5521366 91.0589716 90.3450949 98.1485882 94.3113237
+#> log_k1   -1.5161940 -3.1022764 -0.8859486 -1.1489296 -2.5174647
+#> log_k2   -3.5206791 -5.8540232 -2.5794240 -3.4233253 -5.6765322
+#> g_qlogis -0.2069326  0.1078741  0.6673953  0.6332573 -0.6514943
+#> sigma     1.3569047  2.2213022  1.3416908  2.8715985  1.9420678
+#> 
+# }
+
+
+
-
- +
- - + + diff --git a/docs/dev/reference/saem.html b/docs/dev/reference/saem.html index b55f29a8..ce3d428c 100644 --- a/docs/dev/reference/saem.html +++ b/docs/dev/reference/saem.html @@ -124,7 +124,10 @@ Expectation Maximisation algorithm (SAEM).

... ) -saemix_data(object, verbose = FALSE, ...)
+saemix_data(object, verbose = FALSE, ...) + +# S3 method for saem.mmkin +parms(object, ci = FALSE, ...)
@@ -199,6 +202,11 @@ and the end of the optimisation process?

digits

Number of digits to use for printing

+ +
ci
+

Should a matrix with estimates and confidence interval boundaries +be returned? If FALSE (default), a vector of estimates is returned.

+

Value

@@ -304,7 +312,7 @@ using mmkin.

#> Likelihoods calculated by importance sampling #> AIC BIC #> 1 467.8664 465.1324 -#> 2 469.9096 466.7851 +#> 2 469.8018 466.6773 sfo_sfo <- mkinmod(parent = mkinsub("SFO", "A1"), A1 = mkinsub("SFO")) @@ -365,8 +373,8 @@ using mmkin.

#> saemix version used for fitting: 3.1 #> mkin version used for pre-fitting: 1.1.2 #> R version used for fitting: 4.2.1 -#> Date of fit: Wed Aug 10 15:27:26 2022 -#> Date of summary: Wed Aug 10 15:27:26 2022 +#> Date of fit: Fri Sep 16 10:30:47 2022 +#> Date of summary: Fri Sep 16 10:30:47 2022 #> #> Equations: #> d_parent/dt = - ((k1 * g * exp(-k1 * time) + k2 * (1 - g) * exp(-k2 * @@ -381,7 +389,7 @@ using mmkin.

#> #> Model predictions using solution type analytical #> -#> Fitted in 9.438 s +#> Fitted in 9.651 s #> Using 300, 100 iterations and 10 chains #> #> Variance model: Constant variance diff --git a/docs/dev/reference/summary.mkinfit.html b/docs/dev/reference/summary.mkinfit.html index 3a31bfe7..c58fffbb 100644 --- a/docs/dev/reference/summary.mkinfit.html +++ b/docs/dev/reference/summary.mkinfit.html @@ -209,15 +209,15 @@ EC Document Reference Sanco/10058/2005 version 2.0, 434 pp, summary(mkinfit("SFO", FOCUS_2006_A, quiet = TRUE)) #> mkin version used for fitting: 1.1.2 #> R version used for fitting: 4.2.1 -#> Date of fit: Wed Aug 10 15:27:28 2022 -#> Date of summary: Wed Aug 10 15:27:28 2022 +#> Date of fit: Fri Sep 16 10:30:48 2022 +#> Date of summary: Fri Sep 16 10:30:48 2022 #> #> Equations: #> d_parent/dt = - k_parent * parent #> #> Model predictions using solution type analytical #> -#> Fitted using 131 model solutions performed in 0.029 s +#> Fitted using 131 model solutions performed in 0.028 s #> #> Error model: Constant variance #> diff --git a/docs/dev/reference/summary.mmkin.html b/docs/dev/reference/summary.mmkin.html index e916ba24..e440e4a9 100644 --- a/docs/dev/reference/summary.mmkin.html +++ b/docs/dev/reference/summary.mmkin.html @@ -129,7 +129,7 @@ and gives an overview of ill-defined parameters calculated by quiet = TRUE, cores = 1) summary(fits) #> Error model: Constant variance -#> Fitted in 0.802 s +#> Fitted in 0.81 s #> #> Convergence: #> dataset diff --git a/docs/dev/reference/summary.saem.mmkin.html b/docs/dev/reference/summary.saem.mmkin.html index 6cab9c5f..1a6da753 100644 --- a/docs/dev/reference/summary.saem.mmkin.html +++ b/docs/dev/reference/summary.saem.mmkin.html @@ -289,8 +289,8 @@ saemix authors for the parts inherited from saemix.

#> saemix version used for fitting: 3.1 #> mkin version used for pre-fitting: 1.1.2 #> R version used for fitting: 4.2.1 -#> Date of fit: Wed Aug 10 15:28:15 2022 -#> Date of summary: Wed Aug 10 15:28:15 2022 +#> Date of fit: Fri Sep 16 10:31:33 2022 +#> Date of summary: Fri Sep 16 10:31:33 2022 #> #> Equations: #> d_parent/dt = - ((k1 * g * exp(-k1 * time) + k2 * (1 - g) * exp(-k2 * @@ -305,7 +305,7 @@ saemix authors for the parts inherited from saemix.

#> #> Model predictions using solution type analytical #> -#> Fitted in 27.674 s +#> Fitted in 27.615 s #> Using 300, 100 iterations and 10 chains #> #> Variance model: Two-component variance function diff --git a/docs/dev/sitemap.xml b/docs/dev/sitemap.xml index fde124d6..da4ada00 100644 --- a/docs/dev/sitemap.xml +++ b/docs/dev/sitemap.xml @@ -207,6 +207,9 @@ https://pkgdown.jrwb.de/mkin/reference/mmkin.html + + https://pkgdown.jrwb.de/mkin/reference/multistart.html + https://pkgdown.jrwb.de/mkin/reference/nafta.html -- cgit v1.2.1