From e5d1df9a9b1f0951d7dfbaf24eee4294470b73e2 Mon Sep 17 00:00:00 2001 From: Johannes Ranke Date: Thu, 17 Nov 2022 14:54:20 +0100 Subject: Complete update of online docs for v1.2.0 --- docs/reference/index.html | 68 ++++++++++++++++++++++++++++++++++++----------- 1 file changed, 53 insertions(+), 15 deletions(-) (limited to 'docs/reference/index.html') diff --git a/docs/reference/index.html b/docs/reference/index.html index 956648d2..665912f7 100644 --- a/docs/reference/index.html +++ b/docs/reference/index.html @@ -17,7 +17,7 @@ mkin - 1.1.2 + 1.2.0 @@ -44,11 +44,14 @@ 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
  • @@ -56,7 +59,10 @@ Example evaluation of NAFTA SOP Attachment examples
  • - Some benchmark timings + Benchmark timings for mkin +
  • +
  • + Benchmark timings for saem.mmkin
  • @@ -107,11 +113,15 @@ degradation models and one or more error models

    Generic functions introduced by the package

    -

    convergence() print(<convergence.mmkin>)

    +

    parms()

    + +

    Extract model parameters

    + +

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

    +

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

    Method to get the names of ill-defined parameters

    @@ -119,6 +129,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 +145,6 @@ with mkinfit

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

    Summary method for class "mkinfit"

    - -

    parms()

    - -

    Extract model parameters from mkinfit models

    confint(<mkinfit>)

    @@ -155,10 +165,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()

    @@ -189,11 +195,15 @@ of an mmkin object

    Create and work with nonlinear hierarchical models

    +

    read_spreadsheet()

    + +

    Read datasets and relevant meta information from a spreadsheet file

    +

    nlme(<mmkin>) print(<nlme.mmkin>) update(<nlme.mmkin>)

    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

    @@ -213,6 +223,14 @@ degradation models and one or more error models

    summary(<saem.mmkin>) print(<summary.saem.mmkin>)

    Summary method for class "saem.mmkin"

    + +

    anova(<saem.mmkin>)

    + +

    Anova method for saem.mmkin objects

    + +

    logLik(<saem.mmkin>)

    + +

    logLik method for saem.mmkin objects

    nlme_function() nlme_data()

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

    intervals(<saem.mmkin>)

    Confidence intervals for parameters in saem.mmkin objects

    + +

    multistart() print(<multistart>) best() which.best()

    + +

    Perform a hierarchical model fit with multiple starting values

    + +

    llhist()

    + +

    Plot the distribution of log likelihoods from multistart objects

    + +

    parplot()

    + +

    Plot parameter variability of multistart objects

    Datasets and known results

    @@ -322,9 +352,17 @@ degradation models and one or more error models

    +

    tex_listing()

    + +

    Wrap the output of a summary function in tex listing environment

    +

    f_time_norm_focus()

    Normalisation factors for aerobic soil degradation according to FOCUS guidance

    + +

    set_nd_nq() set_nd_nq_focus()

    + +

    Set non-detects and unquantified values in residue series without replicates

    max_twa_parent() max_twa_sfo() max_twa_fomc() max_twa_dfop() max_twa_hs()

    -- cgit v1.2.3 From 317fd7514e638780c09ed6349a165a854ba2deea Mon Sep 17 00:00:00 2001 From: Johannes Ranke Date: Fri, 18 Nov 2022 19:23:56 +0100 Subject: Update docs --- docs/404.html | 2 +- docs/articles/index.html | 2 +- docs/authors.html | 6 +- docs/index.html | 2 +- docs/news/index.html | 10 +- docs/pkgdown.yml | 2 +- docs/reference/Rplot001.png | Bin 14083 -> 22432 bytes docs/reference/Rplot002.png | Bin 13699 -> 16953 bytes docs/reference/ds_mixed-1.png | Bin 0 -> 219939 bytes docs/reference/ds_mixed.html | 240 ++++++++++++++++++++++++++++++++++++++++++ docs/reference/index.html | 10 +- docs/reference/parplot.html | 8 +- docs/reference/saem.html | 12 +-- docs/sitemap.xml | 3 + 14 files changed, 279 insertions(+), 18 deletions(-) create mode 100644 docs/reference/ds_mixed-1.png create mode 100644 docs/reference/ds_mixed.html (limited to 'docs/reference/index.html') diff --git a/docs/404.html b/docs/404.html index 36135992..8e7e8f45 100644 --- a/docs/404.html +++ b/docs/404.html @@ -32,7 +32,7 @@ mkin - 1.2.0 + 1.2.1 diff --git a/docs/articles/index.html b/docs/articles/index.html index 292a72a4..f4f6d557 100644 --- a/docs/articles/index.html +++ b/docs/articles/index.html @@ -17,7 +17,7 @@ mkin - 1.2.0 + 1.2.1 diff --git a/docs/authors.html b/docs/authors.html index 6560ab17..7afe3000 100644 --- a/docs/authors.html +++ b/docs/authors.html @@ -17,7 +17,7 @@ mkin - 1.2.0 + 1.2.1 @@ -115,13 +115,13 @@

    Ranke J (2022). mkin: Kinetic Evaluation of Chemical Degradation Data. -R package version 1.2.0, https://pkgdown.jrwb.de/mkin/. +R package version 1.2.1, https://pkgdown.jrwb.de/mkin/.

    @Manual{,
       title = {mkin: Kinetic Evaluation of Chemical Degradation Data},
       author = {Johannes Ranke},
       year = {2022},
    -  note = {R package version 1.2.0},
    +  note = {R package version 1.2.1},
       url = {https://pkgdown.jrwb.de/mkin/},
     }
    diff --git a/docs/index.html b/docs/index.html index 9048bc38..bb14906d 100644 --- a/docs/index.html +++ b/docs/index.html @@ -44,7 +44,7 @@ mkin - 1.2.0 + 1.2.1 diff --git a/docs/news/index.html b/docs/news/index.html index 90768141..6b9a7d51 100644 --- a/docs/news/index.html +++ b/docs/news/index.html @@ -17,7 +17,7 @@ mkin - 1.2.0 + 1.2.1 @@ -87,6 +87,14 @@ Source: NEWS.md +
    + +
    • ‘tests/testthat/setup_script.R’: Excluded another ill-defined random effect for the DFOP fit with ‘saem’, in an attempt to avoid a platform dependence that surfaced on Fedora systems on the CRAN check farm

    • +
    • ‘tests/testthat/test_mixed.R’: Round parameters found by saemix to two significant digits before printing, to also help to avoid platform dependence of tests

    • +
    • ‘R/saem.R’: Fix a bug that prevented that ‘error.ini’ is passed to ‘saemix_model’, and set default to c(1, 1) to avoid changing test results

    • +
    • ‘R/parplot.R’: Show initial values for error model parameters

    • +
    • ‘R/loglik.mkinfit.R’: Add ‘nobs’ attribute to the resulting ‘logLik’ object, in order to make test_AIC.R succeed on current R-devel

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

    • diff --git a/docs/pkgdown.yml b/docs/pkgdown.yml index 14c22439..b6c8f1cc 100644 --- a/docs/pkgdown.yml +++ b/docs/pkgdown.yml @@ -13,7 +13,7 @@ articles: dimethenamid_2018: web_only/dimethenamid_2018.html multistart: web_only/multistart.html saem_benchmarks: web_only/saem_benchmarks.html -last_built: 2022-11-17T13:56Z +last_built: 2022-11-18T18:18Z urls: reference: https://pkgdown.jrwb.de/mkin/reference article: https://pkgdown.jrwb.de/mkin/articles diff --git a/docs/reference/Rplot001.png b/docs/reference/Rplot001.png index ca982688..b3448db0 100644 Binary files a/docs/reference/Rplot001.png and b/docs/reference/Rplot001.png differ diff --git a/docs/reference/Rplot002.png b/docs/reference/Rplot002.png index de2d61aa..27feab09 100644 Binary files a/docs/reference/Rplot002.png and b/docs/reference/Rplot002.png differ diff --git a/docs/reference/ds_mixed-1.png b/docs/reference/ds_mixed-1.png new file mode 100644 index 00000000..a7f5c395 Binary files /dev/null and b/docs/reference/ds_mixed-1.png differ diff --git a/docs/reference/ds_mixed.html b/docs/reference/ds_mixed.html new file mode 100644 index 00000000..64b02749 --- /dev/null +++ b/docs/reference/ds_mixed.html @@ -0,0 +1,240 @@ + +Synthetic data for hierarchical kinetic degradation models — ds_mixed • mkin + + +
      +
      + + + +
      +
      + + +
      +

      The R code used to create this data object is installed with this package in +the 'dataset_generation' directory.

      +
      + + + +
      +

      Examples

      +
      # \dontrun{
      +  sfo_mmkin <- mmkin("SFO", ds_sfo, quiet = TRUE, error_model = "tc", cores = 15)
      +  sfo_saem <- saem(sfo_mmkin, no_random_effect = "parent_0")
      +  plot(sfo_saem)
      +
      +# }
      +
      +# This is the code used to generate the datasets
      +cat(readLines(system.file("dataset_generation/ds_mixed.R", package = "mkin")), sep = "\n")
      +#> # Synthetic data for hierarchical kinetic models
      +#> # Refactored version of the code previously in tests/testthat/setup_script.R
      +#> # The number of datasets was 3 for FOMC, and 10 for HS in that script, now it
      +#> # is always 15 for consistency
      +#> 
      +#> library(mkin)  # We use mkinmod and mkinpredict
      +#> sampling_times = c(0, 1, 3, 7, 14, 28, 60, 90, 120)
      +#> n <- 15
      +#> log_sd <- 0.3
      +#> err_1 = list(const = 1, prop = 0.05)
      +#> tc <- function(value) sigma_twocomp(value, err_1$const, err_1$prop)
      +#> const <- function(value) 2
      +#> 
      +#> set.seed(123456)
      +#> SFO <- mkinmod(parent = mkinsub("SFO"))
      +#> sfo_pop <- list(parent_0 = 100, k_parent = 0.03)
      +#> sfo_parms <- as.matrix(data.frame(
      +#>     k_parent = rlnorm(n, log(sfo_pop$k_parent), log_sd)))
      +#> set.seed(123456)
      +#> ds_sfo <- lapply(1:n, function(i) {
      +#>   ds_mean <- mkinpredict(SFO, sfo_parms[i, ],
      +#>     c(parent = sfo_pop$parent_0), sampling_times)
      +#>   add_err(ds_mean, tc, n = 1)[[1]]
      +#> })
      +#> attr(ds_sfo, "pop") <- sfo_pop
      +#> attr(ds_sfo, "parms") <- sfo_parms
      +#> 
      +#> set.seed(123456)
      +#> FOMC <- mkinmod(parent = mkinsub("FOMC"))
      +#> fomc_pop <- list(parent_0 = 100, alpha = 2, beta = 8)
      +#> fomc_parms <- as.matrix(data.frame(
      +#>     alpha = rlnorm(n, log(fomc_pop$alpha), 0.4),
      +#>     beta = rlnorm(n, log(fomc_pop$beta), 0.2)))
      +#> set.seed(123456)
      +#> ds_fomc <- lapply(1:n, function(i) {
      +#>   ds_mean <- mkinpredict(FOMC, fomc_parms[i, ],
      +#>     c(parent = fomc_pop$parent_0), sampling_times)
      +#>   add_err(ds_mean, tc, n = 1)[[1]]
      +#> })
      +#> attr(ds_fomc, "pop") <- fomc_pop
      +#> attr(ds_fomc, "parms") <- fomc_parms
      +#> 
      +#> set.seed(123456)
      +#> DFOP <- mkinmod(parent = mkinsub("DFOP"))
      +#> dfop_pop <- list(parent_0 = 100, k1 = 0.06, k2 = 0.015, g = 0.4)
      +#> dfop_parms <- as.matrix(data.frame(
      +#>   k1 = rlnorm(n, log(dfop_pop$k1), log_sd),
      +#>   k2 = rlnorm(n, log(dfop_pop$k2), log_sd),
      +#>   g = plogis(rnorm(n, qlogis(dfop_pop$g), log_sd))))
      +#> set.seed(123456)
      +#> ds_dfop <- lapply(1:n, function(i) {
      +#>   ds_mean <- mkinpredict(DFOP, dfop_parms[i, ],
      +#>     c(parent = dfop_pop$parent_0), sampling_times)
      +#>   add_err(ds_mean, tc, n = 1)[[1]]
      +#> })
      +#> attr(ds_dfop, "pop") <- dfop_pop
      +#> attr(ds_dfop, "parms") <- dfop_parms
      +#> 
      +#> set.seed(123456)
      +#> HS <- mkinmod(parent = mkinsub("HS"))
      +#> hs_pop <- list(parent_0 = 100, k1 = 0.08, k2 = 0.01, tb = 15)
      +#> hs_parms <- as.matrix(data.frame(
      +#>   k1 = rlnorm(n, log(hs_pop$k1), log_sd),
      +#>   k2 = rlnorm(n, log(hs_pop$k2), log_sd),
      +#>   tb = rlnorm(n, log(hs_pop$tb), 0.1)))
      +#> set.seed(123456)
      +#> ds_hs <- lapply(1:n, function(i) {
      +#>   ds_mean <- mkinpredict(HS, hs_parms[i, ],
      +#>     c(parent = hs_pop$parent_0), sampling_times)
      +#>   add_err(ds_mean, const, n = 1)[[1]]
      +#> })
      +#> attr(ds_hs, "pop") <- hs_pop
      +#> attr(ds_hs, "parms") <- hs_parms
      +#> 
      +#> set.seed(123456)
      +#> DFOP_SFO <- mkinmod(
      +#>   parent = mkinsub("DFOP", "m1"),
      +#>   m1 = mkinsub("SFO"),
      +#>   quiet = TRUE)
      +#> dfop_sfo_pop <- list(parent_0 = 100,
      +#>   k_m1 = 0.007, f_parent_to_m1 = 0.5,
      +#>   k1 = 0.1, k2 = 0.02, g = 0.5)
      +#> dfop_sfo_parms <- as.matrix(data.frame(
      +#>   k1 = rlnorm(n, log(dfop_sfo_pop$k1), log_sd),
      +#>   k2 = rlnorm(n, log(dfop_sfo_pop$k2), log_sd),
      +#>   g = plogis(rnorm(n, qlogis(dfop_sfo_pop$g), log_sd)),
      +#>   f_parent_to_m1 = plogis(rnorm(n,
      +#>       qlogis(dfop_sfo_pop$f_parent_to_m1), log_sd)),
      +#>   k_m1 = rlnorm(n, log(dfop_sfo_pop$k_m1), log_sd)))
      +#> ds_dfop_sfo_mean <- lapply(1:n,
      +#>   function(i) {
      +#>     mkinpredict(DFOP_SFO, dfop_sfo_parms[i, ],
      +#>       c(parent = dfop_sfo_pop$parent_0, m1 = 0), sampling_times)
      +#>   }
      +#> )
      +#> set.seed(123456)
      +#> ds_dfop_sfo <- lapply(ds_dfop_sfo_mean, function(ds) {
      +#>   add_err(ds,
      +#>     sdfunc = function(value) sqrt(err_1$const^2 + value^2 * err_1$prop^2),
      +#>     n = 1, secondary = "m1")[[1]]
      +#> })
      +#> attr(ds_dfop_sfo, "pop") <- dfop_sfo_pop
      +#> attr(ds_dfop_sfo, "parms") <- dfop_sfo_parms
      +#> 
      +#> #save(ds_sfo, ds_fomc, ds_dfop, ds_hs, ds_dfop_sfo, file = "data/ds_mixed.rda", version = 2)
      +
      +
      +
      + +
      + + +
      + +
      +

      Site built with pkgdown 2.0.6.

      +
      + +
      + + + + + + + + diff --git a/docs/reference/index.html b/docs/reference/index.html index 665912f7..9fddf541 100644 --- a/docs/reference/index.html +++ b/docs/reference/index.html @@ -17,7 +17,7 @@ mkin - 1.2.0 + 1.2.1
    @@ -268,9 +268,9 @@ degradation models and one or more error models

    -

    focus_soil_moisture

    +

    ds_mixed ds_sfo ds_fomc ds_dfop ds_hs ds_dfop_sfo

    -

    FOCUS default values for soil moisture contents at field capacity, MWHC and 1/3 bar

    +

    Synthetic data for hierarchical kinetic degradation models

    D24_2014

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

    test_data_from_UBA_2014

    Three experimental datasets from two water sediment systems and one soil

    + +

    focus_soil_moisture

    + +

    FOCUS default values for soil moisture contents at field capacity, MWHC and 1/3 bar

    print(<mkinds>)

    diff --git a/docs/reference/parplot.html b/docs/reference/parplot.html index f4f3c811..ab02cbb3 100644 --- a/docs/reference/parplot.html +++ b/docs/reference/parplot.html @@ -19,7 +19,7 @@ or by their medians as proposed in the paper by Duchesne et al. (2021).">