From 5a21dc4016b0208264e22e6a7e36af62397c13b6 Mon Sep 17 00:00:00 2001 From: Johannes Ranke Date: Thu, 30 Jun 2022 10:29:05 +0200 Subject: Remove stray sentence from vignette, update docs --- docs/articles/web_only/dimethenamid_2018.html | 14 +++++++------- docs/index.html | 2 +- docs/news/index.html | 1 + docs/pkgdown.yml | 2 +- docs/reference/Rplot001.png | Bin 27711 -> 1011 bytes docs/reference/Rplot002.png | Bin 59119 -> 17010 bytes docs/reference/Rplot003.png | Bin 59152 -> 48687 bytes docs/reference/Rplot004.png | Bin 60094 -> 58906 bytes docs/reference/Rplot005.png | Bin 19451 -> 22787 bytes docs/reference/create_deg_func.html | 8 ++++---- docs/reference/dimethenamid_2018-3.png | Bin 245058 -> 247960 bytes docs/reference/dimethenamid_2018.html | 8 ++++---- docs/reference/nlme.mmkin-1.png | Bin 124929 -> 124053 bytes docs/reference/nlme.mmkin-2.png | Bin 169786 -> 168550 bytes docs/reference/nlme.mmkin-3.png | Bin 173135 -> 172051 bytes docs/reference/plot.mkinfit.html | 5 ++++- docs/reference/saem-4.png | Bin 174097 -> 171244 bytes docs/reference/saem.html | 8 ++++---- docs/reference/summary.nlme.mmkin.html | 12 ++++++------ 19 files changed, 32 insertions(+), 28 deletions(-) (limited to 'docs') diff --git a/docs/articles/web_only/dimethenamid_2018.html b/docs/articles/web_only/dimethenamid_2018.html index 09aa5150..32653b5d 100644 --- a/docs/articles/web_only/dimethenamid_2018.html +++ b/docs/articles/web_only/dimethenamid_2018.html @@ -105,7 +105,7 @@

Example evaluations of the dimethenamid data from 2018

Johannes Ranke

-

Last change 7 March 2022, built on 16 Mar 2022

+

Last change 7 March 2022, built on 30 Jun 2022

Source: vignettes/web_only/dimethenamid_2018.rmd @@ -155,20 +155,20 @@ error_model = "tc", quiet = TRUE)

The plot of the individual SFO fits shown below suggests that at least in some datasets the degradation slows down towards later time points, and that the scatter of the residuals error is smaller for smaller values (panel to the right):

-plot(mixed(f_parent_mkin_const["SFO", ]))
+plot(mixed(f_parent_mkin_const["SFO", ]))

Using biexponential decline (DFOP) results in a slightly more random scatter of the residuals:

-plot(mixed(f_parent_mkin_const["DFOP", ]))
+plot(mixed(f_parent_mkin_const["DFOP", ]))

The population curve (bold line) in the above plot results from taking the mean of the individual transformed parameters, i.e. of log k1 and log k2, as well as of the logit of the g parameter of the DFOP model). Here, this procedure does not result in parameters that represent the degradation well, because in some datasets the fitted value for k2 is extremely close to zero, leading to a log k2 value that dominates the average. This is alleviated if only rate constants that pass the t-test for significant difference from zero (on the untransformed scale) are considered in the averaging:

-plot(mixed(f_parent_mkin_const["DFOP", ]), test_log_parms = TRUE)
+plot(mixed(f_parent_mkin_const["DFOP", ]), test_log_parms = TRUE)

While this is visually much more satisfactory, such an average procedure could introduce a bias, as not all results from the individual fits enter the population curve with the same weight. This is where nonlinear mixed-effects models can help out by treating all datasets with equally by fitting a parameter distribution model together with the degradation model and the error model (see below).

The remaining trend of the residuals to be higher for higher predicted residues is reduced by using the two-component error model:

-plot(mixed(f_parent_mkin_tc["DFOP", ]), test_log_parms = TRUE)
+plot(mixed(f_parent_mkin_tc["DFOP", ]), test_log_parms = TRUE)

However, note that in the case of using this error model, the fits to the Flaach and BBA 2.3 datasets appear to be ill-defined, indicated by the fact that they did not converge:

@@ -222,7 +222,7 @@ f_parent_nlme_dfop_tc       3 10 671.91 702.34 -325.96 2 vs 3  134.69  <.0001
 

While the SFO variants converge fast, the additional parameters introduced by this lead to convergence warnings for the DFOP model. The model comparison clearly show that adding correlations between random effects does not improve the fits.

The selected model (DFOP with two-component error) fitted to the data assuming no correlations between random effects is shown below.

-plot(f_parent_nlme_dfop_tc)
+plot(f_parent_nlme_dfop_tc)

@@ -369,7 +369,7 @@ DFOP tc more iterations 665.88 663.80

Comparison

-

The following table gives the AIC values obtained with both backend packages using the same control parameters (800 iterations burn-in, 300 iterations second phase, 15 chains). Note that

+

The following table gives the AIC values obtained with both backend packages using the same control parameters (800 iterations burn-in, 300 iterations second phase, 15 chains).

 AIC_all <- data.frame(
   check.names = FALSE,
diff --git a/docs/index.html b/docs/index.html
index 4491b50f..0cd8de66 100644
--- a/docs/index.html
+++ b/docs/index.html
@@ -151,7 +151,7 @@
 
  • The usual one-sided t-test for significant difference from zero is nevertheless shown based on estimators for the untransformed parameters.
  • Summary and plotting functions. The summary of an mkinfit object is in fact a full report that should give enough information to be able to approximately reproduce the fit with other tools.
  • The chi-squared error level as defined in the FOCUS kinetics guidance (see below) is calculated for each observed variable.
  • -
  • The ‘variance by variable’ error model which is often fitted using Iteratively Reweighted Least Squares (IRLS) should now be specified as error_model = "obs".
  • +
  • The ‘variance by variable’ error model which is often fitted using Iteratively Reweighted Least Squares (IRLS) can be specified as error_model = "obs".
  • diff --git a/docs/news/index.html b/docs/news/index.html index 4776f207..8c72e5ab 100644 --- a/docs/news/index.html +++ b/docs/news/index.html @@ -88,6 +88,7 @@
  • ‘saem()’: Slightly improve speed in the case that no analytical solution for saemix is implemented, activate a test of the respective code

  • ‘mean_degparms’: New argument ‘default_log_parms’ that makes it possible to supply a surrogate value (default) for log parameters that fail the t-test

  • ‘plot.mixed.mmkin’: Pass the frame argument also to residual plots, take the ‘default_log_parms’ argument for ‘mean_degparms’ used for constructing approximate population curves, plot population curve last to avoid that it is covered by data

  • +
  • ‘plot.mkinfit’: Respect argument ‘maxabs’ for residual plots, and make it possible to give ylim as a list, for row layouts

  • diff --git a/docs/pkgdown.yml b/docs/pkgdown.yml index b94f7f0e..59dce612 100644 --- a/docs/pkgdown.yml +++ b/docs/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-04-09T15:50Z +last_built: 2022-06-30T07:49Z 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 fa5f3834..17a35806 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 3caf465f..f06a860e 100644 Binary files a/docs/reference/Rplot002.png and b/docs/reference/Rplot002.png differ diff --git a/docs/reference/Rplot003.png b/docs/reference/Rplot003.png index 88ebd2d4..f8bf10bb 100644 Binary files a/docs/reference/Rplot003.png and b/docs/reference/Rplot003.png differ diff --git a/docs/reference/Rplot004.png b/docs/reference/Rplot004.png index 7e87d63d..12d337a4 100644 Binary files a/docs/reference/Rplot004.png and b/docs/reference/Rplot004.png differ diff --git a/docs/reference/Rplot005.png b/docs/reference/Rplot005.png index 76f25647..cb419daa 100644 Binary files a/docs/reference/Rplot005.png and b/docs/reference/Rplot005.png differ diff --git a/docs/reference/create_deg_func.html b/docs/reference/create_deg_func.html index 2516edff..1c70a094 100644 --- a/docs/reference/create_deg_func.html +++ b/docs/reference/create_deg_func.html @@ -120,8 +120,8 @@ replications = 2) #> Loading required package: rbenchmark #> test replications elapsed relative user.self sys.self user.child -#> 1 analytical 2 0.394 1.000 0.393 0 0 -#> 2 deSolve 2 0.678 1.721 0.677 0 0 +#> 1 analytical 2 0.401 1.00 0.401 0.000 0 +#> 2 deSolve 2 1.211 3.02 1.210 0.002 0 #> sys.child #> 1 0 #> 2 0 @@ -134,8 +134,8 @@ deSolve = mkinfit(DFOP_SFO, FOCUS_D, solution_type = "deSolve", quiet = TRUE), replications = 2) #> test replications elapsed relative user.self sys.self user.child -#> 1 analytical 2 0.829 1.000 0.829 0 0 -#> 2 deSolve 2 1.559 1.881 1.559 0 0 +#> 1 analytical 2 0.84 1.000 0.839 0.001 0 +#> 2 deSolve 2 3.19 3.798 3.188 0.001 0 #> sys.child #> 1 0 #> 2 0 diff --git a/docs/reference/dimethenamid_2018-3.png b/docs/reference/dimethenamid_2018-3.png index efb89bdb..7c876208 100644 Binary files a/docs/reference/dimethenamid_2018-3.png and b/docs/reference/dimethenamid_2018-3.png differ diff --git a/docs/reference/dimethenamid_2018.html b/docs/reference/dimethenamid_2018.html index d2ed8647..e913fa27 100644 --- a/docs/reference/dimethenamid_2018.html +++ b/docs/reference/dimethenamid_2018.html @@ -202,9 +202,9 @@ specific pieces of information in the comments.

    summary(f_dmta_saem_tc) #> saemix version used for fitting: 3.0 #> mkin version used for pre-fitting: 1.1.0 -#> R version used for fitting: 4.1.3 -#> Date of fit: Sat Apr 9 18:03:34 2022 -#> Date of summary: Sat Apr 9 18:03:34 2022 +#> R version used for fitting: 4.2.1 +#> Date of fit: Thu Jun 30 10:21:01 2022 +#> Date of summary: Thu Jun 30 10:21:01 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 787.836 s +#> Fitted in 1845.619 s #> Using 300, 100 iterations and 9 chains #> #> Variance model: Two-component variance function diff --git a/docs/reference/nlme.mmkin-1.png b/docs/reference/nlme.mmkin-1.png index d93b0950..45e4eebe 100644 Binary files a/docs/reference/nlme.mmkin-1.png and b/docs/reference/nlme.mmkin-1.png differ diff --git a/docs/reference/nlme.mmkin-2.png b/docs/reference/nlme.mmkin-2.png index 5afccfbb..b9a68e92 100644 Binary files a/docs/reference/nlme.mmkin-2.png and b/docs/reference/nlme.mmkin-2.png differ diff --git a/docs/reference/nlme.mmkin-3.png b/docs/reference/nlme.mmkin-3.png index bf3aac6c..2a724bed 100644 Binary files a/docs/reference/nlme.mmkin-3.png and b/docs/reference/nlme.mmkin-3.png differ diff --git a/docs/reference/plot.mkinfit.html b/docs/reference/plot.mkinfit.html index 4c2ff570..b74d1e7b 100644 --- a/docs/reference/plot.mkinfit.html +++ b/docs/reference/plot.mkinfit.html @@ -155,7 +155,8 @@ variables in the model.

    xlim

    Plot range in x direction.

    ylim
    -

    Plot range in y direction.

    +

    Plot range in y direction. If given as a list, plot ranges +for the different plot rows can be given for row layout.

    col_obs

    Colors used for plotting the observed data and the corresponding model prediction lines.

    @@ -237,7 +238,9 @@ latex is being used for the formatting of the chi2 error level, if m1 = mkinsub("SFO", full = "Metabolite M1" )) #> Temporary DLL for differentials generated and loaded fit <- mkinfit(SFO_SFO, FOCUS_2006_D, quiet = TRUE) +#> Warning: Observations with value of zero were removed from the data fit <- mkinfit(SFO_SFO, FOCUS_2006_D, quiet = TRUE, error_model = "tc") +#> Warning: Observations with value of zero were removed from the data plot(fit) plot_res(fit) diff --git a/docs/reference/saem-4.png b/docs/reference/saem-4.png index 5f65ba2e..bb775c25 100644 Binary files a/docs/reference/saem-4.png and b/docs/reference/saem-4.png differ diff --git a/docs/reference/saem.html b/docs/reference/saem.html index cc597665..f9e6565f 100644 --- a/docs/reference/saem.html +++ b/docs/reference/saem.html @@ -303,9 +303,9 @@ using mmkin.

    summary(f_saem_dfop_sfo, data = TRUE) #> saemix version used for fitting: 3.0 #> mkin version used for pre-fitting: 1.1.0 -#> R version used for fitting: 4.1.2 -#> Date of fit: Mon Mar 7 13:15:26 2022 -#> Date of summary: Mon Mar 7 13:15:26 2022 +#> R version used for fitting: 4.2.1 +#> Date of fit: Thu Jun 30 10:23:53 2022 +#> Date of summary: Thu Jun 30 10:23:53 2022 #> #> Equations: #> d_parent/dt = - ((k1 * g * exp(-k1 * time) + k2 * (1 - g) * exp(-k2 * @@ -320,7 +320,7 @@ using mmkin.

    #> #> Model predictions using solution type analytical #> -#> Fitted in 8.741 s +#> Fitted in 8.85 s #> Using 300, 100 iterations and 10 chains #> #> Variance model: Constant variance diff --git a/docs/reference/summary.nlme.mmkin.html b/docs/reference/summary.nlme.mmkin.html index 3f98bec7..4879269e 100644 --- a/docs/reference/summary.nlme.mmkin.html +++ b/docs/reference/summary.nlme.mmkin.html @@ -96,7 +96,7 @@ endpoints such as formation fractions and DT50 values. Optionally
    # S3 method for nlme.mmkin
    -summary(
    +summary(
       object,
       data = FALSE,
       verbose = FALSE,
    @@ -201,12 +201,12 @@ José Pinheiro and Douglas Bates for the components inherited from nlme

    #> iteration limit reached without convergence (10) f_nlme <- nlme(f_mmkin) #> Warning: Iteration 4, LME step: nlminb() did not converge (code = 1). PORT message: false convergence (8) -summary(f_nlme, data = TRUE) +summary(f_nlme, data = TRUE) #> nlme version used for fitting: 3.1.155 #> mkin version used for pre-fitting: 1.1.0 -#> R version used for fitting: 4.1.3 -#> Date of fit: Mon Mar 14 08:58:29 2022 -#> Date of summary: Mon Mar 14 08:58:29 2022 +#> R version used for fitting: 4.2.1 +#> Date of fit: Thu Jun 30 10:23:57 2022 +#> Date of summary: Thu Jun 30 10:23:57 2022 #> #> Equations: #> d_parent/dt = - k_parent * parent @@ -216,7 +216,7 @@ José Pinheiro and Douglas Bates for the components inherited from nlme

    #> #> Model predictions using solution type analytical #> -#> Fitted in 0.527 s using 4 iterations +#> Fitted in 0.538 s using 4 iterations #> #> Variance model: Two-component variance function #> -- cgit v1.2.1