@@ -253,52 +262,30 @@ On Windows machines, cores > 1 is currently not supported.
SFO_SFO.ff <- mkinmod(parent = mkinsub("SFO", "m1"), m1 = mkinsub("SFO"),
use_of_ff = "max", quiet = TRUE)
f_d_1 <- mkinfit(SFO_SFO, subset(FOCUS_2006_D, value != 0), quiet = TRUE)
-system.time(ci_profile <- confint(f_d_1, method = "profile", cores = 1, quiet = TRUE))#> User System verstrichen
-#> 51.058 0.000 51.088
#> Error in mkinpredict.mkinmod(mkinmod, parms, odeini, outtimes, solution_type = solution_type, use_compiled = use_compiled, method.ode = method.ode, atol = atol, rtol = rtol, ...): Differential equations were not integrated for all output times because
+#> NaN values occurred in output from ode()
#> Timing stopped at: 11.39 0 11.4
#> Profiling the likelihood
#> User System verstrichen
-#> 0.005 0.004 11.349
ci_profile
#> 2.5% 97.5%
-#> parent_0 96.456003650 1.027703e+02
-#> k_parent_sink 0.040762501 5.549764e-02
-#> k_parent_m1 0.046786482 5.500879e-02
-#> k_m1_sink 0.003892605 6.702778e-03
-#> sigma 2.535612399 3.985263e+00
ci_profile
#> Error in eval(expr, envir, enclos): Objekt 'ci_profile' nicht gefunden
#> 2.5% 97.5%
-#> parent_0 96.403841649 1.027931e+02
+#> parent_0 96.403841641 1.027931e+02
#> k_parent_sink 0.041033378 5.596269e-02
#> k_parent_m1 0.046777902 5.511931e-02
#> k_m1_sink 0.004012217 6.897547e-03
#> sigma 2.396089689 3.854918e+00
#> 2.5% 97.5%
-#> parent_0 96.403841653 102.79312450
+#> parent_0 96.403841648 102.79312450
#> k_parent_sink 0.040485331 0.05535491
-#> k_parent_m1 0.046611581 0.05494364
+#> k_parent_m1 0.046611582 0.05494364
#> k_m1_sink 0.003835483 0.00668582
#> sigma 2.396089689 3.85491806
#> 2.5% 97.5%
-#> parent_0 FALSE FALSE
-#> k_parent_sink TRUE FALSE
-#> k_parent_m1 TRUE FALSE
-#> k_m1_sink FALSE FALSE
-#> sigma FALSE FALSE
#> 2.5% 97.5%
-#> parent_0 0.000541 0.000222
-#> k_parent_sink 0.006650 0.008380
-#> k_parent_m1 0.000183 0.002010
-#> k_m1_sink 0.030700 0.029100
-#> sigma 0.055000 0.032700
#> 2.5% 97.5%
-#> parent_0 0.000541 0.000222
-#> k_parent_sink 0.006800 0.002570
-#> k_parent_m1 0.003740 0.001180
-#> k_m1_sink 0.014700 0.002530
-#> sigma 0.055000 0.032700
#> Error in eval(expr, envir, enclos): Objekt 'ci_profile' nicht gefunden
#> Error in eval(expr, envir, enclos): Objekt 'ci_profile' nicht gefunden
rel_diffs_transformed < rel_diffs_untransformed
#> Error in eval(expr, envir, enclos): Objekt 'rel_diffs_transformed' nicht gefunden
#> Error in eval(expr, envir, enclos): Objekt 'rel_diffs_transformed' nicht gefunden
#> Error in eval(expr, envir, enclos): Objekt 'rel_diffs_untransformed' nicht gefunden
#> 2.5% 97.5%
-#> parent_0 96.403840123 1.027931e+02
-#> k_parent 0.090823791 1.072543e-01
+#> parent_0 96.403839992 1.027931e+02
+#> k_parent 0.090823790 1.072543e-01
#> k_m1 0.004012216 6.897547e-03
-#> f_parent_to_m1 0.469118710 5.595960e-01
+#> f_parent_to_m1 0.469118711 5.595960e-01
#> sigma 2.396089689 3.854918e+00
#> 2.5% 97.5%
-#> parent_0 96.403840057 1.027931e+02
-#> k_parent 0.090491932 1.069035e-01
+#> parent_0 96.403839944 1.027931e+02
+#> k_parent 0.090491931 1.069035e-01
#> k_m1 0.003835483 6.685819e-03
-#> f_parent_to_m1 0.469113361 5.598386e-01
+#> f_parent_to_m1 0.469113362 5.598386e-01
#> sigma 2.396089689 3.854918e+00
rel_diffs_transformed_ff
#> 2.5% 97.5%
-#> parent_0 0.0005408012 0.0002217857
-#> k_parent 0.0009596303 0.0009003981
-#> k_m1 0.0307277425 0.0290579163
-#> f_parent_to_m1 0.0046884178 0.0027782643
+#> sigma FALSE FALSE
rel_diffs_transformed_ff
#> 2.5% 97.5%
+#> parent_0 0.0005408026 0.0002217846
+#> k_parent 0.0009596414 0.0009003877
+#> k_m1 0.0307277403 0.0290579212
+#> f_parent_to_m1 0.0046884168 0.0027782604
#> sigma 0.0550252516 0.0327066836
rel_diffs_untransformed_ff
#> 2.5% 97.5%
-#> parent_0 0.0005408019 0.0002217863
-#> k_parent 0.0046099989 0.0023730118
-#> k_m1 0.0146746451 0.0025300990
-#> f_parent_to_m1 0.0046997668 0.0023460293
+#> parent_0 0.0005408031 0.0002217851
+#> k_parent 0.0046100089 0.0023730230
+#> k_m1 0.0146746442 0.0025300972
+#> f_parent_to_m1 0.0046997642 0.0023460268
#> sigma 0.0550252516 0.0327066836
#> 2.5% 97.5%
-#> parent_0 94.596183241 106.19937044
-#> k_M1 0.037605436 0.04490758
-#> k_M2 0.008568746 0.01087675
-#> f_parent_to_M1 0.021464277 0.62023879
-#> f_parent_to_M2 0.015166876 0.37975352
-#> k1 0.273897622 0.33388081
-#> k2 0.018614564 0.02250380
-#> g 0.671943572 0.73583247
-#> sigma_low 0.251284138 0.83992136
-#> rsd_high 0.040410998 0.07661999
#> 2.5% 97.5%
-#> parent_0 94.59618 106.1994
# }
+#> parent_0 94.596218141 106.19934683
+#> k_M1 0.037605440 0.04490756
+#> k_M2 0.008568747 0.01087674
+#> f_parent_to_M1 0.021466788 0.62023878
+#> f_parent_to_M2 0.015168650 0.37975352
+#> k1 0.273897581 0.33388066
+#> k2 0.018614556 0.02250379
+#> g 0.671943831 0.73583255
+#> sigma_low 0.251283700 0.83992071
+#> rsd_high 0.040411017 0.07662005
#> 2.5% 97.5%
+#> parent_0 94.59622 106.1993
# }
diff --git a/docs/reference/lrtest.mkinfit.html b/docs/reference/lrtest.mkinfit.html
index 70157db9..6861b747 100644
--- a/docs/reference/lrtest.mkinfit.html
+++ b/docs/reference/lrtest.mkinfit.html
@@ -73,7 +73,7 @@ and can be expressed by fixing the parameters of the other." />
mkin
- 0.9.49.8
+ 0.9.49.9
@@ -205,7 +205,7 @@ lower number of fitted parameters (null hypothesis).
#lrtest(dfop_fit, error_model = "tc")
#lrtest(dfop_fit, fixed_parms = c(k2 = 0))
-# However, this equivalent syntax works for static help pages
+# However, this equivalent syntax also works for static help pages
lrtest(dfop_fit, update(dfop_fit, error_model = "tc"))#> Likelihood ratio test
#>
#> Model 1: DFOP with error model tc
diff --git a/docs/reference/mkinds.html b/docs/reference/mkinds.html
index 386c00d7..c1cdcf99 100644
--- a/docs/reference/mkinds.html
+++ b/docs/reference/mkinds.html
@@ -69,7 +69,7 @@
mkin
- 0.9.49.6
+ 0.9.49.9
@@ -136,7 +136,6 @@
A dataset class for mkin
- mkinds
@@ -164,6 +163,33 @@
value in order to be compatible with mkinfit
+ Methods
+
+
+Public methods
+
+
+
+Method new()
+
+Usage
+mkinds$new(title = "", data, time_unit = NA, unit = NA)
+
+
+Method clone()
+The objects of this class are cloneable with this method.
Usage
+mkinds$clone(deep = FALSE)
+
+Arguments
+
+deep
Whether to make a deep clone.
+
+
+
+
Examples
@@ -144,11 +144,20 @@ and this error model plot can be obtained with show_errplot = TRUE
.
- mkinerrplot(object, obs_vars = names(object$mkinmod$map), xlim = c(0,
- 1.1 * max(object$data$predicted)), xlab = "Predicted",
- ylab = "Squared residual", maxy = "auto", legend = TRUE,
- lpos = "topright", col_obs = "auto", pch_obs = "auto",
- frame = TRUE, ...)
+ mkinerrplot(
+ object,
+ obs_vars = names(object$mkinmod$map),
+ xlim = c(0, 1.1 * max(object$data$predicted)),
+ xlab = "Predicted",
+ ylab = "Squared residual",
+ maxy = "auto",
+ legend = TRUE,
+ lpos = "topright",
+ col_obs = "auto",
+ pch_obs = "auto",
+ frame = TRUE,
+ ...
+)
Arguments
diff --git a/docs/reference/mkinfit.html b/docs/reference/mkinfit.html
index 7ee73f15..ffc8d52b 100644
--- a/docs/reference/mkinfit.html
+++ b/docs/reference/mkinfit.html
@@ -75,7 +75,7 @@ likelihood function." />
mkin
- 0.9.49.6
+ 0.9.49.9
@@ -148,18 +148,33 @@ degradation model parameters, as both of them are arguments of the
likelihood function.
- mkinfit(mkinmod, observed, parms.ini = "auto", state.ini = "auto",
- err.ini = "auto", fixed_parms = NULL,
- fixed_initials = names(mkinmod$diffs)[-1], from_max_mean = FALSE,
+ mkinfit(
+ mkinmod,
+ observed,
+ parms.ini = "auto",
+ state.ini = "auto",
+ err.ini = "auto",
+ fixed_parms = NULL,
+ fixed_initials = names(mkinmod$diffs)[-1],
+ from_max_mean = FALSE,
solution_type = c("auto", "analytical", "eigen", "deSolve"),
- method.ode = "lsoda", use_compiled = "auto",
+ method.ode = "lsoda",
+ use_compiled = "auto",
control = list(eval.max = 300, iter.max = 200),
- transform_rates = TRUE, transform_fractions = TRUE, quiet = FALSE,
- atol = 1e-08, rtol = 1e-10, n.outtimes = 100,
+ transform_rates = TRUE,
+ transform_fractions = TRUE,
+ quiet = FALSE,
+ atol = 1e-08,
+ rtol = 1e-10,
+ n.outtimes = 100,
error_model = c("const", "obs", "tc"),
- error_model_algorithm = c("auto", "d_3", "direct", "twostep",
- "threestep", "fourstep", "IRLS", "OLS"), reweight.tol = 1e-08,
- reweight.max.iter = 10, trace_parms = FALSE, ...)
+ error_model_algorithm = c("auto", "d_3", "direct", "twostep", "threestep", "fourstep",
+ "IRLS", "OLS"),
+ reweight.tol = 1e-08,
+ reweight.max.iter = 10,
+ trace_parms = FALSE,
+ ...
+)
Arguments
@@ -400,17 +415,17 @@ estimators.
#> mkin version used for fitting: 0.9.49.6
-#> R version used for fitting: 3.6.1
-#> Date of fit: Fri Nov 1 10:08:21 2019
-#> Date of summary: Fri Nov 1 10:08:21 2019
+
summary(
fit)
#> mkin version used for fitting: 0.9.49.9
+#> R version used for fitting: 3.6.3
+#> Date of fit: Mon Mar 30 21:41:20 2020
+#> Date of summary: Mon Mar 30 21:41:20 2020
#>
#> Equations:
#> d_parent/dt = - (alpha/beta) * 1/((time/beta) + 1) * parent
#>
#> Model predictions using solution type analytical
#>
-#> Fitted using 222 model solutions performed in 0.456 s
+#> Fitted using 222 model solutions performed in 0.463 s
#>
#> Error model: Constant variance
#>
@@ -440,10 +455,10 @@ estimators.
#>
#> Parameter correlation:
#> parent_0 log_alpha log_beta sigma
-#> parent_0 1.000e+00 -1.565e-01 -3.142e-01 4.770e-08
-#> log_alpha -1.565e-01 1.000e+00 9.564e-01 9.974e-08
-#> log_beta -3.142e-01 9.564e-01 1.000e+00 8.468e-08
-#> sigma 4.770e-08 9.974e-08 8.468e-08 1.000e+00
+#> parent_0 1.000e+00 -1.565e-01 -3.142e-01 4.758e-08
+#> log_alpha -1.565e-01 1.000e+00 9.564e-01 1.007e-07
+#> log_beta -3.142e-01 9.564e-01 1.000e+00 8.568e-08
+#> sigma 4.758e-08 1.007e-07 8.568e-08 1.000e+00
#>
#> Backtransformed parameters:
#> Confidence intervals for internally transformed parameters are asymmetric.
@@ -482,7 +497,7 @@ estimators.
m1 = mkinsub(
"SFO"))
#> Successfully compiled differential equation model from auto-generated C code.
#> Warning: Observations with value of zero were removed from the data
#> User System verstrichen
-#> 1.488 0.000 1.491
#> NULL
#> $ff
+#> 1.526 0.000 1.530
#> NULL
#> $ff
#> parent_sink parent_m1 m1_sink
#> 0.485524 0.514476 1.000000
#>
@@ -533,9 +548,9 @@ estimators.
#> Sum of squared residuals at call 82: 373.1711
#> Sum of squared residuals at call 84: 373.1711
#> Sum of squared residuals at call 87: 372.6445
-#> Sum of squared residuals at call 88: 372.1615
-#> Sum of squared residuals at call 90: 372.1615
-#> Sum of squared residuals at call 91: 372.1615
+#> Sum of squared residuals at call 88: 372.1614
+#> Sum of squared residuals at call 90: 372.1614
+#> Sum of squared residuals at call 91: 372.1614
#> Sum of squared residuals at call 94: 371.6464
#> Sum of squared residuals at call 99: 371.4299
#> Sum of squared residuals at call 101: 371.4299
@@ -555,7 +570,7 @@ estimators.
#> Sum of squared residuals at call 126: 371.2134
#> Sum of squared residuals at call 135: 371.2134
#> Negative log-likelihood at call 145: 97.22429
#> Optimisation successfully terminated.
#> User System verstrichen
-#> 1.058 0.000 1.059
#> NULL
#> $ff
+#> 1.083 0.000 1.084
#> NULL
#> $ff
#> parent_sink parent_m1 m1_sink
#> 0.485524 0.514476 1.000000
#>
@@ -589,10 +604,10 @@ estimators.
# \dontrun{
# 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)
#> Warning: Observations with value of zero were removed from the data
#> mkin version used for fitting: 0.9.49.6
-#> R version used for fitting: 3.6.1
-#> Date of fit: Fri Nov 1 10:08:36 2019
-#> Date of summary: Fri Nov 1 10:08:36 2019
+
m1 = mkinsub(
"SFO"),
use_of_ff = "max")
#> Successfully compiled differential equation model from auto-generated C code.
f.noweight <- mkinfit(SFO_SFO.ff, FOCUS_2006_D, quiet = TRUE)
#> Warning: Observations with value of zero were removed from the data
#> mkin version used for fitting: 0.9.49.9
+#> R version used for fitting: 3.6.3
+#> Date of fit: Mon Mar 30 21:41:36 2020
+#> Date of summary: Mon Mar 30 21:41:36 2020
#>
#> Equations:
#> d_parent/dt = - k_parent * parent
@@ -600,7 +615,7 @@ estimators.
#>
#> Model predictions using solution type deSolve
#>
-#> Fitted using 421 model solutions performed in 1.083 s
+#> Fitted using 422 model solutions performed in 1.144 s
#>
#> Error model: Constant variance
#>
@@ -634,11 +649,11 @@ estimators.
#>
#> Parameter correlation:
#> parent_0 log_k_parent log_k_m1 f_parent_ilr_1 sigma
-#> parent_0 1.000e+00 5.174e-01 -1.688e-01 -5.471e-01 -2.265e-07
-#> log_k_parent 5.174e-01 1.000e+00 -3.263e-01 -5.426e-01 3.785e-07
-#> log_k_m1 -1.688e-01 -3.263e-01 1.000e+00 7.478e-01 -1.386e-07
-#> f_parent_ilr_1 -5.471e-01 -5.426e-01 7.478e-01 1.000e+00 -3.641e-08
-#> sigma -2.265e-07 3.785e-07 -1.386e-07 -3.641e-08 1.000e+00
+#> parent_0 1.000e+00 5.174e-01 -1.688e-01 -5.471e-01 -2.443e-07
+#> log_k_parent 5.174e-01 1.000e+00 -3.263e-01 -5.426e-01 3.181e-07
+#> log_k_m1 -1.688e-01 -3.263e-01 1.000e+00 7.478e-01 -1.369e-07
+#> f_parent_ilr_1 -5.471e-01 -5.426e-01 7.478e-01 1.000e+00 -2.287e-08
+#> sigma -2.443e-07 3.181e-07 -1.369e-07 -2.287e-08 1.000e+00
#>
#> Backtransformed parameters:
#> Confidence intervals for internally transformed parameters are asymmetric.
@@ -706,10 +721,10 @@ estimators.
#> 100 m1 31.04 31.98163 -9.416e-01
#> 100 m1 33.13 31.98163 1.148e+00
#> 120 m1 25.15 28.78984 -3.640e+00
-#> 120 m1 33.31 28.78984 4.520e+00
f.obs <- mkinfit(SFO_SFO.ff, FOCUS_2006_D, error_model = "obs", quiet = TRUE)
#> Warning: Observations with value of zero were removed from the data
#> mkin version used for fitting: 0.9.49.6
-#> R version used for fitting: 3.6.1
-#> Date of fit: Fri Nov 1 10:08:39 2019
-#> Date of summary: Fri Nov 1 10:08:39 2019
+#> 120 m1 33.31 28.78984 4.520e+00
f.obs <- mkinfit(SFO_SFO.ff, FOCUS_2006_D, error_model = "obs", quiet = TRUE)
#> Warning: Observations with value of zero were removed from the data
#> mkin version used for fitting: 0.9.49.9
+#> R version used for fitting: 3.6.3
+#> Date of fit: Mon Mar 30 21:41:39 2020
+#> Date of summary: Mon Mar 30 21:41:39 2020
#>
#> Equations:
#> d_parent/dt = - k_parent * parent
@@ -717,7 +732,7 @@ estimators.
#>
#> Model predictions using solution type deSolve
#>
-#> Fitted using 978 model solutions performed in 2.553 s
+#> Fitted using 979 model solutions performed in 2.576 s
#>
#> Error model: Variance unique to each observed variable
#>
@@ -838,10 +853,10 @@ estimators.
#> 100 m1 31.04 31.98773 -9.477e-01
#> 100 m1 33.13 31.98773 1.142e+00
#> 120 m1 25.15 28.80429 -3.654e+00
-#> 120 m1 33.31 28.80429 4.506e+00
f.tc <- mkinfit(SFO_SFO.ff, FOCUS_2006_D, error_model = "tc", quiet = TRUE)
#> Warning: Observations with value of zero were removed from the data
#> mkin version used for fitting: 0.9.49.6
-#> R version used for fitting: 3.6.1
-#> Date of fit: Fri Nov 1 10:08:48 2019
-#> Date of summary: Fri Nov 1 10:08:48 2019
+#> 120 m1 33.31 28.80429 4.506e+00
f.tc <- mkinfit(SFO_SFO.ff, FOCUS_2006_D, error_model = "tc", quiet = TRUE)
#> Warning: Observations with value of zero were removed from the data
#> mkin version used for fitting: 0.9.49.9
+#> R version used for fitting: 3.6.3
+#> Date of fit: Mon Mar 30 21:41:50 2020
+#> Date of summary: Mon Mar 30 21:41:50 2020
#>
#> Equations:
#> d_parent/dt = - k_parent * parent
@@ -849,12 +864,12 @@ estimators.
#>
#> Model predictions using solution type deSolve
#>
-#> Fitted using 2289 model solutions performed in 9.253 s
+#> Fitted using 2552 model solutions performed in 10.593 s
#>
#> Error model: Two-component variance function
#>
#> Error model algorithm: d_3
-#> Direct fitting and three-step fitting yield approximately the same likelihood
+#> Three-step fitting yielded a higher likelihood than direct fitting
#>
#> Starting values for parameters to be optimised:
#> value type
@@ -960,8 +975,8 @@ estimators.
#> 50 m1 40.01 41.34199 -1.331985
#> 75 m1 40.09 36.61471 3.475295
#> 75 m1 33.85 36.61471 -2.764705
-#> 100 m1 31.04 32.20082 -1.160823
-#> 100 m1 33.13 32.20082 0.929177
+#> 100 m1 31.04 32.20082 -1.160824
+#> 100 m1 33.13 32.20082 0.929176
#> 120 m1 25.15 29.04130 -3.891304
#> 120 m1 33.31 29.04130 4.268696
@@ -142,8 +142,13 @@ to other observed compartments. Instead of specifying several expressions, a
list of lists can be given in the speclist argument.
- mkinmod(..., use_of_ff = "min", speclist = NULL, quiet = FALSE,
- verbose = FALSE)
+ mkinmod(
+ ...,
+ use_of_ff = "min",
+ speclist = NULL,
+ quiet = FALSE,
+ verbose = FALSE
+)
Arguments
@@ -239,7 +244,7 @@ in the FOCUS and NAFTA guidance documents are used.
SFO_SFO <- mkinmod(
parent = mkinsub("SFO", "m1"),
m1 = mkinsub("SFO"), verbose = TRUE)#> Compilation argument:
-#> /usr/lib/R/bin/R CMD SHLIB file12cd48616f1.c 2> file12cd48616f1.c.err.txt
+#> /usr/lib/R/bin/R CMD SHLIB file414965c335f6.c 2> file414965c335f6.c.err.txt
#> Program source:
#> 1: #include <R.h>
#> 2:
diff --git a/docs/reference/mkinpredict.html b/docs/reference/mkinpredict.html
index 0eca973c..fe5bc975 100644
--- a/docs/reference/mkinpredict.html
+++ b/docs/reference/mkinpredict.html
@@ -71,7 +71,7 @@ kinetic parameters and initial values for the state variables." />
mkin
- 0.9.49.6
+ 0.9.49.9
@@ -140,24 +140,49 @@ kinetic model as specified by mkinmod
, u
kinetic parameters and initial values for the state variables.
- mkinpredict(x, odeparms, odeini, outtimes = seq(0, 120, by = 0.1),
- solution_type = "deSolve", use_compiled = "auto",
- method.ode = "lsoda", atol = 1e-08, rtol = 1e-10,
- map_output = TRUE, ...)
+ mkinpredict(
+ x,
+ odeparms,
+ odeini,
+ outtimes = seq(0, 120, by = 0.1),
+ solution_type = "deSolve",
+ use_compiled = "auto",
+ method.ode = "lsoda",
+ atol = 1e-08,
+ rtol = 1e-10,
+ map_output = TRUE,
+ ...
+)
# S3 method for mkinmod
-mkinpredict(x, odeparms = c(k_parent_sink = 0.1),
- odeini = c(parent = 100), outtimes = seq(0, 120, by = 0.1),
- solution_type = "deSolve", use_compiled = "auto",
- method.ode = "lsoda", atol = 1e-08, rtol = 1e-10,
- map_output = TRUE, ...)
+mkinpredict(
+ x,
+ odeparms = c(k_parent_sink = 0.1),
+ odeini = c(parent = 100),
+ outtimes = seq(0, 120, by = 0.1),
+ solution_type = "deSolve",
+ use_compiled = "auto",
+ method.ode = "lsoda",
+ atol = 1e-08,
+ rtol = 1e-10,
+ map_output = TRUE,
+ ...
+)
# S3 method for mkinfit
-mkinpredict(x, odeparms = x$bparms.ode,
- odeini = x$bparms.state, outtimes = seq(0, 120, by = 0.1),
- solution_type = "deSolve", use_compiled = "auto",
- method.ode = "lsoda", atol = 1e-08, rtol = 1e-10,
- map_output = TRUE, ...)
+mkinpredict(
+ x,
+ odeparms = x$bparms.ode,
+ odeini = x$bparms.state,
+ outtimes = seq(0, 120, by = 0.1),
+ solution_type = "deSolve",
+ use_compiled = "auto",
+ method.ode = "lsoda",
+ atol = 1e-08,
+ rtol = 1e-10,
+ map_output = TRUE,
+ ...
+)
Arguments
@@ -350,7 +375,7 @@ solver is used.
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 verstrichen
-#> 0.004 0.000 0.003
#> time parent m1
@@ -360,7 +385,7 @@ solver is used.
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 verstrichen
-#> 0.021 0.000 0.022
+#> 0.021 0.000 0.021
#> Ordinary least squares optimisation
#> Sum of squared residuals at call 1: 552.5739
@@ -372,10 +397,10 @@ solver is used.
#> Sum of squared residuals at call 9: 279.9294
#> Sum of squared residuals at call 12: 200.3629
#> Sum of squared residuals at call 13: 200.3629
-#> Sum of squared residuals at call 18: 197.9039
-#> Sum of squared residuals at call 23: 197.9039
-#> Sum of squared residuals at call 25: 196.6754
-#> Sum of squared residuals at call 27: 196.6754
+#> Sum of squared residuals at call 18: 197.904
+#> Sum of squared residuals at call 22: 197.904
+#> Sum of squared residuals at call 25: 196.6753
+#> Sum of squared residuals at call 27: 196.6753
#> Sum of squared residuals at call 32: 196.5742
#> Sum of squared residuals at call 33: 196.5742
#> Sum of squared residuals at call 34: 196.5742
@@ -390,14 +415,13 @@ solver is used.
#> Sum of squared residuals at call 58: 196.5334
#> Sum of squared residuals at call 59: 196.5334
#> Sum of squared residuals at call 65: 196.5334
-#> Sum of squared residuals at call 73: 196.5334
#> Negative log-likelihood at call 75: 26.64668
#> Optimisation successfully terminated.
#> time parent m1
#> 1 0.0 82.49216 0.000000
-#> 2 0.1 80.00563 1.179955
-#> 3 0.2 77.59404 2.312580
-#> 4 0.3 75.25515 3.399419
-#> 5 0.4 72.98675 4.441969
-#> 6 0.5 70.78673 5.441679
# }
+#> 2 0.1 80.00563 1.179963
+#> 3 0.2 77.59404 2.312596
+#> 4 0.3 75.25515 3.399443
+#> 5 0.4 72.98675 4.442000
+#> 6 0.5 70.78673 5.441717
# }
diff --git a/docs/reference/mkinresplot.html b/docs/reference/mkinresplot.html
index 4429798b..698af302 100644
--- a/docs/reference/mkinresplot.html
+++ b/docs/reference/mkinresplot.html
@@ -72,7 +72,7 @@ argument show_residuals = TRUE." />
mkin
- 0.9.49.8
+ 0.9.49.9
@@ -142,11 +142,21 @@ the residuals can be obtained using plot.mkinf
argument show_residuals = TRUE
.
- mkinresplot(object, obs_vars = names(object$mkinmod$map), xlim = c(0,
- 1.1 * max(object$data$time)), standardized = FALSE, xlab = "Time",
+ mkinresplot(
+ object,
+ obs_vars = names(object$mkinmod$map),
+ xlim = c(0, 1.1 * max(object$data$time)),
+ standardized = FALSE,
+ xlab = "Time",
ylab = ifelse(standardized, "Standardized residual", "Residual"),
- maxabs = "auto", legend = TRUE, lpos = "topright",
- col_obs = "auto", pch_obs = "auto", frame = TRUE, ...)
+ maxabs = "auto",
+ legend = TRUE,
+ lpos = "topright",
+ col_obs = "auto",
+ pch_obs = "auto",
+ frame = TRUE,
+ ...
+)
Arguments
diff --git a/docs/reference/mmkin-2.png b/docs/reference/mmkin-2.png
index 5e264309..7b1d73d5 100644
Binary files a/docs/reference/mmkin-2.png and b/docs/reference/mmkin-2.png differ
diff --git a/docs/reference/mmkin-3.png b/docs/reference/mmkin-3.png
index 0a58a86b..4c412abc 100644
Binary files a/docs/reference/mmkin-3.png and b/docs/reference/mmkin-3.png differ
diff --git a/docs/reference/mmkin.html b/docs/reference/mmkin.html
index d1ea7a52..8e1ea54f 100644
--- a/docs/reference/mmkin.html
+++ b/docs/reference/mmkin.html
@@ -72,7 +72,7 @@ datasets specified in its first two arguments." />
mkin
- 0.9.49.6
+ 0.9.49.9
@@ -141,15 +141,20 @@ more datasets
datasets specified in its first two arguments.
- mmkin(models = c("SFO", "FOMC", "DFOP"), datasets,
- cores = round(detectCores()/2), cluster = NULL, ...)
+ mmkin(
+ models = c("SFO", "FOMC", "DFOP"),
+ datasets,
+ cores = round(detectCores()/2),
+ cluster = NULL,
+ ...
+)
Arguments
models |
- Either a character vector of shorthand names like
+ | Either a character vector of shorthand names like
c("SFO", "FOMC", "DFOP", "HS", "SFORB") , or an optionally named
list of mkinmod objects. |
@@ -202,11 +207,11 @@ for parallel execution.
time_1 <- system.time(fits.4 <- mmkin(models, datasets, cores = 1, quiet = TRUE))
time_default#> User System verstrichen
-#> 0.014 0.024 4.895
time_1
#> User System verstrichen
-#> 19.047 0.004 19.063
+#> 18.739 0.379 6.198
time_1
#> User System verstrichen
+#> 19.910 0.000 19.925
#> $ff
#> parent_M1 parent_sink M1_M2 M1_sink
-#> 0.7340481 0.2659519 0.7505684 0.2494316
+#> 0.7340480 0.2659520 0.7505686 0.2494314
#>
#> $SFORB
#> logical(0)
@@ -214,8 +219,8 @@ for parallel execution.
#> $distimes
#> DT50 DT90
#> parent 0.8777689 2.915885
-#> M1 2.3257449 7.725957
-#> M2 33.7200958 112.015734
+#> M1 2.3257452 7.725958
+#> M2 33.7200890 112.015711
#>
@@ -141,22 +141,47 @@ observed data together with the solution of the fitted model.
# S3 method for mkinfit
-plot(x, fit = x, obs_vars = names(fit$mkinmod$map),
- xlab = "Time", ylab = "Observed", xlim = range(fit$data$time),
- ylim = "default", col_obs = 1:length(obs_vars), pch_obs = col_obs,
- lty_obs = rep(1, length(obs_vars)), add = FALSE, legend = !add,
- show_residuals = FALSE, show_errplot = FALSE, maxabs = "auto",
- sep_obs = FALSE, rel.height.middle = 0.9, row_layout = FALSE,
- lpos = "topright", inset = c(0.05, 0.05), show_errmin = FALSE,
- errmin_digits = 3, frame = TRUE, ...)
-
-plot_sep(fit, show_errmin = TRUE,
- show_residuals = ifelse(identical(fit$err_mod, "const"), TRUE,
- "standardized"), ...)
-
-plot_res(fit, sep_obs = FALSE, show_errmin = sep_obs,
+plot(
+ x,
+ fit = x,
+ obs_vars = names(fit$mkinmod$map),
+ xlab = "Time",
+ ylab = "Observed",
+ xlim = range(fit$data$time),
+ ylim = "default",
+ col_obs = 1:length(obs_vars),
+ pch_obs = col_obs,
+ lty_obs = rep(1, length(obs_vars)),
+ add = FALSE,
+ legend = !add,
+ show_residuals = FALSE,
+ show_errplot = FALSE,
+ maxabs = "auto",
+ sep_obs = FALSE,
+ rel.height.middle = 0.9,
+ row_layout = FALSE,
+ lpos = "topright",
+ inset = c(0.05, 0.05),
+ show_errmin = FALSE,
+ errmin_digits = 3,
+ frame = TRUE,
+ ...
+)
+
+plot_sep(
+ fit,
+ show_errmin = TRUE,
+ show_residuals = ifelse(identical(fit$err_mod, "const"), TRUE, "standardized"),
+ ...
+)
+
+plot_res(
+ fit,
+ sep_obs = FALSE,
+ show_errmin = sep_obs,
standardized = ifelse(identical(fit$err_mod, "const"), FALSE, TRUE),
- ...)
+ ...
+)
plot_err(fit, sep_obs = FALSE, show_errmin = sep_obs, ...)
diff --git a/docs/reference/plot.mmkin.html b/docs/reference/plot.mmkin.html
index 18907aa2..9d41b4c1 100644
--- a/docs/reference/plot.mmkin.html
+++ b/docs/reference/plot.mmkin.html
@@ -73,7 +73,7 @@ the fit of at least one model to the same dataset is shown." />
mkin
- 0.9.49.8
+ 0.9.49.9
@@ -144,10 +144,19 @@ the fit of at least one model to the same dataset is shown.
# S3 method for mmkin
-plot(x, main = "auto", legends = 1,
- resplot = c("time", "errmod"), show_errmin = TRUE,
- errmin_var = "All data", errmin_digits = 3, cex = 0.7,
- rel.height.middle = 0.9, ymax = "auto", ...)
+plot(
+ x,
+ main = "auto",
+ legends = 1,
+ resplot = c("time", "errmod"),
+ show_errmin = TRUE,
+ errmin_var = "All data",
+ errmin_digits = 3,
+ cex = 0.7,
+ rel.height.middle = 0.9,
+ ymax = "auto",
+ ...
+)
Arguments
diff --git a/docs/reference/summary.mkinfit.html b/docs/reference/summary.mkinfit.html
index fb3c43ef..ec79c37d 100644
--- a/docs/reference/summary.mkinfit.html
+++ b/docs/reference/summary.mkinfit.html
@@ -73,7 +73,7 @@ values." />
mkin
- 0.9.49.6
+ 0.9.49.9
@@ -145,12 +145,10 @@ values.
# S3 method for mkinfit
-summary(object, data = TRUE, distimes = TRUE,
- alpha = 0.05, ...)
+summary(object, data = TRUE, distimes = TRUE, alpha = 0.05, ...)
# S3 method for summary.mkinfit
-print(x, digits = max(3, getOption("digits") -
- 3), ...)
+print(x, digits = max(3, getOption("digits") - 3), ...)
Arguments
@@ -223,17 +221,17 @@ distribution
Examples
#> mkin version used for fitting: 0.9.49.6
-#> R version used for fitting: 3.6.1
-#> Date of fit: Fri Nov 1 10:10:07 2019
-#> Date of summary: Fri Nov 1 10:10:07 2019
+
summary(
mkinfit(
mkinmod(
parent = mkinsub(
"SFO")),
FOCUS_2006_A,
quiet = TRUE))
#> mkin version used for fitting: 0.9.49.9
+#> R version used for fitting: 3.6.3
+#> Date of fit: Mon Mar 30 21:43:00 2020
+#> Date of summary: Mon Mar 30 21:43:00 2020
#>
#> Equations:
#> d_parent/dt = - k_parent_sink * parent
#>
#> Model predictions using solution type analytical
#>
-#> Fitted using 131 model solutions performed in 0.265 s
+#> Fitted using 131 model solutions performed in 0.306 s
#>
#> Error model: Constant variance
#>
@@ -260,9 +258,9 @@ distribution
#>
#> Parameter correlation:
#> parent_0 log_k_parent_sink sigma
-#> parent_0 1.000e+00 5.428e-01 1.648e-07
-#> log_k_parent_sink 5.428e-01 1.000e+00 2.513e-07
-#> sigma 1.648e-07 2.513e-07 1.000e+00
+#> parent_0 1.000e+00 5.428e-01 1.642e-07
+#> log_k_parent_sink 5.428e-01 1.000e+00 2.507e-07
+#> sigma 1.642e-07 2.507e-07 1.000e+00
#>
#> Backtransformed parameters:
#> Confidence intervals for internally transformed parameters are asymmetric.
diff --git a/docs/reference/transform_odeparms.html b/docs/reference/transform_odeparms.html
index 4d88a03e..2a08228d 100644
--- a/docs/reference/transform_odeparms.html
+++ b/docs/reference/transform_odeparms.html
@@ -74,7 +74,7 @@ the ilr transformation is used." />
mkin
- 0.9.49.6
+ 0.9.49.9
@@ -146,11 +146,19 @@ formations fractions that should always sum up to 1 and can not be negative,
the ilr
transformation is used.
- transform_odeparms(parms, mkinmod, transform_rates = TRUE,
- transform_fractions = TRUE)
-
-backtransform_odeparms(transparms, mkinmod, transform_rates = TRUE,
- transform_fractions = TRUE)
+ transform_odeparms(
+ parms,
+ mkinmod,
+ transform_rates = TRUE,
+ transform_fractions = TRUE
+)
+
+backtransform_odeparms(
+ transparms,
+ mkinmod,
+ transform_rates = TRUE,
+ transform_fractions = TRUE
+)
Arguments