From 36bc31c52cbe4b686f5562e21ee110380481dff8 Mon Sep 17 00:00:00 2001 From: Johannes Ranke Date: Tue, 12 May 2020 19:10:32 +0200 Subject: Another documentation update --- R/mkinfit.R | 17 ++++++++--------- docs/pkgdown.yml | 2 +- docs/reference/mkinfit.html | 44 ++++++++++++++++++++++---------------------- man/mkinfit.Rd | 19 ++++++++----------- 4 files changed, 39 insertions(+), 43 deletions(-) diff --git a/R/mkinfit.R b/R/mkinfit.R index 0f478910..8231cd00 100644 --- a/R/mkinfit.R +++ b/R/mkinfit.R @@ -68,12 +68,11 @@ if(getRversion() >= '2.15.1') utils::globalVariables(c("name", "time", "value")) #' coefficient matrix in cases that this is possible. If set to "deSolve", a #' numerical ode solver from package \code{\link{deSolve}} is used. If set to #' "analytical", an analytical solution of the model is used. This is only -#' implemented for simple degradation experiments with only one state -#' variable, i.e. with no metabolites. The default is "auto", which uses -#' "analytical" if possible, otherwise "deSolve" if a compiler is present, -#' and "eigen" if no compiler is present and the model can be expressed using -#' eigenvalues and eigenvectors. This argument is passed on to the helper -#' function \code{\link{mkinpredict}}. +#' implemented for relatively simple degradation models. The default is +#' "auto", which uses "analytical" if possible, otherwise "deSolve" if a +#' compiler is present, and "eigen" if no compiler is present and the model +#' can be expressed using eigenvalues and eigenvectors. This argument is +#' passed on to the helper function \code{\link{mkinpredict}}. #' @param method.ode The solution method passed via \code{\link{mkinpredict}} #' to \code{\link{ode}} in case the solution type is "deSolve". The default #' "lsoda" is performant, but sometimes fails to converge. @@ -118,9 +117,9 @@ if(getRversion() >= '2.15.1') utils::globalVariables(c("name", "time", "value")) #' least squares fitting ("OLS") is selected. If the error model is "obs", or #' "tc", the "d_3" algorithm is selected. #' -#' The algorithm "d_3" will directly minimize the negative log-likelihood and -#' - independently - also use the three step algorithm described below. The -#' fit with the higher likelihood is returned. +#' The algorithm "d_3" will directly minimize the negative log-likelihood +#' and independently also use the three step algorithm described below. +#' The fit with the higher likelihood is returned. #' #' The algorithm "direct" will directly minimize the negative log-likelihood. #' diff --git a/docs/pkgdown.yml b/docs/pkgdown.yml index 5147a265..cd82d482 100644 --- a/docs/pkgdown.yml +++ b/docs/pkgdown.yml @@ -10,7 +10,7 @@ articles: NAFTA_examples: web_only/NAFTA_examples.html benchmarks: web_only/benchmarks.html compiled_models: web_only/compiled_models.html -last_built: 2020-05-12T15:51Z +last_built: 2020-05-12T17:10Z urls: reference: https://pkgdown.jrwb.de/mkin/reference article: https://pkgdown.jrwb.de/mkin/articles diff --git a/docs/reference/mkinfit.html b/docs/reference/mkinfit.html index 54ca377f..3438b8b1 100644 --- a/docs/reference/mkinfit.html +++ b/docs/reference/mkinfit.html @@ -115,6 +115,9 @@ likelihood function." />
  • Example evaluation of NAFTA SOP Attachment examples
  • +
  • + Some benchmark timings +
  • @@ -265,12 +268,11 @@ differential equations is based on the spectral decomposition of the coefficient matrix in cases that this is possible. If set to "deSolve", a numerical ode solver from package deSolve is used. If set to "analytical", an analytical solution of the model is used. This is only -implemented for simple degradation experiments with only one state -variable, i.e. with no metabolites. The default is "auto", which uses -"analytical" if possible, otherwise "deSolve" if a compiler is present, -and "eigen" if no compiler is present and the model can be expressed using -eigenvalues and eigenvectors. This argument is passed on to the helper -function mkinpredict.

    +implemented for relatively simple degradation models. The default is +"auto", which uses "analytical" if possible, otherwise "deSolve" if a +compiler is present, and "eigen" if no compiler is present and the model +can be expressed using eigenvalues and eigenvectors. This argument is +passed on to the helper function mkinpredict.

    method.ode @@ -342,11 +344,9 @@ normal distribution as assumed by this method.

    the error model. If the error model is "const", unweighted nonlinear least squares fitting ("OLS") is selected. If the error model is "obs", or "tc", the "d_3" algorithm is selected.

    -

    The algorithm "d_3" will directly minimize the negative log-likelihood and

    - +

    The algorithm "d_3" will directly minimize the negative log-likelihood +and independently also use the three step algorithm described below. +The fit with the higher likelihood is returned.

    The algorithm "direct" will directly minimize the negative log-likelihood.

    The algorithm "twostep" will minimize the negative log-likelihood after an initial unweighted least squares optimisation step.

    @@ -422,15 +422,15 @@ Degradation Data. Environments 6(12) 124 fit <- mkinfit("FOMC", FOCUS_2006_C, quiet = TRUE) summary(fit)
    #> mkin version used for fitting: 0.9.50.2 #> R version used for fitting: 4.0.0 -#> Date of fit: Tue May 12 15:29:48 2020 -#> Date of summary: Tue May 12 15:29:48 2020 +#> Date of fit: Tue May 12 19:10:13 2020 +#> Date of summary: Tue May 12 19:10:13 2020 #> #> Equations: #> d_parent/dt = - (alpha/beta) * 1/((time/beta) + 1) * parent #> #> Model predictions using solution type analytical #> -#> Fitted using 222 model solutions performed in 0.043 s +#> Fitted using 222 model solutions performed in 0.047 s #> #> Error model: Constant variance #> @@ -597,7 +597,7 @@ Degradation Data. Environments 6(12) 124 #> Sum of squared residuals at call 166: 371.2134 #> Sum of squared residuals at call 168: 371.2134 #> Negative log-likelihood at call 178: 97.22429
    #> Optimisation successfully terminated.
    #> User System verstrichen -#> 0.363 0.001 0.364
    parms(fit.deSolve)
    #> parent_0 k_parent k_m1 f_parent_to_m1 sigma +#> 0.351 0.000 0.352
    parms(fit.deSolve)
    #> parent_0 k_parent k_m1 f_parent_to_m1 sigma #> 99.598480759 0.098697739 0.005260651 0.514475958 3.125503874
    endpoints(fit.deSolve)
    #> $ff #> parent_m1 parent_sink #> 0.514476 0.485524 @@ -631,8 +631,8 @@ Degradation Data. Environments 6(12) 124 SFO_SFO.ff <- mkinmod(parent = mkinsub("SFO", "m1"), m1 = mkinsub("SFO"), use_of_ff = "max")
    #> Successfully compiled differential equation model from auto-generated C code.
    f.noweight <- mkinfit(SFO_SFO.ff, FOCUS_2006_D, quiet = TRUE)
    #> Warning: Observations with value of zero were removed from the data
    summary(f.noweight)
    #> mkin version used for fitting: 0.9.50.2 #> R version used for fitting: 4.0.0 -#> Date of fit: Tue May 12 15:29:53 2020 -#> Date of summary: Tue May 12 15:29:53 2020 +#> Date of fit: Tue May 12 19:10:18 2020 +#> Date of summary: Tue May 12 19:10:18 2020 #> #> Equations: #> d_parent/dt = - k_parent * parent @@ -640,7 +640,7 @@ Degradation Data. Environments 6(12) 124 #> #> Model predictions using solution type analytical #> -#> Fitted using 421 model solutions performed in 0.13 s +#> Fitted using 421 model solutions performed in 0.146 s #> #> Error model: Constant variance #> @@ -753,8 +753,8 @@ Degradation Data. Environments 6(12) 124 #> 120 m1 25.15 28.78984 -3.640e+00 #> 120 m1 33.31 28.78984 4.520e+00
    f.obs <- mkinfit(SFO_SFO.ff, FOCUS_2006_D, error_model = "obs", quiet = TRUE)
    #> Warning: Observations with value of zero were removed from the data
    summary(f.obs)
    #> mkin version used for fitting: 0.9.50.2 #> R version used for fitting: 4.0.0 -#> Date of fit: Tue May 12 15:29:53 2020 -#> Date of summary: Tue May 12 15:29:53 2020 +#> Date of fit: Tue May 12 19:10:19 2020 +#> Date of summary: Tue May 12 19:10:19 2020 #> #> Equations: #> d_parent/dt = - k_parent * parent @@ -890,8 +890,8 @@ Degradation Data. Environments 6(12) 124 #> 120 m1 25.15 28.80429 -3.654e+00 #> 120 m1 33.31 28.80429 4.506e+00
    f.tc <- mkinfit(SFO_SFO.ff, FOCUS_2006_D, error_model = "tc", quiet = TRUE)
    #> Warning: Observations with value of zero were removed from the data
    summary(f.tc)
    #> mkin version used for fitting: 0.9.50.2 #> R version used for fitting: 4.0.0 -#> Date of fit: Tue May 12 15:29:54 2020 -#> Date of summary: Tue May 12 15:29:54 2020 +#> Date of fit: Tue May 12 19:10:19 2020 +#> Date of summary: Tue May 12 19:10:19 2020 #> #> Equations: #> d_parent/dt = - k_parent * parent diff --git a/man/mkinfit.Rd b/man/mkinfit.Rd index 5a2b3e53..b8d44fba 100644 --- a/man/mkinfit.Rd +++ b/man/mkinfit.Rd @@ -94,12 +94,11 @@ differential equations is based on the spectral decomposition of the coefficient matrix in cases that this is possible. If set to "deSolve", a numerical ode solver from package \code{\link{deSolve}} is used. If set to "analytical", an analytical solution of the model is used. This is only -implemented for simple degradation experiments with only one state -variable, i.e. with no metabolites. The default is "auto", which uses -"analytical" if possible, otherwise "deSolve" if a compiler is present, -and "eigen" if no compiler is present and the model can be expressed using -eigenvalues and eigenvectors. This argument is passed on to the helper -function \code{\link{mkinpredict}}.} +implemented for relatively simple degradation models. The default is +"auto", which uses "analytical" if possible, otherwise "deSolve" if a +compiler is present, and "eigen" if no compiler is present and the model +can be expressed using eigenvalues and eigenvectors. This argument is +passed on to the helper function \code{\link{mkinpredict}}.} \item{method.ode}{The solution method passed via \code{\link{mkinpredict}} to \code{\link{ode}} in case the solution type is "deSolve". The default @@ -154,11 +153,9 @@ the error model. If the error model is "const", unweighted nonlinear least squares fitting ("OLS") is selected. If the error model is "obs", or "tc", the "d_3" algorithm is selected. -The algorithm "d_3" will directly minimize the negative log-likelihood and -\itemize{ -\item independently - also use the three step algorithm described below. The -fit with the higher likelihood is returned. -} +The algorithm "d_3" will directly minimize the negative log-likelihood +and independently also use the three step algorithm described below. +The fit with the higher likelihood is returned. The algorithm "direct" will directly minimize the negative log-likelihood. -- cgit v1.2.1