From ccc70e82af4ba435f0a71ba1ae4e0e92045c3852 Mon Sep 17 00:00:00 2001 From: Johannes Ranke Date: Fri, 5 May 2017 12:46:31 +0200 Subject: Static docs except articles rebuilt with current pkgdown --- docs/authors.html | 2 +- docs/index.html | 4 +- docs/news/index.html | 115 +++--- docs/reference/DFOP.solution.html | 55 ++- docs/reference/Extract.mmkin.html | 110 ++--- docs/reference/FOCUS_2006_DFOP_ref_A_to_B.html | 38 +- docs/reference/FOCUS_2006_FOMC_ref_A_to_F.html | 36 +- docs/reference/FOCUS_2006_HS_ref_A_to_F.html | 38 +- docs/reference/FOCUS_2006_SFO_ref_A_to_F.html | 34 +- docs/reference/FOCUS_2006_datasets.html | 28 +- docs/reference/FOMC.solution.html | 54 ++- docs/reference/HS.solution.html | 52 ++- docs/reference/IORE.solution.html | 42 +- docs/reference/SFO.solution.html | 38 +- docs/reference/SFORB.solution.html | 50 ++- docs/reference/add_err.html | 82 ++-- docs/reference/endpoints.html | 28 +- docs/reference/geometric_mean.html | 30 +- docs/reference/ilr.html | 30 +- docs/reference/index.html | 537 ++++++++++++++----------- docs/reference/mccall81_245T.html | 67 ++- docs/reference/mkin_long_to_wide.html | 48 ++- docs/reference/mkin_wide_to_long.html | 38 +- docs/reference/mkinds.html | 31 +- docs/reference/mkinerrmin.html | 49 ++- docs/reference/mkinfit.html | 524 ++++++++++++------------ docs/reference/mkinmod.html | 100 +++-- docs/reference/mkinparplot-4.png | Bin 5373 -> 5360 bytes docs/reference/mkinparplot.html | 28 +- docs/reference/mkinplot.html | 36 +- docs/reference/mkinpredict.html | 140 +++---- docs/reference/mkinresplot.html | 97 ++--- docs/reference/mkinsub.html | 60 +-- docs/reference/mmkin-15.png | Bin 0 -> 30012 bytes docs/reference/mmkin-17.png | Bin 0 -> 27062 bytes docs/reference/mmkin-19.png | Bin 0 -> 25359 bytes docs/reference/mmkin-21.png | Bin 0 -> 18905 bytes docs/reference/mmkin-23.png | Bin 0 -> 17039 bytes docs/reference/mmkin.html | 91 +++-- docs/reference/plot.mkinfit.html | 203 +++++----- docs/reference/plot.mmkin.html | 86 ++-- docs/reference/print.mkinds.html | 30 +- docs/reference/print.mkinmod.html | 33 +- docs/reference/schaefer07_complex_case.html | 40 +- docs/reference/summary.mkinfit.html | 104 +++-- docs/reference/synthetic_data_for_UBA.html | 83 ++-- docs/reference/transform_odeparms.html | 110 ++--- docs/reference/twa.html | 38 +- 48 files changed, 1882 insertions(+), 1557 deletions(-) create mode 100644 docs/reference/mmkin-15.png create mode 100644 docs/reference/mmkin-17.png create mode 100644 docs/reference/mmkin-19.png create mode 100644 docs/reference/mmkin-21.png create mode 100644 docs/reference/mmkin-23.png (limited to 'docs') diff --git a/docs/authors.html b/docs/authors.html index 6a5c2862..1bf46325 100644 --- a/docs/authors.html +++ b/docs/authors.html @@ -25,7 +25,7 @@ - + - @@ -167,13 +167,11 @@
  • Johannes Ranke
    Author, maintainer, copyright holder
  • All authors...
  • -

    Dev status

    - diff --git a/docs/news/index.html b/docs/news/index.html index 2e7f0e34..667c5c1f 100644 --- a/docs/news/index.html +++ b/docs/news/index.html @@ -25,12 +25,14 @@ - + + + @@ -70,6 +72,9 @@
  • Performance benefit by using compiled model definitions in mkin
  • +
  • + Calculation of time weighted average concentrations with mkin +
  • @@ -102,10 +107,10 @@

    - mkin 0.9.45.1 (2016-12-20)

    +mkin 0.9.45.1 (2016-12-20)

    - New features

    +New features
    • A twa function, calculating maximum time weighted average concentrations for the parent (SFO, FOMC and DFOP).
    @@ -113,10 +118,10 @@

    - mkin 0.9.45 (2016-12-08)

    +mkin 0.9.45 (2016-12-08)

    - Minor changes

    +Minor changes
    • plot.mkinfit and plot.mmkin: If the plotting device is tikz, LaTeX markup is being used for the chi2 error in the graphs.

    • Use pkgdown, the successor of staticdocs for generating static HTML documentation. Include example output and graphs also for dontrun sections.

    • @@ -126,10 +131,10 @@

    - mkin 0.9.44 (2016-06-29)

    +mkin 0.9.44 (2016-06-29)

    - Bug fixes

    +Bug fixes
    • The test test_FOMC_ill-defined failed on several architectures, so the test is now skipped
    @@ -137,10 +142,10 @@

    - mkin 0.9.43 (2016-06-28)

    +mkin 0.9.43 (2016-06-28)

    - Major changes

    +Major changes
    • The title was changed to Kinetic evaluations of chemical degradation data

    • plot.mkinfit: Add the possibility to show fits (and residual plots if requested) separately for the observed variables

    • @@ -152,7 +157,7 @@

    - Minor changes

    +Minor changes
    • Remove an outdated reference to the inline package in the compiled_models vignette

    • mkinfit: Do not error out in cases where the fit converges, but the Jacobian for the untransformed model cost can not be estimated. Give a warning instead and return NA for the t-test results.

    • @@ -164,7 +169,7 @@

    - Bug fixes

    +Bug fixes
    • endpoints: When the name of a substance degrading to a metabolite (e.g. a parent compound) used in the model formulation ended in the letter f, some rate parameters could be listed as formation fractions with mixed up names. These would also appear in the summary.

    • mkinfit: Check for all observed variables when checking if the user tried to fix formation fractions when fitting them using ilr transformation.

    • @@ -175,17 +180,17 @@

    - mkin 0.9.42 (2016-03-25)

    +mkin 0.9.42 (2016-03-25)

    - Major changes

    +Major changes
    • Add the argument from_max_mean to mkinfit, for fitting only the decline from the maximum observed value for models with a single observed variable

    - Minor changes

    +Minor changes
    • Add plots to compiled_models vignette

    • Give an explanatory error message when mkinmod fails due to a missing definition of a target variable

    • @@ -195,10 +200,10 @@

    - mkin 0.9-41 (2015-11-09)

    +mkin 0.9-41 (2015-11-09)

    - Minor changes

    +Minor changes
    • Add an R6 class mkinds representing datasets with a printing method

    • Add a printing method for mkinmod objects

    • @@ -208,7 +213,7 @@

    - Bug fixes

    +Bug fixes
    • print.summary.mkinfit(): Avoid an error that occurred when printing summaries generated with mkin versions before 0.9-36
    • @@ -217,10 +222,10 @@

    - mkin 0.9-40 (2015-07-21)

    +mkin 0.9-40 (2015-07-21)

    - Bug fixes

    +Bug fixes
    • endpoints(): For DFOP and SFORB models, where optimize() is used, make use of the fact that the DT50 must be between DT50_k1 and DT50_k2 (DFOP) or DT50_b1 and DT50_b2 (SFORB), as optimize() sometimes did not find the minimum. Likewise for finding DT90 values. Also fit on the log scale to make the function more efficient.
    • @@ -228,7 +233,7 @@

    - Internal changes

    +Internal changes
    • DESCRIPTION, NAMESPACE, R/*.R: Import (from) stats, graphics and methods packages, and qualify some function calls for non-base packages installed with R to avoid NOTES made by R CMD check –as-cran with upcoming R versions.
    • @@ -237,10 +242,10 @@

    - mkin 0.9-39 (2015-06-26)

    +mkin 0.9-39 (2015-06-26)

    - Major changes

    +Major changes
    • New function mmkin(): This function takes a character vector of model shorthand names, or alternatively a list of mkinmod models, as well as a list of dataset as main arguments. It returns a matrix of mkinfit objects, with a row for each model and a column for each dataset. A subsetting method with single brackets is available. Fitting the models in parallel using the parallel package is supported.

    • New function plot.mmkin(): Plots single-row or single-column mmkin objects including residual plots.

    • @@ -248,7 +253,7 @@

    - Bug fixes

    +Bug fixes
    • mkinparplot(): Fix the x axis scaling for rate constants and formation fractions that got confused by the introduction of the t-values of transformed parameters.
    • @@ -257,10 +262,10 @@

    - mkin 0.9-38 (2015-06-24)

    +mkin 0.9-38 (2015-06-24)

    - Minor changes

    +Minor changes
    • vignettes/compiled_models.html: Show the performance improvement factor actually obtained when building the vignette, as well as mkin version, some system info and the CPU model used for building the vignette.

    • GNUMakefile,vignettes/*: Clean up vignette generation and include table of contents in HTML vignettes.

    • @@ -268,7 +273,7 @@

    - Bug fixes

    +Bug fixes
    • mkinmod(): When generating the C code for the derivatives, only declare the time variable when it is needed and remove the ‘-W-no-unused-variable’ compiler flag as the C compiler used in the CRAN checks on Solaris does not know it.
    • @@ -277,10 +282,10 @@

    - mkin 0.9-36 (2015-06-21)

    +mkin 0.9-36 (2015-06-21)

    - Major changes

    +Major changes
    • summary.mkinfit(): A one-sided t-test for significant difference of untransformed parameters from zero is now always shown, based on the assumption of normal distribution for estimators of all untransformed parameters. Use with caution, as this assumption is unrealistic e.g. for rate constants in these nonlinear kinetic models.

    • If a compiler (gcc) is installed, use a version of the differential equation model compiled from C code, which is a huge performance boost for models where only the deSolve method works.

    • @@ -290,7 +295,7 @@

    - Minor changes

    +Minor changes
    • Added a simple showcase vignette with an evaluation of FOCUS example dataset D
    @@ -298,17 +303,17 @@

    - mkin 0.9-35 (2015-05-15)

    +mkin 0.9-35 (2015-05-15)

    - Major changes

    +Major changes
    • Switch from RUnit to testthat for testing

    - Bug fixes

    +Bug fixes
    • mkinparplot(): Avoid warnings that occurred when not all confidence intervals were available in the summary of the fit

    • print.summary.mkinfit(): Fix printing the summary for the case that the number of iterations is not available

    • @@ -318,7 +323,7 @@

    - New features

    +New features
    • mkinfit(): Report successful termination when quiet = FALSE. This is helpful for more difficult problems fitted with reweight.method = obs, as no progress is often indicated during the reweighting.

    • A first test using results established in the expertise written for the German Federal Environmental Agency (UBA) was added.

    • @@ -329,10 +334,10 @@

    - mkin 0.9-34 (2014-11-22)

    +mkin 0.9-34 (2014-11-22)

    - New features

    +New features
    • Add the convenience function mkinsub() for creating the lists used in mkinmod()

    • Add the possibility to fit indeterminate order rate equation (IORE) models using an analytical solution (parent only) or a numeric solution. Paths from IORE compounds to metabolites are supported when using formation fractions (use_of_ff = ‘max’). Note that the numerical solution (method.ode = ‘deSolve’) of the IORE differential equations sometimes fails due to numerical problems.

    • @@ -341,7 +346,7 @@

    - Minor changes

    +Minor changes
    • The formatting of differential equations in the summary was further improved

    • Always include 0 on y axis when plotting during the fit

    • @@ -350,10 +355,10 @@

    - mkin 0.9-33 (2014-10-22)

    +mkin 0.9-33 (2014-10-22)

    - New features

    +New features
    • The initial value (state.ini) for the observed variable with the highest observed residue is set to 100 in case it has no time zero observation and state.ini = "auto"

    • A basic unit test for mkinerrmin() was written

    • @@ -361,7 +366,7 @@

    - Bug fixes

    +Bug fixes
    • mkinfit(): The internally fitted parameter for g was named g_ilr even when transform_fractions=FALSE

    • mkinfit(): The initial value (state.ini) for the parent compound was not set when the parent was not the (only) variable with the highest value in the observed data.

    • @@ -371,7 +376,7 @@

    - Minor changes

    +Minor changes
    • The formatting of differential equations in the summary was improved by wrapping overly long lines

    • The FOCUS_Z vignette was rebuilt with the above improvement and using a width of 70 to avoid output outside of the grey area

    • @@ -382,10 +387,10 @@

    - mkin 0.9-32 (2014-07-24)

    +mkin 0.9-32 (2014-07-24)

    - New features

    +New features
    • The number of degrees of freedom is difficult to define in the case of ilr transformation of formation fractions. Now for each source compartment the number of ilr parameters (=number of optimised parameters) is divided by the number of pathways to metabolites (=number of affected data series) which leads to fractional degrees of freedom in some cases.

    • The default for the initial value for the first state value is now taken from the mean of the observations at time zero, if available.

    • @@ -397,7 +402,7 @@

    - Bug fixes

    +Bug fixes
    • Avoid plotting an artifical 0 residual at time zero in mkinresplot

    • In the determination of the degrees of freedom in mkinerrmin, formation fractions were accounted for multiple times in the case of parallel formation of metabolites. See the new feature described above for the solution.

    • @@ -408,7 +413,7 @@

    - Minor changes

    +Minor changes
    • Vignettes were rebuilt to reflect the changes in the summary method.

    • Algorithm Pseudo was excluded because it needs user-defined parameter limits which are not supported.

    • @@ -418,10 +423,10 @@

    - mkin 0.9-31 (2014-07-14)

    +mkin 0.9-31 (2014-07-14)

    - Bug fixes

    +Bug fixes
    • The internal renaming of optimised parameters in Version 0.9-30 led to errors in the determination of the degrees of freedom for the chi2 error level calulations in mkinerrmin() used by the summary function.
    @@ -429,17 +434,17 @@

    - mkin 0.9-30 (2014-07-11)

    +mkin 0.9-30 (2014-07-11)

    - New features

    +New features
    • It is now possible to use formation fractions in combination with turning off the sink in mkinmod().

    - Major changes

    +Major changes
    • The original and the transformed parameters now have different names (e.g. k_parent and log_k_parent. They also differ in how many they are when we have formation fractions but no pathway to sink.

    • The order of some of the information blocks in print.summary.mkinfit.R() has been ordered in a more logical way.

    • @@ -447,7 +452,7 @@

    - Minor changes

    +Minor changes
    • The vignette FOCUS_Z has been simplified to use formation fractions with turning off the sink, and slightly amended to use the new versions of DT50 values calculated since mkin 0.9-29.

    • All vignettes have been rebuilt so they reflect all changes.

    • @@ -460,7 +465,7 @@

    - mkin 0.9-29 (2014-06-27)

    +mkin 0.9-29 (2014-06-27)
    • R/mkinresplot.R: Make it possible to specify xlim

    • R/geometric_mean.R, man/geometric_mean.Rd: Add geometric mean function

    • @@ -469,7 +474,7 @@

    - mkin 0.9-28 (2014-05-20)

    +mkin 0.9-28 (2014-05-20)
    • Do not backtransform confidence intervals for formation fractions if more than one compound is formed, as such parameters only define the pathways as a set

    • Add historical remarks and some background to the main package vignette

    • @@ -478,7 +483,7 @@

    - mkin 0.9-27 (2014-05-10)

    +mkin 0.9-27 (2014-05-10)
    • Fork the GUI into a separate package gmkin

    • DESCRIPTION, NAMESPACE, TODO: Adapt and add copyright information

    • @@ -501,7 +506,7 @@

    - mkin 0.9-24 (2013-11-06)

    +mkin 0.9-24 (2013-11-06)
    • Bugfix re-enabling the fixing of any combination of initial values for state variables

    • Default values for kinetic rate constants are not all 0.1 any more but are “salted” with a small increment to avoid numeric artefacts with the eigenvalue based solutions

    • @@ -510,7 +515,7 @@

    - mkin 0.9-22 (2013-10-26)

    +mkin 0.9-22 (2013-10-26)
    • Get rid of the optimisation step in mkinerrmin - this was unnecessary. Thanks to KinGUII for the inspiration - actually this is equation 6-2 in FOCUS kinetics p. 91 that I had overlooked originally

    • Fix plot.mkinfit as it passed graphical arguments like main to the solver

    • diff --git a/docs/reference/DFOP.solution.html b/docs/reference/DFOP.solution.html index bad6dd57..3dbacdc1 100644 --- a/docs/reference/DFOP.solution.html +++ b/docs/reference/DFOP.solution.html @@ -6,8 +6,7 @@ - - — DFOP.solution • mkin +Double First-Order in Parallel kinetics — DFOP.solution • mkin @@ -26,12 +25,14 @@ - + + + @@ -71,6 +72,9 @@
    • Performance benefit by using compiled model definitions in mkin
    • +
    • + Calculation of time weighted average concentrations with mkin +
  • @@ -96,8 +100,7 @@
    @@ -105,23 +108,33 @@ of two exponential decline functions.

    -
    DFOP.solution(t, parent.0, k1, k2, g)
    +
    DFOP.solution(t, parent.0, k1, k2, g)

    Arguments

    -
    -
    t
    -
    Time.
    -
    parent.0
    -
    Starting value for the response variable at time zero.
    -
    k1
    -
    First kinetic constant.
    -
    k2
    -
    Second kinetic constant.
    -
    g
    -
    Fraction of the starting value declining according to the - first kinetic constant. -
    -
    + + + + + + + + + + + + + + + + + + + + + + +
    t

    Time.

    parent.0

    Starting value for the response variable at time zero.

    k1

    First kinetic constant.

    k2

    Second kinetic constant.

    g

    Fraction of the starting value declining according to the + first kinetic constant.

    Value

    @@ -133,7 +146,7 @@ Degradation Kinetics from Environmental Fate Studies on Pesticides in EU Registration” Report of the FOCUS Work Group on Degradation Kinetics, EC Document Reference Sanco/10058/2005 version 2.0, 434 pp, - http://focus.jrc.ec.europa.eu/dk

    + http://esdac.jrc.europa.eu/projects/degradation-kinetics

    Examples

    diff --git a/docs/reference/Extract.mmkin.html b/docs/reference/Extract.mmkin.html index 0131342a..135297cd 100644 --- a/docs/reference/Extract.mmkin.html +++ b/docs/reference/Extract.mmkin.html @@ -25,12 +25,14 @@ - + + + @@ -70,6 +72,9 @@
  • Performance benefit by using compiled model definitions in mkin
  • +
  • + Calculation of time weighted average concentrations with mkin +
  • @@ -102,23 +107,34 @@

    Subsetting method for mmkin objects.

    -
    # S3 method for mmkin
    +    
    # S3 method for mmkin
     [(x, i, j, ..., drop = FALSE)

    Arguments

    -
    -
    x
    -
    An mmkin object
    -
    i
    -
    Row index selecting the fits for specific models
    -
    j
    -
    Column index selecting the fits to specific datasets
    -
    ...
    -
    Not used, only there to satisfy the generic method definition
    -
    drop
    -
    If FALSE, the method always returns an mmkin object, otherwise either - a list of mkinfit objects or a single mkinfit object.
    -
    + + + + + + + + + + + + + + + + + + + + + + +
    x

    An mmkin object

    i

    Row index selecting the fits for specific models

    j

    Column index selecting the fits to specific datasets

    ...

    Not used, only there to satisfy the generic method definition

    drop

    If FALSE, the method always returns an mmkin object, otherwise either + a list of mkinfit objects or a single mkinfit object.

    Value

    @@ -132,23 +148,23 @@ fits["FOMC", ]
    #> dataset #> model B C #> FOMC List,42 List,42 -#> attr(,"class") -#> [1] "mmkin"
    fits[, "B"]
    #> dataset +#> attr(,"class") +#> [1] "mmkin"
    fits[, "B"]
    #> dataset #> model B #> SFO List,42 #> FOMC List,42 -#> attr(,"class") -#> [1] "mmkin"
    fits["SFO", "B"]
    #> dataset +#> attr(,"class") +#> [1] "mmkin"
    fits["SFO", "B"]
    #> dataset #> model B #> SFO List,42 -#> attr(,"class") -#> [1] "mmkin"
    +#> attr(,"class") +#> [1] "mmkin"
    head( # This extracts an mkinfit object with lots of components fits[["FOMC", "B"]] )
    #> $par #> parent_0 log_alpha log_beta -#> 99.666193 2.549849 5.050586 +#> 99.666192 2.549849 5.050586 #> #> $ssr #> [1] 28.58291 @@ -164,7 +180,7 @@ #> 25 78 #> #> $counts -#> [1] "both X-convergence and relative convergence (5)" +#> [1] "both X-convergence and relative convergence (5)" #>
    head( # The same can be achieved by @@ -188,7 +204,7 @@ #> 8 15 #> #> $counts -#> [1] "relative convergence (4)" +#> [1] "relative convergence (4)" #> #> $hessian #> parent_0 log_k_parent_sink @@ -223,7 +239,7 @@ #> [1] 6 #> #> $solution_type -#> [1] "analytical" +#> [1] "analytical" #> #> $transform_rates #> [1] TRUE @@ -232,17 +248,17 @@ #> [1] TRUE #> #> $method.modFit -#> [1] "Port" +#> [1] "Port" #> #> $maxit.modFit -#> [1] "auto" +#> [1] "auto" #> #> $calls #> [1] 29 #> #> $time #> user system elapsed -#> 0.068 0.000 0.066 +#> 0.064 0.000 0.063 #> #> $mkinmod #> <mkinmod> model generated with @@ -266,7 +282,7 @@ #> 8 parent 118 0.08 #> #> $obs_vars -#> [1] "parent" +#> [1] "parent" #> #> $predicted #> name time value @@ -380,9 +396,9 @@ #> $cost #> function (P) #> { -#> assign("calls", calls + 1, inherits = TRUE) +#> assign("calls", calls + 1, inherits = TRUE) #> if (trace_parms) -#> cat(P, "\n") +#> cat(P, "\n") #> if (length(state.ini.optim) > 0) { #> odeini <- c(P[1:length(state.ini.optim)], state.ini.fixed) #> names(odeini) <- c(state.ini.optim.boxnames, state.ini.fixed.boxnames) @@ -398,13 +414,13 @@ #> out <- mkinpredict(mkinmod, parms, odeini, outtimes, solution_type = solution_type, #> use_compiled = use_compiled, method.ode = method.ode, #> atol = atol, rtol = rtol, ...) -#> assign("out_predicted", out, inherits = TRUE) -#> mC <- modCost(out, observed, y = "value", err = err, weight = weight, +#> assign("out_predicted", out, inherits = TRUE) +#> mC <- modCost(out, observed, y = "value", err = err, weight = weight, #> scaleVar = scaleVar) #> if (mC$model < cost.old) { #> if (!quiet) -#> cat("Model cost at call ", calls, ": ", mC$model, -#> "\n") +#> cat("Model cost at call ", calls, ": ", mC$model, +#> "\n") #> if (plot) { #> outtimes_plot = seq(min(observed$time), max(observed$time), #> length.out = 100) @@ -412,9 +428,9 @@ #> solution_type = solution_type, use_compiled = use_compiled, #> method.ode = method.ode, atol = atol, rtol = rtol, #> ...) -#> plot(0, type = "n", xlim = range(observed$time), +#> plot(0, type = "n", xlim = range(observed$time), #> ylim = c(0, max(observed$value, na.rm = TRUE)), -#> xlab = "Time", ylab = "Observed") +#> xlab = "Time", ylab = "Observed") #> col_obs <- pch_obs <- 1:length(obs_vars) #> lty_obs <- rep(1, length(obs_vars)) #> names(col_obs) <- names(pch_obs) <- names(lty_obs) <- obs_vars @@ -424,14 +440,15 @@ #> } #> matlines(out_plot$time, out_plot[-1], col = col_obs, #> lty = lty_obs) -#> legend("topright", inset = c(0.05, 0.05), legend = obs_vars, +#> legend("topright", inset = c(0.05, 0.05), legend = obs_vars, #> col = col_obs, pch = pch_obs, lty = 1:length(pch_obs)) #> } -#> assign("cost.old", mC$model, inherits = TRUE) +#> assign("cost.old", mC$model, inherits = TRUE) #> } #> return(mC) #> } -#> <environment: 0x3b9eeb8> +#> <bytecode: 0x5554250> +#> <environment: 0x4eb4b18> #> #> $cost_notrans #> function (P) @@ -449,11 +466,12 @@ #> out <- mkinpredict(mkinmod, odeparms, odeini, outtimes, solution_type = solution_type, #> use_compiled = use_compiled, method.ode = method.ode, #> atol = atol, rtol = rtol, ...) -#> mC <- modCost(out, observed, y = "value", err = err, weight = weight, +#> mC <- modCost(out, observed, y = "value", err = err, weight = weight, #> scaleVar = scaleVar) #> return(mC) #> } -#> <environment: 0x3b9eeb8> +#> <bytecode: 0x5073868> +#> <environment: 0x4eb4b18> #> #> $hessian_notrans #> parent_0 k_parent_sink @@ -492,7 +510,7 @@ #> [1] 1e-10 #> #> $weight.ini -#> [1] "none" +#> [1] "none" #> #> $reweight.tol #> [1] 1e-08 @@ -516,10 +534,10 @@ #> 99.17407 #> #> $date -#> [1] "Wed Mar 15 09:44:44 2017" +#> [1] "Fri May 5 12:44:53 2017" #> -#> attr(,"class") -#> [1] "mkinfit" "modFit" +#> attr(,"class") +#> [1] "mkinfit" "modFit" #>
  • Performance benefit by using compiled model definitions in mkin
  • +
  • + Calculation of time weighted average concentrations with mkin +
  • @@ -96,8 +100,7 @@
    @@ -108,21 +111,20 @@ the initial concentration of the parent compound was fixed to a value of 100 in this fit.

    -
    data(FOCUS_2006_DFOP_ref_A_to_B)
    +
    data(FOCUS_2006_DFOP_ref_A_to_B)

    Format

    -

    A data frame containing the following variables. -

    -
    package
    a factor giving the name of the software package
    -
    M0
    The fitted initial concentration of the parent compound
    -
    f
    The fitted f parameter
    -
    k1
    The fitted k1 parameter
    -
    k2
    The fitted k2 parameter
    -
    DT50
    The resulting half-life of the parent compound
    -
    DT90
    The resulting DT90 of the parent compound
    -
    dataset
    The FOCUS dataset that was used
    -

    +

    A data frame containing the following variables.

    +
    package

    a factor giving the name of the software package

    +
    M0

    The fitted initial concentration of the parent compound

    +
    f

    The fitted f parameter

    +
    k1

    The fitted k1 parameter

    +
    k2

    The fitted k2 parameter

    +
    DT50

    The resulting half-life of the parent compound

    +
    DT90

    The resulting DT90 of the parent compound

    +
    dataset

    The FOCUS dataset that was used

    +

    Source

    @@ -130,7 +132,7 @@ in this fit.

    Degradation Kinetics from Environmental Fate Studies on Pesticides in EU Registration” Report of the FOCUS Work Group on Degradation Kinetics, EC Document Reference Sanco/10058/2005 version 2.0, 434 pp, - http://focus.jrc.ec.europa.eu/dk

    + http://esdac.jrc.europa.eu/projects/degradation-kinetics

    Examples

    diff --git a/docs/reference/FOCUS_2006_FOMC_ref_A_to_F.html b/docs/reference/FOCUS_2006_FOMC_ref_A_to_F.html index 5c9feb23..eec595f0 100644 --- a/docs/reference/FOCUS_2006_FOMC_ref_A_to_F.html +++ b/docs/reference/FOCUS_2006_FOMC_ref_A_to_F.html @@ -6,8 +6,7 @@ - - — FOCUS_2006_FOMC_ref_A_to_F • mkin +Results of fitting the FOMC model to Datasets A to F of FOCUS (2006) — FOCUS_2006_FOMC_ref_A_to_F • mkin @@ -26,12 +25,14 @@ - + + + @@ -71,6 +72,9 @@
  • Performance benefit by using compiled model definitions in mkin
  • +
  • + Calculation of time weighted average concentrations with mkin +
  • @@ -96,8 +100,7 @@
    @@ -108,20 +111,19 @@ the initial concentration of the parent compound was fixed to a value of 100 in this fit.

    -
    data(FOCUS_2006_FOMC_ref_A_to_F)
    +
    data(FOCUS_2006_FOMC_ref_A_to_F)

    Format

    -

    A data frame containing the following variables. -

    -
    package
    a factor giving the name of the software package
    -
    M0
    The fitted initial concentration of the parent compound
    -
    alpha
    The fitted alpha parameter
    -
    beta
    The fitted beta parameter
    -
    DT50
    The resulting half-life of the parent compound
    -
    DT90
    The resulting DT90 of the parent compound
    -
    dataset
    The FOCUS dataset that was used
    -

    +

    A data frame containing the following variables.

    +
    package

    a factor giving the name of the software package

    +
    M0

    The fitted initial concentration of the parent compound

    +
    alpha

    The fitted alpha parameter

    +
    beta

    The fitted beta parameter

    +
    DT50

    The resulting half-life of the parent compound

    +
    DT90

    The resulting DT90 of the parent compound

    +
    dataset

    The FOCUS dataset that was used

    +

    Source

    @@ -129,7 +131,7 @@ in this fit.

    Degradation Kinetics from Environmental Fate Studies on Pesticides in EU Registration” Report of the FOCUS Work Group on Degradation Kinetics, EC Document Reference Sanco/10058/2005 version 2.0, 434 pp, - http://focus.jrc.ec.europa.eu/dk

    + http://esdac.jrc.europa.eu/projects/degradation-kinetics

    Examples

    diff --git a/docs/reference/FOCUS_2006_HS_ref_A_to_F.html b/docs/reference/FOCUS_2006_HS_ref_A_to_F.html index 8ccbd86a..c2a90311 100644 --- a/docs/reference/FOCUS_2006_HS_ref_A_to_F.html +++ b/docs/reference/FOCUS_2006_HS_ref_A_to_F.html @@ -6,8 +6,7 @@ - - — FOCUS_2006_HS_ref_A_to_F • mkin +Results of fitting the HS model to Datasets A to F of FOCUS (2006) — FOCUS_2006_HS_ref_A_to_F • mkin @@ -26,12 +25,14 @@ - + + + @@ -71,6 +72,9 @@
  • Performance benefit by using compiled model definitions in mkin
  • +
  • + Calculation of time weighted average concentrations with mkin +
  • @@ -96,8 +100,7 @@
    @@ -108,21 +111,20 @@ the initial concentration of the parent compound was fixed to a value of 100 in this fit.

    -
    data(FOCUS_2006_HS_ref_A_to_F)
    +
    data(FOCUS_2006_HS_ref_A_to_F)

    Format

    -

    A data frame containing the following variables. -

    -
    package
    a factor giving the name of the software package
    -
    M0
    The fitted initial concentration of the parent compound
    -
    tb
    The fitted tb parameter
    -
    k1
    The fitted k1 parameter
    -
    k2
    The fitted k2 parameter
    -
    DT50
    The resulting half-life of the parent compound
    -
    DT90
    The resulting DT90 of the parent compound
    -
    dataset
    The FOCUS dataset that was used
    -

    +

    A data frame containing the following variables.

    +
    package

    a factor giving the name of the software package

    +
    M0

    The fitted initial concentration of the parent compound

    +
    tb

    The fitted tb parameter

    +
    k1

    The fitted k1 parameter

    +
    k2

    The fitted k2 parameter

    +
    DT50

    The resulting half-life of the parent compound

    +
    DT90

    The resulting DT90 of the parent compound

    +
    dataset

    The FOCUS dataset that was used

    +

    Source

    @@ -130,7 +132,7 @@ in this fit.

    Degradation Kinetics from Environmental Fate Studies on Pesticides in EU Registration” Report of the FOCUS Work Group on Degradation Kinetics, EC Document Reference Sanco/10058/2005 version 2.0, 434 pp, - http://focus.jrc.ec.europa.eu/dk

    + http://esdac.jrc.europa.eu/projects/degradation-kinetics

    Examples

    diff --git a/docs/reference/FOCUS_2006_SFO_ref_A_to_F.html b/docs/reference/FOCUS_2006_SFO_ref_A_to_F.html index 263b9b31..24070b9c 100644 --- a/docs/reference/FOCUS_2006_SFO_ref_A_to_F.html +++ b/docs/reference/FOCUS_2006_SFO_ref_A_to_F.html @@ -6,8 +6,7 @@ - - — FOCUS_2006_SFO_ref_A_to_F • mkin +Results of fitting the SFO model to Datasets A to F of FOCUS (2006) — FOCUS_2006_SFO_ref_A_to_F • mkin @@ -26,12 +25,14 @@ - + + + @@ -71,6 +72,9 @@
  • Performance benefit by using compiled model definitions in mkin
  • +
  • + Calculation of time weighted average concentrations with mkin +
  • @@ -96,8 +100,7 @@
    @@ -108,19 +111,18 @@ the initial concentration of the parent compound was fixed to a value of 100 in this fit.

    -
    data(FOCUS_2006_SFO_ref_A_to_F)
    +
    data(FOCUS_2006_SFO_ref_A_to_F)

    Format

    -

    A data frame containing the following variables. -

    -
    package
    a factor giving the name of the software package
    -
    M0
    The fitted initial concentration of the parent compound
    -
    k
    The fitted first-order degradation rate constant
    -
    DT50
    The resulting half-life of the parent compound
    -
    DT90
    The resulting DT90 of the parent compound
    -
    dataset
    The FOCUS dataset that was used
    -

    +

    A data frame containing the following variables.

    +
    package

    a factor giving the name of the software package

    +
    M0

    The fitted initial concentration of the parent compound

    +
    k

    The fitted first-order degradation rate constant

    +
    DT50

    The resulting half-life of the parent compound

    +
    DT90

    The resulting DT90 of the parent compound

    +
    dataset

    The FOCUS dataset that was used

    +

    Source

    @@ -128,7 +130,7 @@ in this fit.

    Degradation Kinetics from Environmental Fate Studies on Pesticides in EU Registration” Report of the FOCUS Work Group on Degradation Kinetics, EC Document Reference Sanco/10058/2005 version 2.0, 434 pp, - http://focus.jrc.ec.europa.eu/dk

    + http://esdac.jrc.europa.eu/projects/degradation-kinetics

    Examples

    diff --git a/docs/reference/FOCUS_2006_datasets.html b/docs/reference/FOCUS_2006_datasets.html index 71dbe761..93901bfa 100644 --- a/docs/reference/FOCUS_2006_datasets.html +++ b/docs/reference/FOCUS_2006_datasets.html @@ -6,8 +6,7 @@ - - — FOCUS_2006_datasets • mkin +Datasets A to F from the FOCUS Kinetics report from 2006 — FOCUS_2006_datasets • mkin @@ -26,12 +25,14 @@ - + + + @@ -71,6 +72,9 @@
  • Performance benefit by using compiled model definitions in mkin
  • +
  • + Calculation of time weighted average concentrations with mkin +
  • @@ -96,24 +100,22 @@

    Data taken from FOCUS (2006), p. 258.

    -
    FOCUS_2006_datasets
    +
    FOCUS_2006_datasets

    Format

    -

    6 datasets with observations on the following variables. -

    -
    name
    a factor containing the name of the observed variable
    -
    time
    a numeric vector containing time points
    -
    value
    a numeric vector containing concentrations in percent of applied radioactivity
    -

    +

    6 datasets with observations on the following variables.

    +
    name

    a factor containing the name of the observed variable

    +
    time

    a numeric vector containing time points

    +
    value

    a numeric vector containing concentrations in percent of applied radioactivity

    +

    Source

    @@ -121,7 +123,7 @@ Degradation Kinetics from Environmental Fate Studies on Pesticides in EU Registration” Report of the FOCUS Work Group on Degradation Kinetics, EC Document Reference Sanco/10058/2005 version 2.0, 434 pp, - http://focus.jrc.ec.europa.eu/dk

    + http://esdac.jrc.europa.eu/projects/degradation-kinetics

    Examples

    diff --git a/docs/reference/FOMC.solution.html b/docs/reference/FOMC.solution.html index 8d0ed869..67a37b4f 100644 --- a/docs/reference/FOMC.solution.html +++ b/docs/reference/FOMC.solution.html @@ -6,7 +6,7 @@ - First-Order Multi-Compartment kinetics — FOMC.solution • mkin +First-Order Multi-Compartment kinetics — FOMC.solution • mkin @@ -25,12 +25,14 @@ - + + + @@ -70,6 +72,9 @@
  • Performance benefit by using compiled model definitions in mkin
  • +
  • + Calculation of time weighted average concentrations with mkin +
  • @@ -95,35 +100,40 @@

    Function describing exponential decline from a defined starting value, with a decreasing rate constant.

    - -

    The form given here differs slightly from the original reference by Gustafson +

    The form given here differs slightly from the original reference by Gustafson and Holden (1990). The parameter beta corresponds to 1/beta in the original equation.

    -
    FOMC.solution(t, parent.0, alpha, beta)
    +
    FOMC.solution(t, parent.0, alpha, beta)

    Arguments

    -
    -
    t
    -
    Time.
    -
    parent.0
    -
    Starting value for the response variable at time zero.
    -
    alpha
    -
    - Shape parameter determined by coefficient of variation of rate constant - values.
    -
    beta
    -
    - Location parameter. -
    -
    + + + + + + + + + + + + + + + + + + +
    t

    Time.

    parent.0

    Starting value for the response variable at time zero.

    alpha

    Shape parameter determined by coefficient of variation of rate constant + values.

    beta

    Location parameter.

    Note

    @@ -142,8 +152,8 @@ Degradation Kinetics from Environmental Fate Studies on Pesticides in EU Registration” Report of the FOCUS Work Group on Degradation Kinetics, EC Document Reference Sanco/10058/2005 version 2.0, 434 pp, - http://focus.jrc.ec.europa.eu/dk

    -

    Gustafson DI and Holden LR (1990) Nonlinear pesticide dissipation in soil: A + http://esdac.jrc.europa.eu/projects/degradation-kinetics

    +

    Gustafson DI and Holden LR (1990) Nonlinear pesticide dissipation in soil: A new model based on spatial variability. Environmental Science and Technology 24, 1032-1038

    diff --git a/docs/reference/HS.solution.html b/docs/reference/HS.solution.html index b8e6f524..3d608a2f 100644 --- a/docs/reference/HS.solution.html +++ b/docs/reference/HS.solution.html @@ -6,7 +6,7 @@ - Hockey-Stick kinetics — HS.solution • mkin +Hockey-Stick kinetics — HS.solution • mkin @@ -25,12 +25,14 @@ - + + + @@ -70,6 +72,9 @@
  • Performance benefit by using compiled model definitions in mkin
  • +
  • + Calculation of time weighted average concentrations with mkin +
  • @@ -95,7 +100,7 @@
    @@ -103,23 +108,34 @@ between them.

    -
    HS.solution(t, parent.0, k1, k2, tb)
    +
    HS.solution(t, parent.0, k1, k2, tb)

    Arguments

    -
    -
    t
    -
    Time.
    -
    parent.0
    -
    Starting value for the response variable at time zero.
    -
    k1
    -
    First kinetic constant.
    -
    k2
    -
    Second kinetic constant.
    -
    tb
    -
    Break point. Before this time, exponential decline according + + + + + + + + + + + + + + + + + + + + + + +
    t

    Time.

    parent.0

    Starting value for the response variable at time zero.

    k1

    First kinetic constant.

    k2

    Second kinetic constant.

    tb

    Break point. Before this time, exponential decline according to k1 is calculated, after this time, exponential decline proceeds - according to k2. - + according to k2.

    Value

    @@ -131,7 +147,7 @@ Degradation Kinetics from Environmental Fate Studies on Pesticides in EU Registration” Report of the FOCUS Work Group on Degradation Kinetics, EC Document Reference Sanco/10058/2005 version 2.0, 434 pp, - http://focus.jrc.ec.europa.eu/dk

    + http://esdac.jrc.europa.eu/projects/degradation-kinetics

    Examples

    diff --git a/docs/reference/IORE.solution.html b/docs/reference/IORE.solution.html index 8caef574..4a95f106 100644 --- a/docs/reference/IORE.solution.html +++ b/docs/reference/IORE.solution.html @@ -6,7 +6,7 @@ - Indeterminate order rate equation kinetics — IORE.solution • mkin +Indeterminate order rate equation kinetics — IORE.solution • mkin @@ -25,12 +25,14 @@ - + + + @@ -70,6 +72,9 @@
  • Performance benefit by using compiled model definitions in mkin
  • +
  • + Calculation of time weighted average concentrations with mkin +
  • @@ -95,7 +100,7 @@
    @@ -103,19 +108,28 @@ a concentration dependent rate constant.

    -
    IORE.solution(t, parent.0, k__iore, N)
    +
    IORE.solution(t, parent.0, k__iore, N)

    Arguments

    -
    -
    t
    -
    Time.
    -
    parent.0
    -
    Starting value for the response variable at time zero.
    -
    k__iore
    -
    Rate constant. Note that this depends on the concentration units used.
    -
    N
    -
    Exponent describing the nonlinearity of the rate equation
    -
    + + + + + + + + + + + + + + + + + + +
    t

    Time.

    parent.0

    Starting value for the response variable at time zero.

    k__iore

    Rate constant. Note that this depends on the concentration units used.

    N

    Exponent describing the nonlinearity of the rate equation

    Note

    diff --git a/docs/reference/SFO.solution.html b/docs/reference/SFO.solution.html index e2c93102..08928135 100644 --- a/docs/reference/SFO.solution.html +++ b/docs/reference/SFO.solution.html @@ -6,7 +6,7 @@ - Single First-Order kinetics — SFO.solution • mkin +Single First-Order kinetics — SFO.solution • mkin @@ -25,12 +25,14 @@ - + + + @@ -70,6 +72,9 @@
  • Performance benefit by using compiled model definitions in mkin
  • +
  • + Calculation of time weighted average concentrations with mkin +
  • @@ -95,24 +100,31 @@

    Function describing exponential decline from a defined starting value.

    -
    SFO.solution(t, parent.0, k)
    +
    SFO.solution(t, parent.0, k)

    Arguments

    -
    -
    t
    -
    Time.
    -
    parent.0
    -
    Starting value for the response variable at time zero.
    -
    k
    -
    Kinetic constant.
    -
    + + + + + + + + + + + + + + +
    t

    Time.

    parent.0

    Starting value for the response variable at time zero.

    k

    Kinetic constant.

    Value

    @@ -124,7 +136,7 @@ Degradation Kinetics from Environmental Fate Studies on Pesticides in EU Registration” Report of the FOCUS Work Group on Degradation Kinetics, EC Document Reference Sanco/10058/2005 version 2.0, 434 pp, - http://focus.jrc.ec.europa.eu/dk

    + http://esdac.jrc.europa.eu/projects/degradation-kinetics

    Examples

    diff --git a/docs/reference/SFORB.solution.html b/docs/reference/SFORB.solution.html index 4a73ba9e..112e157d 100644 --- a/docs/reference/SFORB.solution.html +++ b/docs/reference/SFORB.solution.html @@ -6,7 +6,7 @@ - Single First-Order Reversible Binding kinetics — SFORB.solution • mkin +Single First-Order Reversible Binding kinetics — SFORB.solution • mkin @@ -25,12 +25,14 @@ - + + + @@ -70,6 +72,9 @@
  • Performance benefit by using compiled model definitions in mkin
  • +
  • + Calculation of time weighted average concentrations with mkin +
  • @@ -95,7 +100,7 @@
    @@ -106,21 +111,32 @@ no substance in the bound fraction.

    -
    SFORB.solution(t, parent.0, k_12, k_21, k_1output)
    +
    SFORB.solution(t, parent.0, k_12, k_21, k_1output)

    Arguments

    -
    -
    t
    -
    Time.
    -
    parent.0
    -
    Starting value for the response variable at time zero.
    -
    k_12
    -
    Kinetic constant describing transfer from free to bound.
    -
    k_21
    -
    Kinetic constant describing transfer from bound to free.
    -
    k_1output
    -
    Kinetic constant describing degradation of the free fraction.
    -
    + + + + + + + + + + + + + + + + + + + + + + +
    t

    Time.

    parent.0

    Starting value for the response variable at time zero.

    k_12

    Kinetic constant describing transfer from free to bound.

    k_21

    Kinetic constant describing transfer from bound to free.

    k_1output

    Kinetic constant describing degradation of the free fraction.

    Value

    @@ -133,7 +149,7 @@ Degradation Kinetics from Environmental Fate Studies on Pesticides in EU Registration” Report of the FOCUS Work Group on Degradation Kinetics, EC Document Reference Sanco/10058/2005 version 2.0, 434 pp, - http://focus.jrc.ec.europa.eu/dk

    + http://esdac.jrc.europa.eu/projects/degradation-kinetics

    Examples

    diff --git a/docs/reference/add_err.html b/docs/reference/add_err.html index aab42f56..c9e6bf3f 100644 --- a/docs/reference/add_err.html +++ b/docs/reference/add_err.html @@ -6,8 +6,7 @@ - - — add_err • mkin +Add normally distributed errors to simulated kinetic degradation data — add_err • mkin @@ -26,12 +25,14 @@ - + + + @@ -71,6 +72,9 @@
  • Performance benefit by using compiled model definitions in mkin
  • +
  • + Calculation of time weighted average concentrations with mkin +
  • @@ -96,8 +100,7 @@
    @@ -106,45 +109,46 @@ may depend on the predicted value and is specified as a standard deviation.

    -
    add_err(prediction, sdfunc,
    +    
    add_err(prediction, sdfunc,
               n = 1000, LOD = 0.1, reps = 2,
               digits = 1, seed = NA)

    Arguments

    -
    -
    prediction
    -
    - A prediction from a kinetic model as produced by mkinpredict. -
    -
    sdfunc
    -
    - A function taking the predicted value as its only argument and returning + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    prediction

    A prediction from a kinetic model as produced by mkinpredict.

    sdfunc

    A function taking the predicted value as its only argument and returning a standard deviation that should be used for generating the random error - terms for this value. - -

    n
    -
    - The number of datasets to be generated. -
    -
    LOD
    -
    - The limit of detection (LOD). Values that are below the LOD after adding - the random error will be set to NA. -
    -
    reps
    -
    - The number of replicates to be generated within the datasets. -
    -
    digits
    -
    - The number of digits to which the values will be rounded. -
    -
    seed
    -
    - The seed used for the generation of random numbers. If NA, the seed - is not set. -
    - + terms for this value.

    n

    The number of datasets to be generated.

    LOD

    The limit of detection (LOD). Values that are below the LOD after adding + the random error will be set to NA.

    reps

    The number of replicates to be generated within the datasets.

    digits

    The number of digits to which the values will be rounded.

    seed

    The seed used for the generation of random numbers. If NA, the seed + is not set.

    Value

    diff --git a/docs/reference/endpoints.html b/docs/reference/endpoints.html index 4145825a..c48854fd 100644 --- a/docs/reference/endpoints.html +++ b/docs/reference/endpoints.html @@ -6,8 +6,7 @@ - - — endpoints • mkin +Function to calculate endpoints for further use from kinetic models fitted with mkinfit — endpoints • mkin @@ -26,12 +25,14 @@ - + + + @@ -71,6 +72,9 @@
  • Performance benefit by using compiled model definitions in mkin
  • +
  • + Calculation of time weighted average concentrations with mkin +
  • @@ -96,8 +100,7 @@
    @@ -107,15 +110,16 @@ the Eigenvalues are returned. These are equivalent to the rate constantes of the with the advantage that the SFORB model can also be used for metabolites.

    -
    endpoints(fit)
    +
    endpoints(fit)

    Arguments

    -
    -
    fit
    -
    - An object of class mkinfit. -
    -
    + + + + + + +
    fit

    An object of class mkinfit.

    Note

    diff --git a/docs/reference/geometric_mean.html b/docs/reference/geometric_mean.html index 828ec471..22d06fec 100644 --- a/docs/reference/geometric_mean.html +++ b/docs/reference/geometric_mean.html @@ -6,7 +6,7 @@ - Calculate the geometric mean — geometric_mean • mkin +Calculate the geometric mean — geometric_mean • mkin @@ -25,12 +25,14 @@ - + + + @@ -70,6 +72,9 @@
  • Performance benefit by using compiled model definitions in mkin
  • +
  • + Calculation of time weighted average concentrations with mkin +
  • @@ -95,22 +100,27 @@

    Function calculating the geometric mean of numeric vectors

    -
    geometric_mean(x, na.rm = FALSE)
    +
    geometric_mean(x, na.rm = FALSE)

    Arguments

    -
    -
    x
    -
    A numeric vector
    -
    na.rm
    -
    Should NA values be ignored
    -
    + + + + + + + + + + +
    x

    A numeric vector

    na.rm

    Should NA values be ignored

    Value

    diff --git a/docs/reference/ilr.html b/docs/reference/ilr.html index 4262fa81..808bcdb7 100644 --- a/docs/reference/ilr.html +++ b/docs/reference/ilr.html @@ -6,8 +6,7 @@ - - — ilr • mkin +Function to perform isometric log-ratio transformation — ilr • mkin @@ -26,12 +25,14 @@ - + + + @@ -71,6 +72,9 @@
  • Performance benefit by using compiled model definitions in mkin
  • +
  • + Calculation of time weighted average concentrations with mkin +
  • @@ -96,25 +100,25 @@

    This implementation is a special case of the class of isometric log-ratio transformations.

    -
    ilr(x)
    +    
    ilr(x)
       invilr(x)

    Arguments

    -
    -
    x
    -
    - A numeric vector. Naturally, the forward transformation is only sensible for - vectors with all elements being greater than zero. -
    -
    + + + + + + +
    x

    A numeric vector. Naturally, the forward transformation is only sensible for + vectors with all elements being greater than zero.

    Value

    diff --git a/docs/reference/index.html b/docs/reference/index.html index 2e997ef0..16280a9d 100644 --- a/docs/reference/index.html +++ b/docs/reference/index.html @@ -25,12 +25,14 @@ - + + + @@ -70,6 +72,9 @@
  • Performance benefit by using compiled model definitions in mkin
  • +
  • + Calculation of time weighted average concentrations with mkin +
  • @@ -95,250 +100,302 @@
    -

    Main functions

    -

    Essential functionality

    - - -

    -

    - - -

    -

    - - -

    -

    - -

    Show results

    -

    Functions working with mkinfit objects

    - - -

    -

    - - -

    -

    - - -

    -

    - - -

    -

    - - -

    -

    - - -

    -

    - -

    Work with mmkin objects

    -

    Functions working with aggregated results

    - - -

    Subsetting method for mmkin objects

    - - -

    -

    - -

    Datasets and known results

    -

    - - -

    -

    - - -

    -

    - - -

    -

    - - -

    -

    - - -

    -

    - - -

    -

    - - -

    -

    - - -

    -

    - - -

    A dataset class for mkin

    - - -

    -

    - -

    Helper functions

    -

    - - -

    -

    - - -

    -

    - - -

    -

    - - -

    -

    - - -

    -

    - - -

    -

    - - -

    -

    - - -

    Calculate the geometric mean

    - -

    Analytical solutions

    -

    Parent only model solutions

    + - -

    Single First-Order kinetics

    - - -

    First-Order Multi-Compartment kinetics

    - - -

    -

    - - -

    Single First-Order Reversible Binding kinetics

    - - -

    Hockey-Stick kinetics

    - - -

    Indeterminate order rate equation kinetics

    - -

    Generate synthetic datasets

    -

    + + + + - -

    -

    - -

    Deprecated functions

    -

    Functions that have been superseeded

    - - -

    -

    - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +

    Main functions

    +

    Essential functionality

    +
    +

    mkinmod

    +

    Function to set up a kinetic model with one or more state variables

    +

    mkinfit

    +

    Fit a kinetic model to data with one or more state variables

    +

    mmkin

    +

    Fit one or more kinetic models with one or more state variables to one or more datasets

    +

    Show results

    +

    Functions working with mkinfit objects

    +
    +

    plot.mkinfit

    +

    Plot the observed data and the fitted model of an mkinfit object

    +

    summary print

    +

    Summary method for class "mkinfit"

    +

    mkinresplot

    +

    Function to plot residuals stored in an mkin object

    +

    mkinparplot

    +

    Function to plot the confidence intervals obtained using mkinfit

    +

    endpoints

    +

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

    +

    mkinerrmin

    +

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

    +

    Work with mmkin objects

    +

    Functions working with aggregated results

    +
    +

    plot

    +

    Plot model fits (observed and fitted) and the residuals for a row or column of an mmkin object

    +

    Datasets and known results

    +

    +
    +

    FOCUS_2006_datasets

    +

    Datasets A to F from the FOCUS Kinetics report from 2006

    +

    data

    +

    Results of fitting the SFO model to Datasets A to F of FOCUS (2006)

    +

    data

    +

    Results of fitting the FOMC model to Datasets A to F of FOCUS (2006)

    +

    data

    +

    Results of fitting the HS model to Datasets A to F of FOCUS (2006)

    +

    data

    +

    Results of fitting the DFOP model to Datasets A to B of FOCUS (2006)

    +

    mccall81_245T

    +

    Datasets on aerobic soil metabolism of 2,4,5-T in six soils

    +

    data

    +

    Metabolism data set used for checking the software quality of KinGUI

    +

    synthetic_data_for_UBA_2014

    +

    Synthetic datasets for one parent compound with two metabolites

    +

    mkinds

    +

    A dataset class for mkin

    +

    print

    +

    Print mkinds objects

    +

    Helper functions

    +

    +
    +

    mkin_wide_to_long

    +

    Convert a dataframe with observations over time into long format

    +

    mkin_long_to_wide

    +

    Convert a dataframe from long to wide format

    +

    mkinsub

    +

    Function to set up a kinetic submodel for one state variable

    +

    print

    +

    Print mkinmod objects

    +

    mkinpredict

    +

    Produce predictions from a kinetic model using specific parameters

    +

    transform_odeparms backtransform_odeparms

    +

    Functions to transform and backtransform kinetic parameters for fitting

    +

    ilr invilr

    +

    Function to perform isometric log-ratio transformation

    +

    geometric_mean

    +

    Calculate the geometric mean

    +

    Analytical solutions

    +

    Parent only model solutions

    +
    +

    SFO.solution

    +

    Single First-Order kinetics

    +

    FOMC.solution

    +

    First-Order Multi-Compartment kinetics

    +

    DFOP.solution

    +

    Double First-Order in Parallel kinetics

    +

    SFORB.solution

    +

    Single First-Order Reversible Binding kinetics

    +

    HS.solution

    +

    Hockey-Stick kinetics

    +

    IORE.solution

    +

    Indeterminate order rate equation kinetics

    +

    Generate synthetic datasets

    +

    +
    +

    add_err

    +

    Add normally distributed errors to simulated kinetic degradation data

    +

    Deprecated functions

    +

    Functions that have been superseeded

    +
    +

    mkinplot

    +

    Plot the observed data and the fitted model of an mkinfit object

    diff --git a/docs/reference/mccall81_245T.html b/docs/reference/mccall81_245T.html index 4fa32b30..9a681191 100644 --- a/docs/reference/mccall81_245T.html +++ b/docs/reference/mccall81_245T.html @@ -6,8 +6,7 @@ - - — mccall81_245T • mkin +Datasets on aerobic soil metabolism of 2,4,5-T in six soils — mccall81_245T • mkin @@ -26,12 +25,14 @@ - + + + @@ -71,6 +72,9 @@
  • Performance benefit by using compiled model definitions in mkin
  • +
  • + Calculation of time weighted average concentrations with mkin +
  • @@ -96,8 +100,7 @@
    @@ -106,21 +109,20 @@ extracts.

    -
    mccall81_245T
    +
    mccall81_245T

    Format

    -

    A dataframe containing the following variables. -

    -
    name
    the name of the compound observed. Note that T245 is used as +

    A dataframe containing the following variables.

    +
    name

    the name of the compound observed. Note that T245 is used as an acronym for 2,4,5-T. T245 is a legitimate object name in R, which is necessary for specifying models using - mkinmod.

    -
    time
    a numeric vector containing sampling times in days after - treatment
    -
    value
    a numeric vector containing concentrations in percent of applied radioactivity
    -
    soil
    a factor containing the name of the soil
    -

    + mkinmod.

    +
    time

    a numeric vector containing sampling times in days after + treatment

    +
    value

    a numeric vector containing concentrations in percent of applied radioactivity

    +
    soil

    a factor containing the name of the soil

    +

    Source

    @@ -132,16 +134,11 @@
    SFO_SFO_SFO <- mkinmod(T245 = list(type = "SFO", to = "phenol"), phenol = list(type = "SFO", to = "anisole"), anisole = list(type = "SFO"))
    #> Successfully compiled differential equation model from auto-generated C code.
    - fit.1 <- mkinfit(SFO_SFO_SFO, subset(mccall81_245T, soil == "Commerce"), quiet = TRUE)
    #> Warning: Optimisation by method Port did not converge. -#> Convergence code is 1
    summary(fit.1, data = FALSE)
    #> mkin version: 0.9.45.1 -#> R version: 3.3.3 -#> Date of fit: Wed Mar 15 09:44:52 2017 -#> Date of summary: Wed Mar 15 09:44:52 2017 -#> -#> -#> Warning: Optimisation by method Port did not converge. -#> Convergence code is 1 -#> + fit.1 <- mkinfit(SFO_SFO_SFO, subset(mccall81_245T, soil == "Commerce"), quiet = TRUE) + summary(fit.1, data = FALSE)
    #> mkin version: 0.9.45.2 +#> R version: 3.4.0 +#> Date of fit: Fri May 5 12:45:02 2017 +#> Date of summary: Fri May 5 12:45:02 2017 #> #> Equations: #> d_T245/dt = - k_T245_sink * T245 - k_T245_phenol * T245 @@ -151,7 +148,7 @@ #> #> Model predictions using solution type deSolve #> -#> Fitted with method Port using 590 model solutions performed in 3.519 s +#> Fitted with method Port using 612 model solutions performed in 3.576 s #> #> Weighting: none #> @@ -183,7 +180,7 @@ #> T245_0 103.9000 NA NA NA #> log_k_T245_sink -4.1130 NA NA NA #> log_k_T245_phenol -3.6120 NA NA NA -#> log_k_phenol_sink -26.3900 NA NA NA +#> log_k_phenol_sink -26.8400 NA NA NA #> log_k_phenol_anisole -0.9037 NA NA NA #> log_k_anisole_sink -5.0090 NA NA NA #> @@ -198,8 +195,8 @@ #> Estimate t value Pr(>t) Lower Upper #> T245_0 1.039e+02 4.282e+01 7.236e-20 NA NA #> k_T245_sink 1.636e-02 8.901e-01 1.926e-01 NA NA -#> k_T245_phenol 2.701e-02 1.504e+00 7.498e-02 NA NA -#> k_phenol_sink 3.457e-12 1.230e-11 5.000e-01 NA NA +#> k_T245_phenol 2.701e-02 1.504e+00 7.499e-02 NA NA +#> k_phenol_sink 2.212e-12 7.870e-12 5.000e-01 NA NA #> k_phenol_anisole 4.051e-01 2.518e+00 1.075e-02 NA NA #> k_anisole_sink 6.679e-03 8.146e+00 9.469e-08 NA NA #> @@ -214,7 +211,7 @@ #> ff #> T245_sink 3.772e-01 #> T245_phenol 6.228e-01 -#> phenol_sink 8.534e-12 +#> phenol_sink 5.462e-12 #> phenol_anisole 1.000e+00 #> anisole_sink 1.000e+00 #> @@ -228,10 +225,10 @@ fit.2 <- mkinfit(SFO_SFO_SFO, subset(mccall81_245T, soil == "Commerce"), parms.ini = c(k_phenol_sink = 0), fixed_parms = "k_phenol_sink", quiet = TRUE) - summary(fit.2, data = FALSE)
    #> mkin version: 0.9.45.1 -#> R version: 3.3.3 -#> Date of fit: Wed Mar 15 09:44:54 2017 -#> Date of summary: Wed Mar 15 09:44:54 2017 + summary(fit.2, data = FALSE)
    #> mkin version: 0.9.45.2 +#> R version: 3.4.0 +#> Date of fit: Fri May 5 12:45:04 2017 +#> Date of summary: Fri May 5 12:45:04 2017 #> #> Equations: #> d_T245/dt = - k_T245_sink * T245 - k_T245_phenol * T245 @@ -241,7 +238,7 @@ #> #> Model predictions using solution type deSolve #> -#> Fitted with method Port using 246 model solutions performed in 1.449 s +#> Fitted with method Port using 246 model solutions performed in 1.461 s #> #> Weighting: none #> diff --git a/docs/reference/mkin_long_to_wide.html b/docs/reference/mkin_long_to_wide.html index 9b37726e..8d6432ae 100644 --- a/docs/reference/mkin_long_to_wide.html +++ b/docs/reference/mkin_long_to_wide.html @@ -6,8 +6,7 @@ - - — mkin_long_to_wide • mkin +Convert a dataframe from long to wide format — mkin_long_to_wide • mkin @@ -26,12 +25,14 @@ - + + + @@ -71,6 +72,9 @@
  • Performance benefit by using compiled model definitions in mkin
  • +
  • + Calculation of time weighted average concentrations with mkin +
  • @@ -96,8 +100,7 @@
    @@ -106,25 +109,26 @@ dependent variables as columns.

    -
    mkin_long_to_wide(long_data, time = "time", outtime = "time")
    +
    mkin_long_to_wide(long_data, time = "time", outtime = "time")

    Arguments

    -
    -
    long_data
    -
    - The dataframe must contain one variable called "time" with the time values specified by the - time argument, one column called "name" with the grouping of the observed values, and - finally one column of observed values called "value". -
    -
    time
    -
    - The name of the time variable in the long input data. -
    -
    outtime
    -
    - The name of the time variable in the wide output data. -
    -
    + + + + + + + + + + + + + + +
    long_data

    The dataframe must contain one variable called "time" with the time values specified by the + time argument, one column called "name" with the grouping of the observed values, and + finally one column of observed values called "value".

    time

    The name of the time variable in the long input data.

    outtime

    The name of the time variable in the wide output data.

    Value

    diff --git a/docs/reference/mkin_wide_to_long.html b/docs/reference/mkin_wide_to_long.html index 378d3691..fbb079be 100644 --- a/docs/reference/mkin_wide_to_long.html +++ b/docs/reference/mkin_wide_to_long.html @@ -6,8 +6,7 @@ - - — mkin_wide_to_long • mkin +Convert a dataframe with observations over time into long format — mkin_wide_to_long • mkin @@ -26,12 +25,14 @@ - + + + @@ -71,6 +72,9 @@
  • Performance benefit by using compiled model definitions in mkin
  • +
  • + Calculation of time weighted average concentrations with mkin +
  • @@ -96,8 +100,7 @@
    @@ -105,20 +108,21 @@ dependent variable and converts it into the long form as required by modCost.

    -
    mkin_wide_to_long(wide_data, time = "t")
    +
    mkin_wide_to_long(wide_data, time = "t")

    Arguments

    -
    -
    wide_data
    -
    - The dataframe must contain one variable with the time values specified by the - time argument and usually more than one column of observed values. -
    -
    time
    -
    - The name of the time variable. -
    -
    + + + + + + + + + + +
    wide_data

    The dataframe must contain one variable with the time values specified by the + time argument and usually more than one column of observed values.

    time

    The name of the time variable.

    Value

    diff --git a/docs/reference/mkinds.html b/docs/reference/mkinds.html index 4bfd332b..1c10c54a 100644 --- a/docs/reference/mkinds.html +++ b/docs/reference/mkinds.html @@ -25,12 +25,14 @@ - + + + @@ -70,6 +72,9 @@
  • Performance benefit by using compiled model definitions in mkin
  • +
  • + Calculation of time weighted average concentrations with mkin +
  • @@ -102,7 +107,7 @@

    A dataset class for mkin

    -
    mkinds
    +
    mkinds

    Format

    @@ -110,17 +115,17 @@

    Fields

    -

    -

    -
    title
    A full title for the dataset

    -

    sampling
    times The sampling times

    -

    time_unit
    The time unit

    -

    observed
    Names of the observed compounds

    -

    unit
    The unit of the observations

    -

    replicates
    The number of replicates

    -

    data
    A dataframe with at least the columns name, time and value -in order to be compatible with mkinfit
    -

    + +
    +
    title

    A full title for the dataset

    +
    sampling

    times The sampling times

    +
    time_unit

    The time unit

    +
    observed

    Names of the observed compounds

    +
    unit

    The unit of the observations

    +
    replicates

    The number of replicates

    +
    data

    A dataframe with at least the columns name, time and value +in order to be compatible with mkinfit

    +

    Examples

    diff --git a/docs/reference/mkinerrmin.html b/docs/reference/mkinerrmin.html index 97616a41..678750cd 100644 --- a/docs/reference/mkinerrmin.html +++ b/docs/reference/mkinerrmin.html @@ -6,8 +6,7 @@ - - — mkinerrmin • mkin +Calculate the minimum error to assume in order to pass the variance test — mkinerrmin • mkin @@ -26,12 +25,14 @@ - + + + @@ -71,6 +72,9 @@
  • Performance benefit by using compiled model definitions in mkin
  • +
  • + Calculation of time weighted average concentrations with mkin +
  • @@ -96,8 +100,7 @@
    @@ -105,25 +108,33 @@ chi-squared test as defined in the FOCUS kinetics report from 2006.

    -
    mkinerrmin(fit, alpha = 0.05)
    +
    mkinerrmin(fit, alpha = 0.05)

    Arguments

    -
    -
    fit
    -
    - an object of class mkinfit. -
    -
    alpha
    -
    - The confidence level chosen for the chi-squared test. -
    -
    + + + + + + + + + + +
    fit

    an object of class mkinfit.

    alpha

    The confidence level chosen for the chi-squared test.

    Value

    A dataframe with the following components:

    -

    The dataframe has one row for the total dataset and one further row for - each observed state variable in the model.

    +
    err.min

    The relative error, expressed as a fraction.

    +
    n.optim

    The number of optimised parameters attributed to the data series.

    +
    df

    The number of remaining degrees of freedom for the chi2 error level + calculations. Note that mean values are used for the chi2 statistic and + therefore every time point with observed values in the series only counts + one time.

    + The dataframe has one row for the total dataset and one further row for + each observed state variable in the model. +

    Details

    @@ -135,7 +146,7 @@ chi-squared test as defined in the FOCUS kinetics report from 2006.

    Degradation Kinetics from Environmental Fate Studies on Pesticides in EU Registration” Report of the FOCUS Work Group on Degradation Kinetics, EC Document Reference Sanco/10058/2005 version 2.0, 434 pp, - http://focus.jrc.ec.europa.eu/dk

    + http://esdac.jrc.europa.eu/projects/degradation-kinetics

    Examples

    diff --git a/docs/reference/mkinfit.html b/docs/reference/mkinfit.html index 01c930e2..875bd1dd 100644 --- a/docs/reference/mkinfit.html +++ b/docs/reference/mkinfit.html @@ -6,8 +6,7 @@ - - — mkinfit • mkin +Fit a kinetic model to data with one or more state variables — mkinfit • mkin @@ -26,12 +25,14 @@ - + + + @@ -71,6 +72,9 @@
  • Performance benefit by using compiled model definitions in mkin
  • +
  • + Calculation of time weighted average concentrations with mkin +
  • @@ -96,8 +100,7 @@
    @@ -111,10 +114,10 @@ In each step of the optimsation, the kinetic model is solved using the function mkinpredict. The variance of the residuals for each observed variable can optionally be iteratively reweighted until convergence - using the argument reweight.method = "obs".

    + using the argument reweight.method = "obs".

    -
    mkinfit(mkinmod, observed,
    +    
    mkinfit(mkinmod, observed,
       parms.ini = "auto",
       state.ini = "auto",
       fixed_parms = NULL, fixed_initials = names(mkinmod$diffs)[-1],
    @@ -135,228 +138,225 @@
       trace_parms = FALSE, ...)

    Arguments

    -
    -
    mkinmod
    -
    - A list of class mkinmod, containing the kinetic model to be - fitted to the data, or one of the shorthand names ("SFO", "FOMC", "DFOP", - "HS", "SFORB"). If a shorthand name is given, a parent only degradation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    mkinmod

    A list of class mkinmod, containing the kinetic model to be + fitted to the data, or one of the shorthand names ("SFO", "FOMC", "DFOP", + "HS", "SFORB"). If a shorthand name is given, a parent only degradation model is generated for the variable with the highest value in - observed. - -

    observed
    -
    - The observed data. It has to be in the long format as described in - modFit, i.e. the first column called "name" must contain the + observed.

    observed

    The observed data. It has to be in the long format as described in + modFit, i.e. the first column called "name" must contain the name of the observed variable for each data point. The second column must - contain the times of observation, named "time". The third column must be - named "value" and contain the observed values. Optionally, a further column + contain the times of observation, named "time". The third column must be + named "value" and contain the observed values. Optionally, a further column can contain weights for each data point. Its name must be passed as a further argument named err which is then passed on to - modFit. - -

    parms.ini
    -
    - A named vector of initial values for the parameters, including parameters + modFit.

    parms.ini

    A named vector of initial values for the parameters, including parameters to be optimised and potentially also fixed parameters as indicated by - fixed_parms. If set to "auto", initial values for rate constants + fixed_parms. If set to "auto", initial values for rate constants are set to default values. Using parameter names that are not in the model - gives an error. - - It is possible to only specify a subset of the parameters that the model - needs. You can use the parameter lists "bparms.ode" from a previously + gives an error.

    +

    It is possible to only specify a subset of the parameters that the model + needs. You can use the parameter lists "bparms.ode" from a previously fitted model, which contains the differential equation parameters from this model. This works nicely if the models are nested. An example is given - below. - -

    state.ini
    -
    - A named vector of initial values for the state variables of the model. In + below.

    state.ini

    A named vector of initial values for the state variables of the model. In case the observed variables are represented by more than one model variable, the names will differ from the names of the observed variables (see map component of mkinmod). The default is to set the initial value of the first model variable to the mean of the time zero values for the variable with the maximum observed value, and all others to 0. - If this variable has no time zero observations, its initial value is set to 100. - -

    fixed_parms
    -
    - The names of parameters that should not be optimised but rather kept at the - values specified in parms.ini. -
    -
    fixed_initials
    -
    - The names of model variables for which the initial state at time 0 should + If this variable has no time zero observations, its initial value is set to 100.

    fixed_parms

    The names of parameters that should not be optimised but rather kept at the + values specified in parms.ini.

    fixed_initials

    The names of model variables for which the initial state at time 0 should be excluded from the optimisation. Defaults to all state variables except - for the first one. - -

    from_max_mean
    -
    - If this is set to TRUE, and the model has only one observed variable, then + for the first one.

    from_max_mean

    If this is set to TRUE, and the model has only one observed variable, then data before the time of the maximum observed value (after averaging for each sampling time) are discarded, and this time is subtracted from all remaining time values, so the time of the maximum observed mean value is - the new time zero. - -

    solution_type
    -
    - If set to "eigen", the solution of the system of differential equations is + the new time zero.

    solution_type

    If set to "eigen", the solution of the system of 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 + 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 "eigen" if the model can be expressed using eigenvalues and - eigenvectors, and finally "deSolve" for the remaining models (time + metabolites. The default is "auto", which uses "analytical" if possible, + otherwise "eigen" if the model can be expressed using eigenvalues and + eigenvectors, and finally "deSolve" for the remaining models (time dependence of degradation rates and metabolites). This argument is passed - on to the helper function mkinpredict. - -

    method.ode
    -
    - The solution method passed via mkinpredict to - ode in case the solution type is "deSolve". The default - "lsoda" is performant, but sometimes fails to converge. -
    -
    use_compiled
    -
    - If set to FALSE, no compiled version of the mkinmod + on to the helper function mkinpredict.

    method.ode

    The solution method passed via mkinpredict to + ode in case the solution type is "deSolve". The default + "lsoda" is performant, but sometimes fails to converge.

    use_compiled

    If set to FALSE, no compiled version of the mkinmod model is used, in the calls to mkinpredict even if - a compiled verion is present. - -

    method.modFit
    -
    - The optimisation method passed to modFit. - - In order to optimally deal with problems where local minima occur, the - "Port" algorithm is now used per default as it is less prone to get trapped + a compiled verion is present.

    method.modFit

    The optimisation method passed to modFit.

    +

    In order to optimally deal with problems where local minima occur, the + "Port" algorithm is now used per default as it is less prone to get trapped in local minima and depends less on starting values for parameters than - the Levenberg Marquardt variant selected by "Marq". However, "Port" needs - more iterations. - - The former default "Marq" is the Levenberg Marquardt algorithm + the Levenberg Marquardt variant selected by "Marq". However, "Port" needs + more iterations.

    +

    The former default "Marq" is the Levenberg Marquardt algorithm nls.lm from the package minpack.lm and usually needs - the least number of iterations. - - The "Pseudo" algorithm is not included because it needs finite parameter bounds - which are currently not supported. - - The "Newton" algorithm is not included because its number of iterations + the least number of iterations.

    +

    The "Pseudo" algorithm is not included because it needs finite parameter bounds + which are currently not supported.

    +

    The "Newton" algorithm is not included because its number of iterations can not be controlled by control.modFit and it does not appear - to provide advantages over the other algorithms. - -

    maxit.modFit
    -
    - Maximum number of iterations in the optimisation. If not "auto", this will + to provide advantages over the other algorithms.

    maxit.modFit

    Maximum number of iterations in the optimisation. If not "auto", this will be passed to the method called by modFit, overriding - what may be specified in the next argument control.modFit. - -

    control.modFit
    -
    - Additional arguments passed to the optimisation method used by - modFit. -
    -
    transform_rates
    -
    - Boolean specifying if kinetic rate constants should be transformed in the + what may be specified in the next argument control.modFit.

    control.modFit

    Additional arguments passed to the optimisation method used by + modFit.

    transform_rates

    Boolean specifying if kinetic rate constants should be transformed in the model specification used in the fitting for better compliance with the assumption of normal distribution of the estimator. If TRUE, also alpha and beta parameters of the FOMC model are log-transformed, as well as k1 and k2 rate constants for the DFOP and HS models and the break point tb of the HS model. - If FALSE, zero is used as a lower bound for the rates in the optimisation. - -

    transform_fractions
    -
    - Boolean specifying if formation fractions constants should be transformed in the + If FALSE, zero is used as a lower bound for the rates in the optimisation.

    transform_fractions

    Boolean specifying if formation fractions constants should be transformed in the model specification used in the fitting for better compliance with the assumption of normal distribution of the estimator. The default (TRUE) is to do transformations. If TRUE, the g parameter of the DFOP and HS models are also transformed, as they can also be seen as compositional data. The transformation used for these transformations is the - ilr transformation. - -

    plot
    -
    - Should the observed values and the numerical solutions be plotted at each - stage of the optimisation? -
    -
    quiet
    -
    - Suppress printing out the current model cost after each improvement? -
    -
    err
    -
    either NULL, or the name of the column with the + ilr transformation.

    plot

    Should the observed values and the numerical solutions be plotted at each + stage of the optimisation?

    quiet

    Suppress printing out the current model cost after each improvement?

    err

    either NULL, or the name of the column with the error estimates, used to weigh the residuals (see details of - modCost); if NULL, then the residuals are not weighed. - -

    weight
    -
    - only if err=NULL: how to weight the residuals, one of "none", - "std", "mean", see details of modCost. -
    -
    scaleVar
    -
    - Will be passed to modCost. Default is not to scale Variables - according to the number of observations. -
    -
    atol
    -
    - Absolute error tolerance, passed to ode. Default is 1e-8, - lower than in lsoda. -
    -
    rtol
    -
    - Absolute error tolerance, passed to ode. Default is 1e-10, - much lower than in lsoda. -
    -
    n.outtimes
    -
    - The length of the dataseries that is produced by the model prediction + modCost); if NULL, then the residuals are not weighed.

    weight

    only if err=NULL: how to weight the residuals, one of "none", + "std", "mean", see details of modCost.

    scaleVar

    Will be passed to modCost. Default is not to scale Variables + according to the number of observations.

    atol

    Absolute error tolerance, passed to ode. Default is 1e-8, + lower than in lsoda.

    rtol

    Absolute error tolerance, passed to ode. Default is 1e-10, + much lower than in lsoda.

    n.outtimes

    The length of the dataseries that is produced by the model prediction function mkinpredict. This impacts the accuracy of the numerical solver if that is used (see solution_type argument. - The default value is 100. - -

    reweight.method
    -
    - The method used for iteratively reweighting residuals, also known + The default value is 100.

    reweight.method

    The method used for iteratively reweighting residuals, also known as iteratively reweighted least squares (IRLS). Default is NULL, - the other method implemented is called "obs", meaning that each + the other method implemented is called "obs", meaning that each observed variable is assumed to have its own variance, this is estimated from the fit and used for weighting the residuals in each iteration until convergence of this estimate up to reweight.tol or up to the maximum number of iterations - specified by reweight.max.iter. - -

    reweight.tol
    -
    - Tolerance for convergence criterion for the variance components - in IRLS fits. -
    -
    reweight.max.iter
    -
    - Maximum iterations in IRLS fits. -
    -
    trace_parms
    -
    - Should a trace of the parameter values be listed? -
    -
    -
    - Further arguments that will be passed to modFit. -
    - + specified by reweight.max.iter.

    reweight.tol

    Tolerance for convergence criterion for the variance components + in IRLS fits.

    reweight.max.iter

    Maximum iterations in IRLS fits.

    trace_parms

    Should a trace of the parameter values be listed?

    Further arguments that will be passed to modFit.

    Value

    -

    A list with "mkinfit" and "modFit" in the class attribute. +

    A list with "mkinfit" and "modFit" in the class attribute. A summary can be obtained by summary.mkinfit.

    See also

    Plotting methods plot.mkinfit and mkinparplot.

    -

    Fitting of several models to several datasets in a single call to +

    Fitting of several models to several datasets in a single call to mmkin.

    Note

    @@ -368,8 +368,8 @@

    Note

    -

    When using the "IORE" submodel for metabolites, fitting with - "transform_rates = TRUE" (the default) often leads to failures of the +

    When using the "IORE" submodel for metabolites, fitting with + "transform_rates = TRUE" (the default) often leads to failures of the numerical ODE solver. In this situation it may help to switch off the internal rate transformation.

    @@ -377,17 +377,17 @@

    Examples

    # Use shorthand notation for parent only degradation fit <- mkinfit("FOMC", FOCUS_2006_C, quiet = TRUE) -summary(fit)
    #> mkin version: 0.9.45.1 -#> R version: 3.3.3 -#> Date of fit: Wed Mar 15 09:44:56 2017 -#> Date of summary: Wed Mar 15 09:44:56 2017 +summary(fit)
    #> mkin version: 0.9.45.2 +#> R version: 3.4.0 +#> Date of fit: Fri May 5 12:45:06 2017 +#> Date of summary: Fri May 5 12:45:06 2017 #> #> Equations: #> d_parent/dt = - (alpha/beta) * 1/((time/beta) + 1) * parent #> #> Model predictions using solution type analytical #> -#> Fitted with method Port using 64 model solutions performed in 0.146 s +#> Fitted with method Port using 64 model solutions performed in 0.206 s #> #> Weighting: none #> @@ -456,7 +456,7 @@ m1 = mkinsub("SFO"))
    #> Successfully compiled differential equation model from auto-generated C code.
    # Fit the model to the FOCUS example dataset D using defaults print(system.time(fit <- mkinfit(SFO_SFO, FOCUS_2006_D, solution_type = "eigen", quiet = TRUE)))
    #> user system elapsed -#> 1.216 1.268 0.942
    coef(fit)
    #> parent_0 log_k_parent_sink log_k_parent_m1 log_k_m1_sink +#> 0.912 0.000 0.915
    coef(fit)
    #> parent_0 log_k_parent_sink log_k_parent_m1 log_k_m1_sink #> 99.59848 -3.03822 -2.98030 -5.24750
    #> $ff #> parent_sink parent_m1 m1_sink #> 0.485524 0.514476 1.000000 @@ -485,13 +485,13 @@ #> Model cost at call 33 : 874.2611 #> Model cost at call 35 : 616.2379 #> Model cost at call 37 : 616.2374 -#> Model cost at call 40 : 467.4388 +#> Model cost at call 40 : 467.4387 #> Model cost at call 42 : 467.4382 -#> Model cost at call 46 : 398.2914 -#> Model cost at call 48 : 398.2914 -#> Model cost at call 49 : 398.2913 -#> Model cost at call 51 : 395.0712 -#> Model cost at call 54 : 395.0711 +#> Model cost at call 46 : 398.2913 +#> Model cost at call 48 : 398.2912 +#> Model cost at call 49 : 398.2911 +#> Model cost at call 51 : 395.0711 +#> Model cost at call 54 : 395.071 #> Model cost at call 56 : 378.3298 #> Model cost at call 59 : 378.3298 #> Model cost at call 62 : 376.9812 @@ -514,9 +514,9 @@ #> Model cost at call 94 : 371.6464 #> Model cost at call 99 : 371.4299 #> Model cost at call 101 : 371.4299 -#> Model cost at call 104 : 371.407 -#> Model cost at call 106 : 371.407 -#> Model cost at call 107 : 371.407 +#> Model cost at call 104 : 371.4071 +#> Model cost at call 106 : 371.4071 +#> Model cost at call 107 : 371.4071 #> Model cost at call 109 : 371.2524 #> Model cost at call 113 : 371.2524 #> Model cost at call 114 : 371.2136 @@ -530,10 +530,12 @@ #> Model cost at call 126 : 371.2134 #> Model cost at call 135 : 371.2134 #> Model cost at call 147 : 371.2134 +#> Model cost at call 151 : 371.2134 #> Model cost at call 152 : 371.2134 +#> Model cost at call 153 : 371.2134 #> Optimisation by method Port successfully terminated. #> user system elapsed -#> 0.712 0.040 0.703
    coef(fit.deSolve)
    #> parent_0 log_k_parent_sink log_k_parent_m1 log_k_m1_sink +#> 0.792 0.000 0.793
    coef(fit.deSolve)
    #> parent_0 log_k_parent_sink log_k_parent_m1 log_k_m1_sink #> 99.59848 -3.03822 -2.98030 -5.24750
    endpoints(fit.deSolve)
    #> $ff #> parent_sink parent_m1 m1_sink #> 0.485524 0.514476 1.000000 @@ -544,7 +546,7 @@ #> $distimes #> DT50 DT90 #> parent 7.022929 23.32967 -#> m1 131.760713 437.69961 +#> m1 131.760712 437.69961 #>
    # Use stepwise fitting, using optimised parameters from parent only fit, FOMC @@ -574,10 +576,10 @@ # Weighted fits, including IRLS 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) -summary(f.noweight)
    #> mkin version: 0.9.45.1 -#> R version: 3.3.3 -#> Date of fit: Wed Mar 15 09:45:07 2017 -#> Date of summary: Wed Mar 15 09:45:07 2017 +summary(f.noweight)
    #> mkin version: 0.9.45.2 +#> R version: 3.4.0 +#> Date of fit: Fri May 5 12:45:17 2017 +#> Date of summary: Fri May 5 12:45:17 2017 #> #> Equations: #> d_parent/dt = - k_parent * parent @@ -585,7 +587,7 @@ #> #> Model predictions using solution type deSolve #> -#> Fitted with method Port using 185 model solutions performed in 0.753 s +#> Fitted with method Port using 185 model solutions performed in 0.746 s #> #> Weighting: none #> @@ -695,10 +697,10 @@ #> 100 m1 33.13 3.198e+01 1.148e+00 #> 120 m1 25.15 2.879e+01 -3.640e+00 #> 120 m1 33.31 2.879e+01 4.520e+00
    f.irls <- mkinfit(SFO_SFO.ff, FOCUS_2006_D, reweight.method = "obs", quiet = TRUE) -summary(f.irls)
    #> mkin version: 0.9.45.1 -#> R version: 3.3.3 -#> Date of fit: Wed Mar 15 09:45:09 2017 -#> Date of summary: Wed Mar 15 09:45:09 2017 +summary(f.irls)
    #> mkin version: 0.9.45.2 +#> R version: 3.4.0 +#> Date of fit: Fri May 5 12:45:19 2017 +#> Date of summary: Fri May 5 12:45:19 2017 #> #> Equations: #> d_parent/dt = - k_parent * parent @@ -706,7 +708,7 @@ #> #> Model predictions using solution type deSolve #> -#> Fitted with method Port using 486 model solutions performed in 2.091 s +#> Fitted with method Port using 468 model solutions performed in 1.925 s #> #> Weighting: none then iterative reweighting method obs #> @@ -731,16 +733,16 @@ #> Optimised, transformed parameters with symmetric confidence intervals: #> Estimate Std. Error Lower Upper #> parent_0 99.67000 1.79200 96.04000 103.300 -#> log_k_parent -2.31200 0.04560 -2.40400 -2.220 +#> log_k_parent -2.31200 0.04560 -2.40400 -2.219 #> log_k_m1 -5.25100 0.12510 -5.50500 -4.998 #> f_parent_ilr_1 0.03785 0.06318 -0.09027 0.166 #> #> Parameter correlation: #> parent_0 log_k_parent log_k_m1 f_parent_ilr_1 -#> parent_0 1.0000 0.5083 -0.1979 -0.6148 +#> parent_0 1.0000 0.5083 -0.1979 -0.6147 #> log_k_parent 0.5083 1.0000 -0.3894 -0.6062 #> log_k_m1 -0.1979 -0.3894 1.0000 0.7417 -#> f_parent_ilr_1 -0.6148 -0.6062 0.7417 1.0000 +#> f_parent_ilr_1 -0.6147 -0.6062 0.7417 1.0000 #> #> Residual standard error: 1.054 on 36 degrees of freedom #> @@ -749,10 +751,10 @@ #> t-test (unrealistically) based on the assumption of normal distribution #> for estimators of untransformed parameters. #> Estimate t value Pr(>t) Lower Upper -#> parent_0 99.67000 55.630 8.183e-37 96.040000 1.033e+02 +#> parent_0 99.67000 55.630 8.181e-37 96.040000 1.033e+02 #> k_parent 0.09906 21.930 1.016e-22 0.090310 1.087e-01 #> k_m1 0.00524 7.996 8.487e-10 0.004066 6.753e-03 -#> f_parent_to_m1 0.51340 23.000 2.039e-23 0.468100 5.584e-01 +#> f_parent_to_m1 0.51340 23.000 2.038e-23 0.468100 5.584e-01 #> #> Chi2 error levels in percent: #> err.min n.optim df @@ -782,14 +784,14 @@ #> 7 parent 55.13 4.982e+01 5.309e+00 3.402 #> 14 parent 27.27 2.490e+01 2.367e+00 3.402 #> 14 parent 26.64 2.490e+01 1.737e+00 3.402 -#> 21 parent 11.50 1.245e+01 -9.477e-01 3.402 -#> 21 parent 11.64 1.245e+01 -8.077e-01 3.402 +#> 21 parent 11.50 1.245e+01 -9.476e-01 3.402 +#> 21 parent 11.64 1.245e+01 -8.076e-01 3.402 #> 35 parent 2.85 3.110e+00 -2.600e-01 3.402 #> 35 parent 2.91 3.110e+00 -2.000e-01 3.402 -#> 50 parent 0.69 7.037e-01 -1.375e-02 3.402 -#> 50 parent 0.63 7.037e-01 -7.375e-02 3.402 -#> 75 parent 0.05 5.913e-02 -9.134e-03 3.402 -#> 75 parent 0.06 5.913e-02 8.661e-04 3.402 +#> 50 parent 0.69 7.037e-01 -1.374e-02 3.402 +#> 50 parent 0.63 7.037e-01 -7.374e-02 3.402 +#> 75 parent 0.05 5.913e-02 -9.133e-03 3.402 +#> 75 parent 0.06 5.913e-02 8.666e-04 3.402 #> 100 parent NA 4.969e-03 NA 3.402 #> 100 parent NA 4.969e-03 NA 3.402 #> 120 parent NA 6.852e-04 NA 3.402 @@ -801,14 +803,14 @@ #> 3 m1 12.91 1.305e+01 -1.378e-01 2.722 #> 3 m1 12.96 1.305e+01 -8.779e-02 2.722 #> 7 m1 22.97 2.508e+01 -2.106e+00 2.722 -#> 7 m1 24.47 2.508e+01 -6.061e-01 2.722 +#> 7 m1 24.47 2.508e+01 -6.062e-01 2.722 #> 14 m1 41.69 3.671e+01 4.983e+00 2.722 #> 14 m1 33.21 3.671e+01 -3.497e+00 2.722 -#> 21 m1 44.37 4.165e+01 2.719e+00 2.722 -#> 21 m1 46.44 4.165e+01 4.789e+00 2.722 +#> 21 m1 44.37 4.165e+01 2.720e+00 2.722 +#> 21 m1 46.44 4.165e+01 4.790e+00 2.722 #> 35 m1 41.22 4.329e+01 -2.069e+00 2.722 #> 35 m1 37.95 4.329e+01 -5.339e+00 2.722 -#> 50 m1 41.19 4.119e+01 -3.388e-03 2.722 +#> 50 m1 41.19 4.119e+01 -3.376e-03 2.722 #> 50 m1 40.01 4.119e+01 -1.183e+00 2.722 #> 75 m1 40.09 3.644e+01 3.652e+00 2.722 #> 75 m1 33.85 3.644e+01 -2.588e+00 2.722 @@ -816,10 +818,10 @@ #> 100 m1 33.13 3.199e+01 1.140e+00 2.722 #> 120 m1 25.15 2.881e+01 -3.659e+00 2.722 #> 120 m1 33.31 2.881e+01 4.501e+00 2.722
    f.w.mean <- mkinfit(SFO_SFO.ff, FOCUS_2006_D, weight = "mean", quiet = TRUE) -summary(f.w.mean)
    #> mkin version: 0.9.45.1 -#> R version: 3.3.3 -#> Date of fit: Wed Mar 15 09:45:10 2017 -#> Date of summary: Wed Mar 15 09:45:10 2017 +summary(f.w.mean)
    #> mkin version: 0.9.45.2 +#> R version: 3.4.0 +#> Date of fit: Fri May 5 12:45:20 2017 +#> Date of summary: Fri May 5 12:45:20 2017 #> #> Equations: #> d_parent/dt = - k_parent * parent @@ -827,7 +829,7 @@ #> #> Model predictions using solution type deSolve #> -#> Fitted with method Port using 155 model solutions performed in 0.661 s +#> Fitted with method Port using 155 model solutions performed in 0.699 s #> #> Weighting: mean #> @@ -871,7 +873,7 @@ #> for estimators of untransformed parameters. #> Estimate t value Pr(>t) Lower Upper #> parent_0 99.730000 51.630 1.166e-35 95.81000 1.036e+02 -#> k_parent 0.099360 20.670 7.304e-22 0.09007 1.096e-01 +#> k_parent 0.099360 20.670 7.303e-22 0.09007 1.096e-01 #> k_m1 0.005224 8.287 3.649e-10 0.00409 6.672e-03 #> f_parent_to_m1 0.512500 22.860 2.497e-23 0.46710 5.578e-01 #> @@ -938,10 +940,10 @@ #> 120 m1 25.15 28.824128 -3.674128 #> 120 m1 33.31 28.824128 4.485872
    f.w.value <- mkinfit(SFO_SFO.ff, subset(FOCUS_2006_D, value != 0), err = "value", quiet = TRUE) -summary(f.w.value)
    #> mkin version: 0.9.45.1 -#> R version: 3.3.3 -#> Date of fit: Wed Mar 15 09:45:11 2017 -#> Date of summary: Wed Mar 15 09:45:11 2017 +summary(f.w.value)
    #> mkin version: 0.9.45.2 +#> R version: 3.4.0 +#> Date of fit: Fri May 5 12:45:21 2017 +#> Date of summary: Fri May 5 12:45:21 2017 #> #> Equations: #> d_parent/dt = - k_parent * parent @@ -949,7 +951,7 @@ #> #> Model predictions using solution type deSolve #> -#> Fitted with method Port using 174 model solutions performed in 0.724 s +#> Fitted with method Port using 174 model solutions performed in 0.767 s #> #> Weighting: manual #> @@ -1060,10 +1062,10 @@ errors <- c(parent = 2, m1 = 1) dw$err.man <- errors[FOCUS_2006_D$name] f.w.man <- mkinfit(SFO_SFO.ff, dw, err = "err.man", quiet = TRUE) -summary(f.w.man)
    #> mkin version: 0.9.45.1 -#> R version: 3.3.3 -#> Date of fit: Wed Mar 15 09:45:12 2017 -#> Date of summary: Wed Mar 15 09:45:12 2017 +summary(f.w.man)
    #> mkin version: 0.9.45.2 +#> R version: 3.4.0 +#> Date of fit: Fri May 5 12:45:22 2017 +#> Date of summary: Fri May 5 12:45:22 2017 #> #> Equations: #> d_parent/dt = - k_parent * parent @@ -1071,7 +1073,7 @@ #> #> Model predictions using solution type deSolve #> -#> Fitted with method Port using 316 model solutions performed in 1.31 s +#> Fitted with method Port using 297 model solutions performed in 1.276 s #> #> Weighting: manual #> @@ -1102,10 +1104,10 @@ #> #> Parameter correlation: #> parent_0 log_k_parent log_k_m1 f_parent_ilr_1 -#> parent_0 1.00000 0.5312 -0.09455 -0.3351 +#> parent_0 1.00000 0.5312 -0.09456 -0.3351 #> log_k_parent 0.53123 1.0000 -0.17800 -0.3360 -#> log_k_m1 -0.09455 -0.1780 1.00000 0.7616 -#> f_parent_ilr_1 -0.33513 -0.3360 0.76156 1.0000 +#> log_k_m1 -0.09456 -0.1780 1.00000 0.7616 +#> f_parent_ilr_1 -0.33514 -0.3360 0.76156 1.0000 #> #> Residual standard error: 2.628 on 36 degrees of freedom #> @@ -1114,7 +1116,7 @@ #> t-test (unrealistically) based on the assumption of normal distribution #> for estimators of untransformed parameters. #> Estimate t value Pr(>t) Lower Upper -#> parent_0 99.490000 74.69 2.222e-41 96.780000 1.022e+02 +#> parent_0 99.490000 74.69 2.221e-41 96.780000 1.022e+02 #> k_parent 0.098140 28.17 2.012e-26 0.091320 1.055e-01 #> k_m1 0.005292 4.70 1.873e-05 0.003437 8.148e-03 #> f_parent_to_m1 0.516200 16.30 1.686e-18 0.452000 5.798e-01 @@ -1137,10 +1139,10 @@ #> #> Data: #> time variable observed predicted residual err -#> 0 parent 99.46 99.485977 -0.025977 1 -#> 0 parent 102.04 99.485977 2.554023 1 -#> 1 parent 93.50 90.186118 3.313882 1 -#> 1 parent 92.50 90.186118 2.313882 1 +#> 0 parent 99.46 99.485976 -0.025976 1 +#> 0 parent 102.04 99.485976 2.554024 1 +#> 1 parent 93.50 90.186117 3.313883 1 +#> 1 parent 92.50 90.186117 2.313883 1 #> 3 parent 63.23 74.113162 -10.883162 1 #> 3 parent 68.99 74.113162 -5.123162 1 #> 7 parent 52.32 50.050295 2.269705 1 @@ -1169,23 +1171,23 @@ #> 7 m1 24.47 24.996945 -0.526945 2 #> 14 m1 41.69 36.663527 5.026473 2 #> 14 m1 33.21 36.663527 -3.453527 2 -#> 21 m1 44.37 41.656812 2.713188 2 -#> 21 m1 46.44 41.656812 4.783188 2 -#> 35 m1 41.22 43.350311 -2.130311 2 -#> 35 m1 37.95 43.350311 -5.400311 2 -#> 50 m1 41.19 41.256364 -0.066364 2 -#> 50 m1 40.01 41.256364 -1.246364 2 -#> 75 m1 40.09 36.460566 3.629434 2 -#> 75 m1 33.85 36.460566 -2.610566 2 +#> 21 m1 44.37 41.656813 2.713187 2 +#> 21 m1 46.44 41.656813 4.783187 2 +#> 35 m1 41.22 43.350312 -2.130312 2 +#> 35 m1 37.95 43.350312 -5.400312 2 +#> 50 m1 41.19 41.256365 -0.066365 2 +#> 50 m1 40.01 41.256365 -1.246365 2 +#> 75 m1 40.09 36.460567 3.629433 2 +#> 75 m1 33.85 36.460567 -2.610567 2 #> 100 m1 31.04 31.969288 -0.929288 2 #> 100 m1 33.13 31.969288 1.160712 2 -#> 120 m1 25.15 28.760615 -3.610615 2 -#> 120 m1 33.31 28.760615 4.549385 2
    f.w.man.irls <- mkinfit(SFO_SFO.ff, dw, err = "err.man", quiet = TRUE, +#> 120 m1 25.15 28.760616 -3.610616 2 +#> 120 m1 33.31 28.760616 4.549384 2
    f.w.man.irls <- mkinfit(SFO_SFO.ff, dw, err = "err.man", quiet = TRUE, reweight.method = "obs") -summary(f.w.man.irls)
    #> mkin version: 0.9.45.1 -#> R version: 3.3.3 -#> Date of fit: Wed Mar 15 09:45:15 2017 -#> Date of summary: Wed Mar 15 09:45:15 2017 +summary(f.w.man.irls)
    #> mkin version: 0.9.45.2 +#> R version: 3.4.0 +#> Date of fit: Fri May 5 12:45:25 2017 +#> Date of summary: Fri May 5 12:45:25 2017 #> #> Equations: #> d_parent/dt = - k_parent * parent @@ -1193,7 +1195,7 @@ #> #> Model predictions using solution type deSolve #> -#> Fitted with method Port using 648 model solutions performed in 2.766 s +#> Fitted with method Port using 628 model solutions performed in 2.626 s #> #> Weighting: manual then iterative reweighting method obs #> @@ -1236,10 +1238,10 @@ #> t-test (unrealistically) based on the assumption of normal distribution #> for estimators of untransformed parameters. #> Estimate t value Pr(>t) Lower Upper -#> parent_0 99.67000 55.630 8.178e-37 96.040000 1.033e+02 +#> parent_0 99.67000 55.630 8.179e-37 96.040000 1.033e+02 #> k_parent 0.09906 21.930 1.015e-22 0.090310 1.087e-01 #> k_m1 0.00524 7.996 8.488e-10 0.004066 6.753e-03 -#> f_parent_to_m1 0.51340 23.000 2.038e-23 0.468100 5.584e-01 +#> f_parent_to_m1 0.51340 23.000 2.039e-23 0.468100 5.584e-01 #> #> Chi2 error levels in percent: #> err.min n.optim df diff --git a/docs/reference/mkinmod.html b/docs/reference/mkinmod.html index 1343abcc..de9815d4 100644 --- a/docs/reference/mkinmod.html +++ b/docs/reference/mkinmod.html @@ -6,8 +6,7 @@ - - — mkinmod • mkin +Function to set up a kinetic model with one or more state variables — mkinmod • mkin @@ -26,12 +25,14 @@ - + + + @@ -71,6 +72,9 @@
  • Performance benefit by using compiled model definitions in mkin
  • +
  • + Calculation of time weighted average concentrations with mkin +
  • @@ -96,8 +100,7 @@
    @@ -105,58 +108,67 @@ a list, specifying the kinetic model type and reaction or transfer to other observed compartments. Instead of specifying several expressions, a list of lists can be given in the speclist argument.

    - -

    For the definition of model types and their parameters, the equations given +

    For the definition of model types and their parameters, the equations given in the FOCUS and NAFTA guidance documents are used.

    -
    mkinmod(..., use_of_ff = "min", speclist = NULL, quiet = FALSE, verbose = FALSE)
    +
    mkinmod(..., use_of_ff = "min", speclist = NULL, quiet = FALSE, verbose = FALSE)

    Arguments

    -
    -
    ...
    -
    - For each observed variable, a list has to be specified as an argument, containing + + + + + + + + + + + + + + + + + + + + + + +
    ...

    For each observed variable, a list has to be specified as an argument, containing at least a component type, specifying the type of kinetics to use - for the variable. Currently, single first order kinetics "SFO", - indeterminate order rate equation kinetics "IORE", or - single first order with reversible binding "SFORB" are implemented for all + for the variable. Currently, single first order kinetics "SFO", + indeterminate order rate equation kinetics "IORE", or + single first order with reversible binding "SFORB" are implemented for all variables, while - "FOMC", "DFOP" and "HS" can additionally be chosen for the first + "FOMC", "DFOP" and "HS" can additionally be chosen for the first variable which is assumed to be the source compartment. Additionally, each component of the list can include a character vector to, specifying names of variables to which a transfer is to be assumed in the model. - If the argument use_of_ff is set to "min" (default) and the model for - the compartment is "SFO" or "SFORB", an additional component of the list - can be "sink=FALSE" effectively fixing the flux to sink to zero. - -

    use_of_ff
    -
    - Specification of the use of formation fractions in the model equations and, if - applicable, the coefficient matrix. If "min", a minimum use of formation + If the argument use_of_ff is set to "min" (default) and the model for + the compartment is "SFO" or "SFORB", an additional component of the list + can be "sink=FALSE" effectively fixing the flux to sink to zero.

    use_of_ff

    Specification of the use of formation fractions in the model equations and, if + applicable, the coefficient matrix. If "min", a minimum use of formation fractions is made in order to avoid fitting the product of formation fractions - and rate constants. If "max", formation fractions are always used. - -

    speclist
    -
    - The specification of the observed variables and their submodel types and - pathways can be given as a single list using this argument. Default is NULL. -
    -
    quiet
    -
    - Should messages be suppressed? -
    -
    verbose
    -
    - If TRUE, passed to cfunction if applicable to give - detailed information about the C function being built. -
    - + and rate constants. If "max", formation fractions are always used.

    speclist

    The specification of the observed variables and their submodel types and + pathways can be given as a single list using this argument. Default is NULL.

    quiet

    Should messages be suppressed?

    verbose

    If TRUE, passed to cfunction if applicable to give + detailed information about the C function being built.

    Value

    A list of class mkinmod for use with mkinfit, containing

    +
    diffs

    A vector of string representations of differential equations, + one for each modelling variable.

    +
    parms

    A vector of parameter names occurring in the differential equations.

    +
    map

    A list containing named character vectors for each observed variable, specifying + the modelling variables by which it is represented.

    +
    use_of_ff

    The content of use_of_ff is passed on in this list component.

    +
    coefmat

    The coefficient matrix, if the system of differential equations can be + represented by one.

    +

    Note

    @@ -170,8 +182,8 @@ Degradation Kinetics from Environmental Fate Studies on Pesticides in EU Registration” Report of the FOCUS Work Group on Degradation Kinetics, EC Document Reference Sanco/10058/2005 version 2.0, 434 pp, - http://focus.jrc.ec.europa.eu/dk

    -

    NAFTA Technical Working Group on Pesticides (not dated) Guidance for + http://esdac.jrc.europa.eu/projects/degradation-kinetics

    +

    NAFTA Technical Working Group on Pesticides (not dated) Guidance for Evaluating and Calculating Degradation Kinetics in Environmental Media

    @@ -193,7 +205,7 @@ SFO_SFO <- mkinmod( parent = mkinsub("SFO", "m1"), m1 = mkinsub("SFO"), verbose = TRUE)
    #> Compilation argument: -#> /usr/lib/R/bin/R CMD SHLIB file2ac5b2884c1.c 2> file2ac5b2884c1.c.err.txt +#> /usr/lib/R/bin/R CMD SHLIB file70ea30edf42a.c 2> file70ea30edf42a.c.err.txt #> Program source: #> 1: #include <R.h> #> 2: diff --git a/docs/reference/mkinparplot-4.png b/docs/reference/mkinparplot-4.png index 77eafd95..8b32f554 100644 Binary files a/docs/reference/mkinparplot-4.png and b/docs/reference/mkinparplot-4.png differ diff --git a/docs/reference/mkinparplot.html b/docs/reference/mkinparplot.html index 0682211b..b0f1e5a6 100644 --- a/docs/reference/mkinparplot.html +++ b/docs/reference/mkinparplot.html @@ -6,8 +6,7 @@ - - — mkinparplot • mkin +Function to plot the confidence intervals obtained using mkinfit — mkinparplot • mkin @@ -26,12 +25,14 @@ - + + + @@ -71,6 +72,9 @@
  • Performance benefit by using compiled model definitions in mkin
  • +
  • + Calculation of time weighted average concentrations with mkin +
  • @@ -96,8 +100,7 @@
    @@ -105,15 +108,16 @@ fitted using mkinfit.

    -
    mkinparplot(object)
    +
    mkinparplot(object)

    Arguments

    -
    -
    object
    -
    - A fit represented in an mkinfit object. -
    -
    + + + + + + +
    object

    A fit represented in an mkinfit object.

    Value

    diff --git a/docs/reference/mkinplot.html b/docs/reference/mkinplot.html index fdc61af4..7be76403 100644 --- a/docs/reference/mkinplot.html +++ b/docs/reference/mkinplot.html @@ -6,8 +6,7 @@ - - — mkinplot • mkin +Plot the observed data and the fitted model of an mkinfit object — mkinplot • mkin @@ -26,12 +25,14 @@ - + + + @@ -71,6 +72,9 @@
  • Performance benefit by using compiled model definitions in mkin
  • +
  • + Calculation of time weighted average concentrations with mkin +
  • @@ -96,27 +100,27 @@

    Deprecated function. It now only calls the plot method plot.mkinfit.

    -
    mkinplot(fit, ...)
    +
    mkinplot(fit, ...)

    Arguments

    -
    -
    fit
    -
    - an object of class mkinfit. -
    -
    -
    - further arguments passed to plot.mkinfit. -
    -
    + + + + + + + + + + +
    fit

    an object of class mkinfit.

    further arguments passed to plot.mkinfit.

    Value

    diff --git a/docs/reference/mkinpredict.html b/docs/reference/mkinpredict.html index 2348d40e..327a7d8d 100644 --- a/docs/reference/mkinpredict.html +++ b/docs/reference/mkinpredict.html @@ -6,8 +6,7 @@ - - — mkinpredict • mkin +Produce predictions from a kinetic model using specific parameters — mkinpredict • mkin @@ -26,12 +25,14 @@ - + + + @@ -71,6 +72,9 @@
  • Performance benefit by using compiled model definitions in mkin
  • +
  • + Calculation of time weighted average concentrations with mkin +
  • @@ -96,8 +100,7 @@
    @@ -106,71 +109,72 @@ kinetic parameters and initial values for the state variables.

    -
    mkinpredict(mkinmod, odeparms, odeini, outtimes, solution_type = "deSolve",
    +    
    mkinpredict(mkinmod, odeparms, odeini, outtimes, solution_type = "deSolve",
                   use_compiled = "auto", method.ode = "lsoda", atol = 1e-08, rtol = 1e-10,
             map_output = TRUE, ...)

    Arguments

    -
    -
    mkinmod
    -
    - A kinetic model as produced by mkinmod. -
    -
    odeparms
    -
    - A numeric vector specifying the parameters used in the kinetic model, which - is generally defined as a set of ordinary differential equations. -
    -
    odeini
    -
    - A numeric vectory containing the initial values of the state variables of + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    mkinmod

    A kinetic model as produced by mkinmod.

    odeparms

    A numeric vector specifying the parameters used in the kinetic model, which + is generally defined as a set of ordinary differential equations.

    odeini

    A numeric vectory containing the initial values of the state variables of the model. Note that the state variables can differ from the observed - variables, for example in the case of the SFORB model. - -

    outtimes
    -
    - A numeric vector specifying the time points for which model predictions - should be generated. -
    -
    solution_type
    -
    - The method that should be used for producing the predictions. This should - generally be "analytical" if there is only one observed variable, and - usually "deSolve" in the case of several observed variables. The third - possibility "eigen" is faster but not applicable to some models e.g. - using FOMC for the parent compound. -
    -
    method.ode
    -
    - The solution method passed via mkinpredict to - ode in case the solution type is "deSolve". The default - "lsoda" is performant, but sometimes fails to converge. -
    -
    use_compiled
    -
    - If set to FALSE, no compiled version of the mkinmod - model is used, even if is present. -
    -
    atol
    -
    - Absolute error tolerance, passed to ode. Default is 1e-8, - lower than in lsoda. -
    -
    rtol
    -
    - Absolute error tolerance, passed to ode. Default is 1e-10, - much lower than in lsoda. -
    -
    map_output
    -
    - Boolean to specify if the output should list values for the observed - variables (default) or for all state variables (if set to FALSE). -
    -
    -
    - Further arguments passed to the ode solver in case such a solver is used. -
    - + variables, for example in the case of the SFORB model.

    outtimes

    A numeric vector specifying the time points for which model predictions + should be generated.

    solution_type

    The method that should be used for producing the predictions. This should + generally be "analytical" if there is only one observed variable, and + usually "deSolve" in the case of several observed variables. The third + possibility "eigen" is faster but not applicable to some models e.g. + using FOMC for the parent compound.

    method.ode

    The solution method passed via mkinpredict to + ode in case the solution type is "deSolve". The default + "lsoda" is performant, but sometimes fails to converge.

    use_compiled

    If set to FALSE, no compiled version of the mkinmod + model is used, even if is present.

    atol

    Absolute error tolerance, passed to ode. Default is 1e-8, + lower than in lsoda.

    rtol

    Absolute error tolerance, passed to ode. Default is 1e-10, + much lower than in lsoda.

    map_output

    Boolean to specify if the output should list values for the observed + variables (default) or for all state variables (if set to FALSE).

    Further arguments passed to the ode solver in case such a solver is used.

    Value

    @@ -295,17 +299,17 @@ c(parent = 100, m1 = 0), seq(0, 20, by = 0.1), solution_type = "eigen")[201,]))
    #> time parent m1 #> 201 20 4.978707 27.46227
    #> user system elapsed -#> 0.016 0.016 0.004
    system.time( +#> 0.004 0.000 0.004
    system.time( print(mkinpredict(SFO_SFO, c(k_parent_m1 = 0.05, k_parent_sink = 0.1, k_m1_sink = 0.01), c(parent = 100, m1 = 0), seq(0, 20, by = 0.1), solution_type = "deSolve")[201,]))
    #> time parent m1 #> 201 20 4.978707 27.46227
    #> user system elapsed -#> 0.016 0.004 0.002
    system.time( +#> 0.004 0.000 0.002
    system.time( print(mkinpredict(SFO_SFO, c(k_parent_m1 = 0.05, k_parent_sink = 0.1, k_m1_sink = 0.01), c(parent = 100, m1 = 0), seq(0, 20, by = 0.1), solution_type = "deSolve", use_compiled = FALSE)[201,]))
    #> time parent m1 #> 201 20 4.978707 27.46227
    #> user system elapsed -#> 0.032 0.000 0.034
    +#> 0.032 0.000 0.033
  • Performance benefit by using compiled model definitions in mkin
  • +
  • + Calculation of time weighted average concentrations with mkin +
  • @@ -96,8 +100,7 @@
    @@ -107,53 +110,55 @@ using the argument show_residuals = TRUE.

    -
    mkinresplot(object,
    +    
    mkinresplot(object,
         obs_vars = names(object$mkinmod$map),
         xlim = c(0, 1.1 * max(object$data$time)),
         xlab = "Time", ylab = "Residual",
         maxabs = "auto", legend = TRUE, lpos = "topright", ...)

    Arguments

    -
    -
    object
    -
    - A fit represented in an mkinfit object. -
    -
    obs_vars
    -
    - A character vector of names of the observed variables for which residuals - should be plotted. Defaults to all observed variables in the model -
    -
    xlim
    -
    - plot range in x direction. -
    -
    xlab
    -
    - Label for the x axis. Defaults to "Time [days]". -
    -
    ylab
    -
    - Label for the y axis. Defaults to "Residual [% of applied radioactivity]". -
    -
    maxabs
    -
    - Maximum absolute value of the residuals. This is used for the scaling of - the y axis and defaults to "auto". -
    -
    legend
    -
    - Should a legend be plotted? Defaults to "TRUE". -
    -
    lpos
    -
    - Where should the legend be placed? Default is "topright". Will be passed on to - legend.
    -
    -
    - further arguments passed to plot. -
    -
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    object

    A fit represented in an mkinfit object.

    obs_vars

    A character vector of names of the observed variables for which residuals + should be plotted. Defaults to all observed variables in the model

    xlim

    plot range in x direction.

    xlab

    Label for the x axis. Defaults to "Time [days]".

    ylab

    Label for the y axis. Defaults to "Residual [% of applied radioactivity]".

    maxabs

    Maximum absolute value of the residuals. This is used for the scaling of + the y axis and defaults to "auto".

    legend

    Should a legend be plotted? Defaults to "TRUE".

    lpos

    Where should the legend be placed? Default is "topright". Will be passed on to + legend.

    further arguments passed to plot.

    Value

    diff --git a/docs/reference/mkinsub.html b/docs/reference/mkinsub.html index aff0b593..2269b228 100644 --- a/docs/reference/mkinsub.html +++ b/docs/reference/mkinsub.html @@ -6,8 +6,7 @@ - - — mkinsub • mkin +Function to set up a kinetic submodel for one state variable — mkinsub • mkin @@ -26,12 +25,14 @@ - + + + @@ -71,6 +72,9 @@
  • Performance benefit by using compiled model definitions in mkin
  • +
  • + Calculation of time weighted average concentrations with mkin +
  • @@ -96,8 +100,7 @@
    @@ -105,33 +108,34 @@ mkinmod.

    -
    mkinsub(submodel, to = NULL, sink = TRUE, full_name = NA)
    +
    mkinsub(submodel, to = NULL, sink = TRUE, full_name = NA)

    Arguments

    -
    -
    submodel
    -
    - Character vector of length one to specify the submodel type. See - mkinmod for the list of allowed submodel names. -
    -
    to
    -
    - Vector of the names of the state variable to which a transformation - shall be included in the model. -
    -
    sink
    -
    - Should a pathway to sink be included in the model in addition to the - pathways to other state variables? -
    -
    full_name
    -
    - An optional name to be used e.g. for plotting fits performed with the model. + + + + + + + + + + + + + + + + + + +
    submodel

    Character vector of length one to specify the submodel type. See + mkinmod for the list of allowed submodel names.

    to

    Vector of the names of the state variable to which a transformation + shall be included in the model.

    sink

    Should a pathway to sink be included in the model in addition to the + pathways to other state variables?

    full_name

    An optional name to be used e.g. for plotting fits performed with the model. You can use non-ASCII characters here, but then your R code will not be portable, i.e. may produce unintended plot results on other - operating systems or system configurations. - - + operating systems or system configurations.

    Value

    diff --git a/docs/reference/mmkin-15.png b/docs/reference/mmkin-15.png new file mode 100644 index 00000000..f50a6185 Binary files /dev/null and b/docs/reference/mmkin-15.png differ diff --git a/docs/reference/mmkin-17.png b/docs/reference/mmkin-17.png new file mode 100644 index 00000000..72cfc5e7 Binary files /dev/null and b/docs/reference/mmkin-17.png differ diff --git a/docs/reference/mmkin-19.png b/docs/reference/mmkin-19.png new file mode 100644 index 00000000..0b315b1a Binary files /dev/null and b/docs/reference/mmkin-19.png differ diff --git a/docs/reference/mmkin-21.png b/docs/reference/mmkin-21.png new file mode 100644 index 00000000..b98940ff Binary files /dev/null and b/docs/reference/mmkin-21.png differ diff --git a/docs/reference/mmkin-23.png b/docs/reference/mmkin-23.png new file mode 100644 index 00000000..5ca52efb Binary files /dev/null and b/docs/reference/mmkin-23.png differ diff --git a/docs/reference/mmkin.html b/docs/reference/mmkin.html index 67397827..fe10c88f 100644 --- a/docs/reference/mmkin.html +++ b/docs/reference/mmkin.html @@ -6,8 +6,7 @@ - - — mmkin • mkin +Fit one or more kinetic models with one or more state variables to one or more datasets — mmkin • mkin @@ -26,12 +25,14 @@ - + + + @@ -71,6 +72,9 @@
  • Performance benefit by using compiled model definitions in mkin
  • +
  • + Calculation of time weighted average concentrations with mkin +
  • @@ -96,8 +100,7 @@
    @@ -105,37 +108,38 @@ specified in its first two arguments.

    -
    mmkin(models, datasets,
    +    
    mmkin(models, datasets,
           cores = round(detectCores()/2), cluster = NULL, ...)

    Arguments

    -
    -
    models
    -
    - Either a character vector of shorthand names ("SFO", "FOMC", "DFOP", - "HS", "SFORB"), or an optionally named list of mkinmod - objects. -
    -
    datasets
    -
    - An optionally named list of datasets suitable as observed data for - mkinfit. -
    -
    cores
    -
    - The number of cores to be used for multicore processing. This is only - used when the cluster argument is NULL. -
    -
    cluster
    -
    - A cluster as returned by makeCluster to be used for parallel - execution. -
    -
    -
    - Further arguments that will be passed to mkinfit. -
    -
    + + + + + + + + + + + + + + + + + + + + + + +
    models

    Either a character vector of shorthand names ("SFO", "FOMC", "DFOP", + "HS", "SFORB"), or an optionally named list of mkinmod + objects.

    datasets

    An optionally named list of datasets suitable as observed data for + mkinfit.

    cores

    The number of cores to be used for multicore processing. This is only + used when the cluster argument is NULL.

    cluster

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

    Further arguments that will be passed to mkinfit.

    Value

    @@ -144,7 +148,7 @@

    See also

    -

    [.mmkin for subsetting, plot.mmkin for plotting.

    +

    [.mmkin for subsetting, plot.mmkin for plotting.

    Examples

    @@ -160,11 +164,12 @@ names(datasets) <- paste("Dataset", 1:3) time_default <- system.time(fits.0 <- mmkin(models, datasets, quiet = TRUE)) -time_1 <- system.time(fits.4 <- mmkin(models, datasets, cores = 1, quiet = TRUE)) - +time_1 <- system.time(fits.4 <- mmkin(models, datasets, cores = 1, quiet = TRUE))
    #> Warning: Optimisation by method Port did not converge. +#> Convergence code is 1
    #> Warning: Optimisation by method Port did not converge. +#> Convergence code is 1
    time_default
    #> user system elapsed -#> 16.360 0.128 9.017
    time_1
    #> user system elapsed -#> 21.888 0.004 21.892
    +#> 16.092 0.132 11.761
    time_1
    #> user system elapsed +#> 25.004 0.000 25.000
    endpoints(fits.0[["SFO_lin", 2]])
    #> $ff #> parent_M1 parent_sink M1_M2 M1_sink #> 0.7340479 0.2659521 0.7505687 0.2494313 @@ -174,17 +179,17 @@ #> #> $distimes #> DT50 DT90 -#> parent 0.8777688 2.915885 +#> parent 0.8777689 2.915885 #> M1 2.3257456 7.725960 -#> M2 33.7200881 112.015708 +#> M2 33.7200862 112.015702 #>
    # plot.mkinfit handles rows or columns of mmkin result objects -plot(fits.0[1, ])
    plot(fits.0[1, ], obs_var = c("M1", "M2"))
    plot(fits.0[, 1])
    # Use double brackets to extract a single mkinfit object, which will be plotted +plot(fits.0[1, ])
    plot(fits.0[1, ], obs_var = c("M1", "M2"))
    plot(fits.0[, 1])
    # Use double brackets to extract a single mkinfit object, which will be plotted # by plot.mkinfit and can be plotted using plot_sep -plot(fits.0[[1, 1]], sep_obs = TRUE, show_residuals = TRUE, show_errmin = TRUE)
    plot_sep(fits.0[[1, 1]]) +plot(fits.0[[1, 1]], sep_obs = TRUE, show_residuals = TRUE, show_errmin = TRUE)
    plot_sep(fits.0[[1, 1]]) # Plotting with mmkin (single brackets, extracting an mmkin object) does not # allow to plot the observed variables separately -plot(fits.0[1, 1])
    +plot(fits.0[1, 1])
  • Performance benefit by using compiled model definitions in mkin
  • +
  • + Calculation of time weighted average concentrations with mkin +
  • @@ -96,21 +100,19 @@

    Solves the differential equations with the optimised and fixed parameters from a previous successful call to mkinfit and plots the observed data together with the solution of the fitted model.

    - -

    If the current plot device is a tikz device, +

    If the current plot device is a tikz device, then latex is being used for the formatting of the chi2 error level, if show_errmin = TRUE.

    -
    # S3 method for mkinfit
    +    
    # S3 method for mkinfit
     plot(x, fit = x,
       obs_vars = names(fit$mkinmod$map),
       xlab = "Time", ylab = "Observed",
    @@ -126,100 +128,101 @@ plot(x, fit = x,
     plot_sep(fit, sep_obs = TRUE,  show_residuals = TRUE, show_errmin = TRUE, …)

    Arguments

    -
    -
    x
    -
    - Alias for fit introduced for compatibility with the generic S3 method. -
    -
    fit
    -
    - An object of class mkinfit. -
    -
    obs_vars
    -
    - A character vector of names of the observed variables for which the + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    x

    Alias for fit introduced for compatibility with the generic S3 method.

    fit

    An object of class mkinfit.

    obs_vars

    A character vector of names of the observed variables for which the data and the model should be plotted. Defauls to all observed variables - in the model. - -

    xlab
    -
    - Label for the x axis. -
    -
    ylab
    -
    - Label for the y axis. -
    -
    xlim
    -
    - Plot range in x direction. -
    -
    ylim
    -
    - Plot range in y direction. -
    -
    col_obs
    -
    - Colors used for plotting the observed data and the corresponding model prediction lines. -
    -
    pch_obs
    -
    - Symbols to be used for plotting the data. -
    -
    lty_obs
    -
    - Line types to be used for the model predictions. -
    -
    add
    -
    - Should the plot be added to an existing plot? -
    -
    legend
    -
    - Should a legend be added to the plot? -
    -
    show_residuals
    -
    - Should residuals be shown? If only one plot of the fits is shown, the + in the model.

    xlab

    Label for the x axis.

    ylab

    Label for the y axis.

    xlim

    Plot range in x direction.

    ylim

    Plot range in y direction.

    col_obs

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

    pch_obs

    Symbols to be used for plotting the data.

    lty_obs

    Line types to be used for the model predictions.

    add

    Should the plot be added to an existing plot?

    legend

    Should a legend be added to the plot?

    show_residuals

    Should residuals be shown? If only one plot of the fits is shown, the residual plot is in the lower third of the plot? Otherwise, i.e. if - "sep_obs" is given, the residual plots will be located to the right of - the plots of the fitted curves. - -

    maxabs
    -
    - Maximum absolute value of the residuals. This is used for the scaling of - the y axis and defaults to "auto". -
    -
    sep_obs
    -
    - Should the observed variables be shown in separate subplots? If yes, residual plots - requested by "show_residuals" will be shown next to, not below the plot of the fits. -
    -
    rel.height.middle
    -
    - The relative height of the middle plot, if more than two rows of plots are shown. -
    -
    lpos
    -
    - Position(s) of the legend(s). Passed to legend as the first argument. - If not length one, this should be of the same length as the obs_var argument. -
    -
    inset
    -
    - Passed to legend if applicable. -
    -
    show_errmin
    -
    - Should the FOCUS chi2 error value be shown in the upper margin of the plot? -
    -
    errmin_digits
    -
    - The number of significant digits for rounding the FOCUS chi2 error percentage. -
    -
    -
    - Further arguments passed to plot. -
    - + "sep_obs" is given, the residual plots will be located to the right of + the plots of the fitted curves.

    maxabs

    Maximum absolute value of the residuals. This is used for the scaling of + the y axis and defaults to "auto".

    sep_obs

    Should the observed variables be shown in separate subplots? If yes, residual plots + requested by "show_residuals" will be shown next to, not below the plot of the fits.

    rel.height.middle

    The relative height of the middle plot, if more than two rows of plots are shown.

    lpos

    Position(s) of the legend(s). Passed to legend as the first argument. + If not length one, this should be of the same length as the obs_var argument.

    inset

    Passed to legend if applicable.

    show_errmin

    Should the FOCUS chi2 error value be shown in the upper margin of the plot?

    errmin_digits

    The number of significant digits for rounding the FOCUS chi2 error percentage.

    Further arguments passed to plot.

    Value

    diff --git a/docs/reference/plot.mmkin.html b/docs/reference/plot.mmkin.html index 1d5d0574..9f122fa8 100644 --- a/docs/reference/plot.mmkin.html +++ b/docs/reference/plot.mmkin.html @@ -25,12 +25,14 @@ - + + + @@ -70,7 +72,13 @@
  • Performance benefit by using compiled model definitions in mkin
  • +
  • + Calculation of time weighted average concentrations with mkin +
  • +
  • +
  • + News
  • @@ -96,53 +104,53 @@ -

    When x is a row selected from an mmkin object ([.mmkin), the same model +

    When x is a row selected from an mmkin object ([.mmkin), the same model fitted for at least one dataset is shown. When it is a column, the fit of at least one model to the same dataset is shown.

    - -

    If the current plot device is a tikz device, +

    If the current plot device is a tikz device, then latex is being used for the formatting of the chi2 error level.

    -
    # S3 method for mmkin
    +    
    # S3 method for mmkin
     plot(x, main = "auto", legends = 1, errmin_var = "All data", errmin_digits = 3,
                   cex = 0.7, rel.height.middle = 0.9, ...)

    Arguments

    -
    -
    x
    -
    - An object of class mmkin, with either one row or one column. -
    -
    main
    -
    - The main title placed on the outer margin of the plot. -
    -
    legends
    -
    - An index for the fits for which legends should be shown. -
    -
    errmin_var
    -
    - The variable for which the FOCUS chi2 error value should be shown. -
    -
    errmin_digits
    -
    - The number of significant digits for rounding the FOCUS chi2 error percentage. -
    -
    cex
    -
    - Passed to the plot functions and mtext. -
    -
    rel.height.middle
    -
    - The relative height of the middle plot, if more than two rows of plots are shown. -
    -
    -
    - Further arguments passed to plot.mkinfit and mkinresplot. -
    -
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    x

    An object of class mmkin, with either one row or one column.

    main

    The main title placed on the outer margin of the plot.

    legends

    An index for the fits for which legends should be shown.

    errmin_var

    The variable for which the FOCUS chi2 error value should be shown.

    errmin_digits

    The number of significant digits for rounding the FOCUS chi2 error percentage.

    cex

    Passed to the plot functions and mtext.

    rel.height.middle

    The relative height of the middle plot, if more than two rows of plots are shown.

    Further arguments passed to plot.mkinfit and mkinresplot.

    Value

    diff --git a/docs/reference/print.mkinds.html b/docs/reference/print.mkinds.html index b93f416b..50321a7a 100644 --- a/docs/reference/print.mkinds.html +++ b/docs/reference/print.mkinds.html @@ -25,12 +25,14 @@ - + + + @@ -70,6 +72,9 @@
  • Performance benefit by using compiled model definitions in mkin
  • +
  • + Calculation of time weighted average concentrations with mkin +
  • @@ -102,20 +107,21 @@

    Print mkinds objects.

    -
    # S3 method for mkinds
    +    
    # S3 method for mkinds
     print(x, ...)

    Arguments

    -
    -
    x
    -
    - An mkinds object. -
    -
    -
    - Not used. -
    -
    + + + + + + + + + + +
    x

    An mkinds object.

    Not used.

    diff --git a/docs/reference/print.mkinmod.html b/docs/reference/print.mkinmod.html index d63694d7..5fd9ebad 100644 --- a/docs/reference/print.mkinmod.html +++ b/docs/reference/print.mkinmod.html @@ -25,12 +25,14 @@ - + + + @@ -70,7 +72,13 @@
  • Performance benefit by using compiled model definitions in mkin
  • +
  • + Calculation of time weighted average concentrations with mkin +
  • +
  • +
  • + News
  • @@ -99,20 +107,21 @@

    Print mkinmod objects in a way that the user finds his way to get to its components.

    -
    # S3 method for mkinmod
    +    
    # S3 method for mkinmod
     print(x, ...)

    Arguments

    -
    -
    x
    -
    - An mkinmod object. -
    -
    -
    - Not used. -
    -
    + + + + + + + + + + +
    x

    An mkinmod object.

    Not used.

    Examples

    diff --git a/docs/reference/schaefer07_complex_case.html b/docs/reference/schaefer07_complex_case.html index 46f0a84b..1415d318 100644 --- a/docs/reference/schaefer07_complex_case.html +++ b/docs/reference/schaefer07_complex_case.html @@ -25,12 +25,14 @@ - + + + @@ -70,7 +72,13 @@
  • Performance benefit by using compiled model definitions in mkin
  • +
  • + Calculation of time weighted average concentrations with mkin +
  • + +
  • + News
  • @@ -101,20 +109,18 @@ The results from the fitting are also included.

    -
    data(schaefer07_complex_case)
    +
    data(schaefer07_complex_case)

    Format

    -

    The data set is a data frame with 8 observations on the following 6 variables. -

    -
    time
    a numeric vector
    -
    parent
    a numeric vector
    -
    A1
    a numeric vector
    -
    B1
    a numeric vector
    -
    C1
    a numeric vector
    -
    A2
    a numeric vector
    -

    -

    The results are a data frame with 14 results for different parameter values

    +

    The data set is a data frame with 8 observations on the following 6 variables.

    +
    time

    a numeric vector

    +
    parent

    a numeric vector

    +
    A1

    a numeric vector

    +
    B1

    a numeric vector

    +
    C1

    a numeric vector

    +
    A2

    a numeric vector

    +

    The results are a data frame with 14 results for different parameter values

    References

    @@ -135,7 +141,7 @@ fit <- mkinfit(model, data, quiet = TRUE) plot(fit)
    endpoints(fit)
    #> $ff #> parent_A1 parent_B1 parent_C1 parent_sink A1_A2 A1_sink -#> 0.3809619 0.1954668 0.4235713 0.0000000 0.4479607 0.5520393 +#> 0.3809618 0.1954667 0.4235715 0.0000000 0.4479596 0.5520404 #> #> $SFORB #> logical(0) @@ -143,10 +149,10 @@ #> $distimes #> DT50 DT90 #> parent 13.95078 46.34349 -#> A1 49.75343 165.27732 -#> B1 37.26906 123.80513 -#> C1 11.23131 37.30959 -#> A2 28.50640 94.69621 +#> A1 49.75345 165.27739 +#> B1 37.26908 123.80521 +#> C1 11.23130 37.30957 +#> A2 28.50652 94.69662 #>
    # Compare with the results obtained in the original publication print(schaefer07_complex_results)
    #> compound parameter KinGUI ModelMaker deviation diff --git a/docs/reference/summary.mkinfit.html b/docs/reference/summary.mkinfit.html index b305410d..dbed926d 100644 --- a/docs/reference/summary.mkinfit.html +++ b/docs/reference/summary.mkinfit.html @@ -25,12 +25,14 @@ - + + + @@ -70,7 +72,13 @@
  • Performance benefit by using compiled model definitions in mkin
  • +
  • + Calculation of time weighted average concentrations with mkin +
  • + +
  • + News
  • @@ -102,48 +110,66 @@ and residual values.

    -
    # S3 method for mkinfit
    +    
    # S3 method for mkinfit
     summary(object, data = TRUE, distimes = TRUE, alpha = 0.05, ...)
     # S3 method for summary.mkinfit
     print(x, digits = max(3, getOption("digits") - 3), ...)

    Arguments

    -
    -
    object
    -
    - an object of class mkinfit. -
    -
    x
    -
    - an object of class summary.mkinfit. -
    -
    data
    -
    - logical, indicating whether the data should be included in the summary. -
    -
    distimes
    -
    - logical, indicating whether DT50 and DT90 values should be included. -
    -
    alpha
    -
    - error level for confidence interval estimation from t distribution -
    -
    digits
    -
    - Number of digits to use for printing -
    -
    -
    - optional arguments passed to methods like print. -
    -
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    object

    an object of class mkinfit.

    x

    an object of class summary.mkinfit.

    data

    logical, indicating whether the data should be included in the summary.

    distimes

    logical, indicating whether DT50 and DT90 values should be included.

    alpha

    error level for confidence interval estimation from t distribution

    digits

    Number of digits to use for printing

    optional arguments passed to methods like print.

    Value

    The summary function returns a list derived from summary.modFit, with components, among others

    -

    The print method is called for its side effect, i.e. printing the summary.

    +
    version, Rversion

    The mkin and R versions used

    +
    date.fit, date.summary

    The dates where the fit and the summary were produced

    +
    use_of_ff

    Was maximum or minimum use made of formation fractions

    +
    residuals, residualVariance, sigma, modVariance, df

    As in summary.modFit

    +
    cov.unscaled, cov.scaled, info, niter, stopmess, par

    As in summary.modFit

    +
    bpar

    Optimised and backtransformed parameters

    +
    diffs

    The differential equations used in the model

    +
    data

    The data (see Description above).

    +
    start

    The starting values and bounds, if applicable, for optimised parameters.

    +
    fixed

    The values of fixed parameters.

    +
    errmin

    The chi2 error levels for each observed variable.

    +
    bparms.ode

    All backtransformed ODE parameters, for use as starting parameters for + related models.

    +
    ff

    The estimated formation fractions derived from the fitted model.

    +
    distimes

    The DT50 and DT90 values for each observed variable.

    +
    SFORB

    If applicable, eigenvalues of SFORB components of the model.

    + The print method is called for its side effect, i.e. printing the summary. +

    References

    @@ -151,21 +177,21 @@ Degradation Kinetics from Environmental Fate Studies on Pesticides in EU Registration” Report of the FOCUS Work Group on Degradation Kinetics, EC Document Reference Sanco/10058/2005 version 2.0, 434 pp, - http://focus.jrc.ec.europa.eu/dk

    + http://esdac.jrc.europa.eu/projects/degradation-kinetics

    Examples

    -
    summary(mkinfit(mkinmod(parent = mkinsub("SFO")), FOCUS_2006_A, quiet = TRUE))
    #> mkin version: 0.9.44.9000 -#> R version: 3.3.2 -#> Date of fit: Thu Dec 8 07:57:55 2016 -#> Date of summary: Thu Dec 8 07:57:55 2016 +
    summary(mkinfit(mkinmod(parent = mkinsub("SFO")), FOCUS_2006_A, quiet = TRUE))
    #> mkin version: 0.9.45.2 +#> R version: 3.4.0 +#> Date of fit: Fri May 5 12:46:20 2017 +#> Date of summary: Fri May 5 12:46:20 2017 #> #> Equations: #> d_parent/dt = - k_parent_sink * parent #> #> Model predictions using solution type analytical #> -#> Fitted with method Port using 35 model solutions performed in 0.079 s +#> Fitted with method Port using 35 model solutions performed in 0.082 s #> #> Weighting: none #> diff --git a/docs/reference/synthetic_data_for_UBA.html b/docs/reference/synthetic_data_for_UBA.html index bc2bb02b..d8ff3a1e 100644 --- a/docs/reference/synthetic_data_for_UBA.html +++ b/docs/reference/synthetic_data_for_UBA.html @@ -25,12 +25,14 @@ - + + + @@ -70,7 +72,13 @@
  • Performance benefit by using compiled model definitions in mkin
  • +
  • + Calculation of time weighted average concentrations with mkin +
  • + +
  • + News
  • @@ -99,39 +107,34 @@

    The 12 datasets were generated using four different models and three different variance components. The four models are either the SFO or the DFOP model with either two sequential or two parallel metabolites.

    - -

    Variance component 'a' is based on a normal distribution with standard deviation of 3, - Variance component 'b' is also based on a normal distribution, but with a standard deviation of 7. - Variance component 'c' is based on the error model from Rocke and Lorenzato (1995), with the +

    Variance component 'a' is based on a normal distribution with standard deviation of 3, + Variance component 'b' is also based on a normal distribution, but with a standard deviation of 7. + Variance component 'c' is based on the error model from Rocke and Lorenzato (1995), with the minimum standard deviation (for small y values) of 0.5, and a proportionality constant of 0.07 for the increase of the standard deviation with y.

    - -

    Initial concentrations for metabolites and all values where adding the variance component resulted +

    Initial concentrations for metabolites and all values where adding the variance component resulted in a value below the assumed limit of detection of 0.1 were set to NA.

    - -

    As an example, the first dataset has the title SFO_lin_a and is based on the SFO model - with two sequential metabolites (linear pathway), with added variance component 'a'.

    - -

    Compare also the code in the example section to see the degradation models.

    +

    As an example, the first dataset has the title SFO_lin_a and is based on the SFO model + with two sequential metabolites (linear pathway), with added variance component 'a'.

    +

    Compare also the code in the example section to see the degradation models.

    -
    synthetic_data_for_UBA_2014
    +
    synthetic_data_for_UBA_2014

    Format

    -

    A list containing datasets in the form internally used by the 'gmkin' package. +

    A list containing datasets in the form internally used by the 'gmkin' package. The list has twelfe components. Each of the components is one dataset that has, - among others, the following components -

    -
    title
    The name of the dataset, e.g. SFO_lin_a
    -
    data
    A data frame with the data in the form expected by mkinfit
    -

    + among others, the following components

    +
    title

    The name of the dataset, e.g. SFO_lin_a

    +
    data

    A data frame with the data in the form expected by mkinfit

    +

    Source

    Ranke (2014) Prüfung und Validierung von Modellierungssoftware als Alternative - zu ModelMaker 4.0, Umweltbundesamt Projektnummer 27452

    -

    Rocke, David M. und Lorenzato, Stefan (1995) A two-component model for + zu ModelMaker 4.0, Umweltbundesamt Projektnummer 27452 + Rocke, David M. und Lorenzato, Stefan (1995) A two-component model for measurement error in analytical chemistry. Technometrics 37(2), 176-184.

    @@ -153,10 +156,10 @@ M1 = list(type = "SFO"), M2 = list(type = "SFO"), use_of_ff = "max")
    #> Successfully compiled differential equation model from auto-generated C code.
    fit <- mkinfit(m_synth_SFO_lin, synthetic_data_for_UBA_2014[[1]]$data, quiet = TRUE) -plot_sep(fit)
    summary(fit)
    #> mkin version: 0.9.44.9000 -#> R version: 3.3.2 -#> Date of fit: Thu Dec 8 07:57:58 2016 -#> Date of summary: Thu Dec 8 07:57:58 2016 +plot_sep(fit)
    summary(fit)
    #> mkin version: 0.9.45.2 +#> R version: 3.4.0 +#> Date of fit: Fri May 5 12:46:23 2017 +#> Date of summary: Fri May 5 12:46:23 2017 #> #> Equations: #> d_parent/dt = - k_parent * parent @@ -165,7 +168,7 @@ #> #> Model predictions using solution type deSolve #> -#> Fitted with method Port using 351 model solutions performed in 2.152 s +#> Fitted with method Port using 381 model solutions performed in 2.203 s #> #> Weighting: none #> @@ -205,10 +208,10 @@ #> parent_0 log_k_parent log_k_M1 log_k_M2 f_parent_ilr_1 #> parent_0 1.00000 0.40213 -0.1693 0.02912 -0.4726 #> log_k_parent 0.40213 1.00000 -0.4210 0.07241 -0.5837 -#> log_k_M1 -0.16931 -0.42102 1.0000 -0.37657 0.7438 +#> log_k_M1 -0.16931 -0.42103 1.0000 -0.37657 0.7438 #> log_k_M2 0.02912 0.07241 -0.3766 1.00000 -0.2518 #> f_parent_ilr_1 -0.47263 -0.58367 0.7438 -0.25177 1.0000 -#> f_M1_ilr_1 0.17148 0.42642 -0.8054 0.52648 -0.8602 +#> f_M1_ilr_1 0.17148 0.42643 -0.8054 0.52647 -0.8602 #> f_M1_ilr_1 #> parent_0 0.1715 #> log_k_parent 0.4264 @@ -255,8 +258,8 @@ #> time variable observed predicted residual #> 0 parent 101.5 1.021e+02 -0.56248 #> 0 parent 101.2 1.021e+02 -0.86248 -#> 1 parent 53.9 4.873e+01 5.17119 -#> 1 parent 47.5 4.873e+01 -1.22881 +#> 1 parent 53.9 4.873e+01 5.17118 +#> 1 parent 47.5 4.873e+01 -1.22882 #> 3 parent 10.4 1.111e+01 -0.70773 #> 3 parent 7.6 1.111e+01 -3.50773 #> 7 parent 1.1 5.772e-01 0.52283 @@ -273,12 +276,12 @@ #> 120 parent 3.5 -2.805e-11 3.50000 #> 0 M1 NA 0.000e+00 NA #> 0 M1 NA 0.000e+00 NA -#> 1 M1 36.4 3.479e+01 1.61089 -#> 1 M1 37.4 3.479e+01 2.61089 +#> 1 M1 36.4 3.479e+01 1.61088 +#> 1 M1 37.4 3.479e+01 2.61088 #> 3 M1 34.3 3.937e+01 -5.07027 #> 3 M1 39.8 3.937e+01 0.42973 -#> 7 M1 15.1 1.549e+01 -0.38714 -#> 7 M1 17.8 1.549e+01 2.31286 +#> 7 M1 15.1 1.549e+01 -0.38715 +#> 7 M1 17.8 1.549e+01 2.31285 #> 14 M1 5.8 1.995e+00 3.80469 #> 14 M1 1.2 1.995e+00 -0.79531 #> 28 M1 NA 3.034e-02 NA @@ -295,16 +298,16 @@ #> 1 M2 4.8 4.455e+00 0.34517 #> 3 M2 20.9 2.153e+01 -0.62527 #> 3 M2 19.3 2.153e+01 -2.22527 -#> 7 M2 42.0 4.192e+01 0.07942 -#> 7 M2 43.1 4.192e+01 1.17942 -#> 14 M2 49.4 4.557e+01 3.83354 -#> 14 M2 44.3 4.557e+01 -1.26646 +#> 7 M2 42.0 4.192e+01 0.07941 +#> 7 M2 43.1 4.192e+01 1.17941 +#> 14 M2 49.4 4.557e+01 3.83353 +#> 14 M2 44.3 4.557e+01 -1.26647 #> 28 M2 34.6 3.547e+01 -0.87275 #> 28 M2 33.0 3.547e+01 -2.47275 #> 60 M2 18.8 1.858e+01 0.21837 #> 60 M2 17.6 1.858e+01 -0.98163 -#> 90 M2 10.6 1.013e+01 0.47131 -#> 90 M2 10.8 1.013e+01 0.67131 +#> 90 M2 10.6 1.013e+01 0.47130 +#> 90 M2 10.8 1.013e+01 0.67130 #> 120 M2 9.8 5.521e+00 4.27893 #> 120 M2 3.3 5.521e+00 -2.22107
    diff --git a/docs/reference/transform_odeparms.html b/docs/reference/transform_odeparms.html index e1fb0437..c14740c2 100644 --- a/docs/reference/transform_odeparms.html +++ b/docs/reference/transform_odeparms.html @@ -25,12 +25,14 @@ - + + + @@ -70,7 +72,13 @@
  • Performance benefit by using compiled model definitions in mkin
  • +
  • + Calculation of time weighted average concentrations with mkin +
  • + +
  • + News
  • @@ -102,54 +110,54 @@ simple log transformation is used. For compositional parameters, such as the formations fractions that should always sum up to 1 and can not be negative, the ilr transformation is used.

    - -

    The transformation of sets of formation fractions is fragile, as it supposes +

    The transformation of sets of formation fractions is fragile, as it supposes the same ordering of the components in forward and backward transformation. This is no problem for the internal use in mkinfit.

    -
    transform_odeparms(parms, mkinmod,
    +    
    transform_odeparms(parms, mkinmod,
                        transform_rates = TRUE, transform_fractions = TRUE)
     backtransform_odeparms(transparms, mkinmod,
                            transform_rates = TRUE, transform_fractions = TRUE)

    Arguments

    -
    -
    parms
    -
    - Parameters of kinetic models as used in the differential equations. -
    -
    transparms
    -
    - Transformed parameters of kinetic models as used in the fitting procedure. -
    -
    mkinmod
    -
    - The kinetic model of class mkinmod, containing the names of + + + + + + + + + + + + + + + + + + + + + + +
    parms

    Parameters of kinetic models as used in the differential equations.

    transparms

    Transformed parameters of kinetic models as used in the fitting procedure.

    mkinmod

    The kinetic model of class mkinmod, containing the names of the model variables that are needed for grouping the formation fractions before ilr transformation, the parameter names and - the information if the pathway to sink is included in the model. - -

    transform_rates
    -
    - Boolean specifying if kinetic rate constants should be transformed in the + the information if the pathway to sink is included in the model.

    transform_rates

    Boolean specifying if kinetic rate constants should be transformed in the model specification used in the fitting for better compliance with the assumption of normal distribution of the estimator. If TRUE, also alpha and beta parameters of the FOMC model are log-transformed, as well as k1 and k2 rate constants for the DFOP and HS models and the break point tb - of the HS model. - -

    transform_fractions
    -
    - Boolean specifying if formation fractions constants should be transformed in the + of the HS model.

    transform_fractions

    Boolean specifying if formation fractions constants should be transformed in the model specification used in the fitting for better compliance with the assumption of normal distribution of the estimator. The default (TRUE) is to do transformations. The g parameter of the DFOP and HS models are also transformed, as they can also be seen as compositional data. The transformation used for these transformations is the ilr - transformation. - - + transformation.

    Value

    @@ -162,10 +170,10 @@ parent = list(type = "SFO", to = "m1", sink = TRUE), m1 = list(type = "SFO"))
    #> Successfully compiled differential equation model from auto-generated C code.
    # Fit the model to the FOCUS example dataset D using defaults fit <- mkinfit(SFO_SFO, FOCUS_2006_D, quiet = TRUE) -summary(fit, data=FALSE) # See transformed and backtransformed parameters
    #> mkin version: 0.9.44.9000 -#> R version: 3.3.2 -#> Date of fit: Thu Dec 8 07:57:59 2016 -#> Date of summary: Thu Dec 8 07:57:59 2016 +summary(fit, data=FALSE) # See transformed and backtransformed parameters
    #> mkin version: 0.9.45.2 +#> R version: 3.4.0 +#> Date of fit: Fri May 5 12:46:24 2017 +#> Date of summary: Fri May 5 12:46:24 2017 #> #> Equations: #> d_parent/dt = - k_parent_sink * parent - k_parent_m1 * parent @@ -173,7 +181,7 @@ #> #> Model predictions using solution type deSolve #> -#> Fitted with method Port using 153 model solutions performed in 0.621 s +#> Fitted with method Port using 153 model solutions performed in 0.61 s #> #> Weighting: none #> @@ -207,7 +215,7 @@ #> parent_0 1.00000 0.6075 -0.06625 -0.1701 #> log_k_parent_sink 0.60752 1.0000 -0.08740 -0.6253 #> log_k_parent_m1 -0.06625 -0.0874 1.00000 0.4716 -#> log_k_m1_sink -0.17006 -0.6253 0.47163 1.0000 +#> log_k_m1_sink -0.17006 -0.6253 0.47164 1.0000 #> #> Residual standard error: 3.211 on 36 degrees of freedom #> @@ -239,10 +247,10 @@ #> m1 131.761 437.70
    fit.2 <- mkinfit(SFO_SFO, FOCUS_2006_D, transform_rates = FALSE, quiet = TRUE) -summary(fit.2, data=FALSE)
    #> mkin version: 0.9.44.9000 -#> R version: 3.3.2 -#> Date of fit: Thu Dec 8 07:58:01 2016 -#> Date of summary: Thu Dec 8 07:58:01 2016 +summary(fit.2, data=FALSE)
    #> mkin version: 0.9.45.2 +#> R version: 3.4.0 +#> Date of fit: Fri May 5 12:46:26 2017 +#> Date of summary: Fri May 5 12:46:26 2017 #> #> Equations: #> d_parent/dt = - k_parent_sink * parent - k_parent_m1 * parent @@ -250,7 +258,7 @@ #> #> Model predictions using solution type deSolve #> -#> Fitted with method Port using 327 model solutions performed in 1.419 s +#> Fitted with method Port using 352 model solutions performed in 1.437 s #> #> Weighting: none #> @@ -329,10 +337,10 @@ m1 = list(type = "SFO"), use_of_ff = "max")
    #> Successfully compiled differential equation model from auto-generated C code.
    fit.ff <- mkinfit(SFO_SFO.ff, FOCUS_2006_D, quiet = TRUE) -summary(fit.ff, data = FALSE)
    #> mkin version: 0.9.44.9000 -#> R version: 3.3.2 -#> Date of fit: Thu Dec 8 07:58:02 2016 -#> Date of summary: Thu Dec 8 07:58:02 2016 +summary(fit.ff, data = FALSE)
    #> mkin version: 0.9.45.2 +#> R version: 3.4.0 +#> Date of fit: Fri May 5 12:46:27 2017 +#> Date of summary: Fri May 5 12:46:27 2017 #> #> Equations: #> d_parent/dt = - k_parent * parent @@ -340,7 +348,7 @@ #> #> Model predictions using solution type deSolve #> -#> Fitted with method Port using 185 model solutions performed in 0.814 s +#> Fitted with method Port using 185 model solutions performed in 0.776 s #> #> Weighting: none #> @@ -413,10 +421,10 @@ use_of_ff = "max")
    #> Successfully compiled differential equation model from auto-generated C code.
    fit.ff.2 <- mkinfit(SFO_SFO.ff.2, FOCUS_2006_D, quiet = TRUE) -summary(fit.ff.2, data = FALSE)
    #> mkin version: 0.9.44.9000 -#> R version: 3.3.2 -#> Date of fit: Thu Dec 8 07:58:03 2016 -#> Date of summary: Thu Dec 8 07:58:03 2016 +summary(fit.ff.2, data = FALSE)
    #> mkin version: 0.9.45.2 +#> R version: 3.4.0 +#> Date of fit: Fri May 5 12:46:28 2017 +#> Date of summary: Fri May 5 12:46:28 2017 #> #> Equations: #> d_parent/dt = - k_parent * parent @@ -424,7 +432,7 @@ #> #> Model predictions using solution type deSolve #> -#> Fitted with method Port using 104 model solutions performed in 0.436 s +#> Fitted with method Port using 104 model solutions performed in 0.433 s #> #> Weighting: none #> @@ -463,7 +471,7 @@ #> t-test (unrealistically) based on the assumption of normal distribution #> for estimators of untransformed parameters. #> Estimate t value Pr(>t) Lower Upper -#> parent_0 84.79000 28.600 3.939e-27 78.78000 90.80000 +#> parent_0 84.79000 28.600 3.938e-27 78.78000 90.80000 #> k_parent 0.06352 12.360 5.237e-15 0.05392 0.07483 #> k_m1 0.01478 8.966 4.114e-11 0.01179 0.01853 #> diff --git a/docs/reference/twa.html b/docs/reference/twa.html index 06a501a6..be76b439 100644 --- a/docs/reference/twa.html +++ b/docs/reference/twa.html @@ -6,8 +6,7 @@ - - — twa • mkin +Function to calculate maximum time weighted average concentrations from kinetic models fitted with mkinfit — twa • mkin @@ -26,12 +25,14 @@ - + + + @@ -71,6 +72,9 @@
  • Performance benefit by using compiled model definitions in mkin
  • +
  • + Calculation of time weighted average concentrations with mkin +
  • @@ -96,8 +100,7 @@
    @@ -108,19 +111,20 @@ using the analytical formulas given in the PEC soil section of the FOCUS guidance.

    -
    twa(fit, windows)
    +
    twa(fit, windows)

    Arguments

    -
    -
    fit
    -
    - An object of class mkinfit. -
    -
    windows
    -
    - The width of the time windows for which the TWAs should be calculated. -
    -
    + + + + + + + + + + +
    fit

    An object of class mkinfit.

    windows

    The width of the time windows for which the TWAs should be calculated.

    Value

    @@ -132,7 +136,7 @@ guidance.

    Degradation Kinetics from Environmental Fate Studies on Pesticides in EU Registration” Report of the FOCUS Work Group on Degradation Kinetics, EC Document Reference Sanco/10058/2005 version 2.0, 434 pp, - http://http://esdac.jrc.ec.europa.eu/projects/degradation-kinetics

    + http://esdac.jrc.ec.europa.eu/projects/degradation-kinetics

    Examples

    -- cgit v1.2.1