From e5d1df9a9b1f0951d7dfbaf24eee4294470b73e2 Mon Sep 17 00:00:00 2001 From: Johannes Ranke Date: Thu, 17 Nov 2022 14:54:20 +0100 Subject: Complete update of online docs for v1.2.0 --- docs/reference/mixed.html | 123 ++++++++++++++++++++++++++-------------------- 1 file changed, 70 insertions(+), 53 deletions(-) (limited to 'docs/reference/mixed.html') diff --git a/docs/reference/mixed.html b/docs/reference/mixed.html index dfc7a731..5b250072 100644 --- a/docs/reference/mixed.html +++ b/docs/reference/mixed.html @@ -17,7 +17,7 @@ mkin - 1.1.0 + 1.2.0 @@ -44,11 +44,14 @@ Example evaluations of dimethenamid data from 2018 with nonlinear mixed-effects models
  • - Example evaluation of FOCUS Example Dataset Z + Short demo of the multistart method
  • Performance benefit by using compiled model definitions in mkin
  • +
  • + Example evaluation of FOCUS Example Dataset Z +
  • Calculation of time weighted average concentrations with mkin
  • @@ -56,7 +59,10 @@ Example evaluation of NAFTA SOP Attachment examples
  • - Some benchmark timings + Benchmark timings for mkin +
  • +
  • + Benchmark timings for saem.mmkin
  • @@ -87,73 +93,84 @@
    -
    mixed(object, ...)
    -
    -# S3 method for mmkin
    -mixed(object, method = c("none"), ...)
    -
    -# S3 method for mixed.mmkin
    -print(x, digits = max(3, getOption("digits") - 3), ...)
    +
    mixed(object, ...)
    +
    +# S3 method for mmkin
    +mixed(object, method = c("none"), ...)
    +
    +# S3 method for mixed.mmkin
    +print(x, digits = max(3, getOption("digits") - 3), ...)

    Arguments

    object

    An mmkin row object

    + +
    ...

    Currently not used

    + +
    method

    The method to be used

    + +
    x

    A mixed.mmkin object to print

    + +
    digits

    Number of digits to use for printing.

    +

    Value

    -

    An object of class 'mixed.mmkin' which has the observed data in a + + +

    An object of class 'mixed.mmkin' which has the observed data in a single dataframe which is convenient for plotting

    Examples

    -
    sampling_times = c(0, 1, 3, 7, 14, 28, 60, 90, 120)
    -n_biphasic <- 8
    -err_1 = list(const = 1, prop = 0.07)
    -
    -DFOP_SFO <- mkinmod(
    -  parent = mkinsub("DFOP", "m1"),
    -  m1 = mkinsub("SFO"),
    -  quiet = TRUE)
    -
    -set.seed(123456)
    -log_sd <- 0.3
    -syn_biphasic_parms <- as.matrix(data.frame(
    -  k1 = rlnorm(n_biphasic, log(0.05), log_sd),
    -  k2 = rlnorm(n_biphasic, log(0.01), log_sd),
    -  g = plogis(rnorm(n_biphasic, 0, log_sd)),
    -  f_parent_to_m1 = plogis(rnorm(n_biphasic, 0, log_sd)),
    -  k_m1 = rlnorm(n_biphasic, log(0.002), log_sd)))
    -
    -ds_biphasic_mean <- lapply(1:n_biphasic,
    -  function(i) {
    -    mkinpredict(DFOP_SFO, syn_biphasic_parms[i, ],
    -      c(parent = 100, m1 = 0), sampling_times)
    -  }
    -)
    -
    -set.seed(123456L)
    -ds_biphasic <- lapply(ds_biphasic_mean, function(ds) {
    -  add_err(ds,
    -    sdfunc = function(value) sqrt(err_1$const^2 + value^2 * err_1$prop^2),
    -    n = 1, secondary = "m1")[[1]]
    -})
    -
    -# \dontrun{
    -f_mmkin <- mmkin(list("DFOP-SFO" = DFOP_SFO), ds_biphasic, error_model = "tc", quiet = TRUE)
    -
    -f_mixed <- mixed(f_mmkin)
    -print(f_mixed)
    +    
    sampling_times = c(0, 1, 3, 7, 14, 28, 60, 90, 120)
    +n_biphasic <- 8
    +err_1 = list(const = 1, prop = 0.07)
    +
    +DFOP_SFO <- mkinmod(
    +  parent = mkinsub("DFOP", "m1"),
    +  m1 = mkinsub("SFO"),
    +  quiet = TRUE)
    +
    +set.seed(123456)
    +log_sd <- 0.3
    +syn_biphasic_parms <- as.matrix(data.frame(
    +  k1 = rlnorm(n_biphasic, log(0.05), log_sd),
    +  k2 = rlnorm(n_biphasic, log(0.01), log_sd),
    +  g = plogis(rnorm(n_biphasic, 0, log_sd)),
    +  f_parent_to_m1 = plogis(rnorm(n_biphasic, 0, log_sd)),
    +  k_m1 = rlnorm(n_biphasic, log(0.002), log_sd)))
    +
    +ds_biphasic_mean <- lapply(1:n_biphasic,
    +  function(i) {
    +    mkinpredict(DFOP_SFO, syn_biphasic_parms[i, ],
    +      c(parent = 100, m1 = 0), sampling_times)
    +  }
    +)
    +
    +set.seed(123456L)
    +ds_biphasic <- lapply(ds_biphasic_mean, function(ds) {
    +  add_err(ds,
    +    sdfunc = function(value) sqrt(err_1$const^2 + value^2 * err_1$prop^2),
    +    n = 1, secondary = "m1")[[1]]
    +})
    +
    +# \dontrun{
    +f_mmkin <- mmkin(list("DFOP-SFO" = DFOP_SFO), ds_biphasic, error_model = "tc", quiet = TRUE)
    +
    +f_mixed <- mixed(f_mmkin)
    +print(f_mixed)
     #> Kinetic model fitted by nonlinear regression to each dataset
     #> Structural model:
     #> d_parent/dt = - ((k1 * g * exp(-k1 * time) + k2 * (1 - g) * exp(-k2 *
    @@ -177,12 +194,12 @@ single dataframe which is convenient for plotting

    #> #> Mean fitted parameters: #> parent_0 log_k_m1 f_parent_qlogis log_k1 log_k2 -#> 100.674757 -8.762456 -0.004347 -3.348812 -3.986853 +#> 100.674757 -8.761916 -0.004347 -3.348812 -3.986853 #> g_qlogis -#> -0.087391 -plot(f_mixed) +#> -0.087392 +plot(f_mixed) -# } +# }
    @@ -197,7 +214,7 @@ single dataframe which is convenient for plotting

    -

    Site built with pkgdown 2.0.3.

    +

    Site built with pkgdown 2.0.6.

    -- cgit v1.2.1