From 05df90d8328b804ad1efe92c81e9ace491b386ec Mon Sep 17 00:00:00 2001 From: Johannes Ranke Date: Wed, 28 Sep 2022 16:47:48 +0200 Subject: Update vignette and static docs --- docs/dev/articles/web_only/multistart.html | 2 +- docs/dev/pkgdown.yml | 2 +- docs/dev/reference/index.html | 2 +- docs/dev/reference/multistart.html | 40 ++++++++++++++++++++---------- docs/dev/reference/parms.html | 17 ++++++++++--- 5 files changed, 44 insertions(+), 19 deletions(-) (limited to 'docs') diff --git a/docs/dev/articles/web_only/multistart.html b/docs/dev/articles/web_only/multistart.html index f9b27a0c..8d26e55a 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 19 September 2022 (rebuilt 2022-09-19)

+

Last change 19 September 2022 (rebuilt 2022-09-28)

Source: vignettes/web_only/multistart.rmd diff --git a/docs/dev/pkgdown.yml b/docs/dev/pkgdown.yml index 144a7f80..ee93ec22 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-09-19T10:47Z +last_built: 2022-09-28T14:45Z urls: reference: https://pkgdown.jrwb.de/mkin/reference article: https://pkgdown.jrwb.de/mkin/articles diff --git a/docs/dev/reference/index.html b/docs/dev/reference/index.html index b7a5de92..cbd44762 100644 --- a/docs/dev/reference/index.html +++ b/docs/dev/reference/index.html @@ -237,7 +237,7 @@ degradation models and one or more error models

Confidence intervals for parameters in saem.mmkin objects

-

multistart() print(<multistart>) parms(<multistart>)

+

multistart() print(<multistart>)

Perform a hierarchical model fit with multiple starting values

diff --git a/docs/dev/reference/multistart.html b/docs/dev/reference/multistart.html index c85e6d1e..714cb2fc 100644 --- a/docs/dev/reference/multistart.html +++ b/docs/dev/reference/multistart.html @@ -100,16 +100,19 @@ mixed-effects models by Duchesne et al (2021).

-
multistart(object, n = 50, cores = 1, ...)
+    
multistart(
+  object,
+  n = 50,
+  cores = if (Sys.info()["sysname"] == "Windows") 1 else parallel::detectCores(),
+  cluster = NULL,
+  ...
+)
 
 # S3 method for saem.mmkin
-multistart(object, n = 50, cores = 1, ...)
+multistart(object, n = 50, cores = 1, cluster = NULL, ...)
 
 # S3 method for multistart
-print(x, ...)
-
-# S3 method for multistart
-parms(object, ...)
+print(x, ...)
@@ -124,7 +127,12 @@ used?

cores
-

How many fits should be run in parallel?

+

How many fits should be run in parallel (only on posix platforms)?

+ + +
cluster
+

A cluster as returned by parallel::makeCluster to be used +for parallel execution.

...
@@ -144,9 +152,7 @@ used?

Details

-

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

-

In case the online version of this help page contains error messages +

In case the online version of this help page contains error messages in the example code and no plots, this is due to the multistart method not working when called by pkgdown. Please refer to the online vignette @@ -186,10 +192,18 @@ doi: 10.1186/s12859-021-04373-4.

#> Error in UseMethod("parms", object): no applicable method for 'parms' applied to an object of class "try-error" f_saem_reduced <- update(f_saem_full, covariance.model = diag(c(1, 1, 0, 1))) -f_saem_reduced_multi <- multistart(f_saem_reduced, n = 16, cores = 16) -#> Warning: all scheduled cores encountered errors in user code +# On Windows, we need to create a cluster first. When working with +# such a cluster, we need to export the mmkin object to the cluster +# 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) +#> Error in checkForRemoteErrors(val): 12 nodes produced errors; first error: object 'f_mmkin' not found parhist(f_saem_reduced_multi, lpos = "bottomright") -#> Error in UseMethod("parms", object): no applicable method for 'parms' applied to an object of class "try-error" +#> Error in parhist(f_saem_reduced_multi, lpos = "bottomright"): object 'f_saem_reduced_multi' not found +#> Warning: calling par(new=TRUE) with no plot # }
diff --git a/docs/dev/reference/parms.html b/docs/dev/reference/parms.html index ded4567a..949bb2f9 100644 --- a/docs/dev/reference/parms.html +++ b/docs/dev/reference/parms.html @@ -46,11 +46,14 @@ without considering the error structure that was assumed for the fit.">Example evaluations of dimethenamid data from 2018 with nonlinear mixed-effects models
  • - Example evaluation of FOCUS Example Dataset Z + Short demo of the multistart method
  • Performance benefit by using compiled model definitions in mkin
  • +
  • + Example evaluation of FOCUS Example Dataset Z +
  • Calculation of time weighted average concentrations with mkin
  • @@ -80,7 +83,7 @@ without considering the error structure that was assumed for the fit."> @@ -97,7 +100,10 @@ without considering the error structure that was assumed for the fit.

    parms(object, transformed = FALSE, errparms = TRUE, ...) # S3 method for mmkin -parms(object, transformed = FALSE, errparms = TRUE, ...) +parms(object, transformed = FALSE, errparms = TRUE, ...) + +# S3 method for multistart +parms(object, exclude_failed = TRUE, ...)
    @@ -119,6 +125,11 @@ during the optimisation?

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

    + +
    exclude_failed
    +

    For multistart objects, should rows for failed fits +be removed from the returned parameter matrix?

    +

    Value

    -- cgit v1.2.1