From 9d6a975a0e3850a36889a18b5d9929d27b901ab3 Mon Sep 17 00:00:00 2001 From: Johannes Ranke Date: Mon, 4 Mar 2019 14:09:45 +0100 Subject: Make some example output more reproducible In order to avoid some unnecessary documentation rebuilds --- docs/articles/FOCUS_D.html | 6 +- docs/articles/FOCUS_L.html | 36 +-- docs/articles/web_only/NAFTA_examples.html | 14 +- docs/articles/web_only/compiled_models.html | 10 +- docs/reference/Extract.mmkin.html | 367 ---------------------------- docs/reference/NAFTA_SOP_2015.html | 6 +- docs/reference/mccall81_245T.html | 229 ++++------------- docs/reference/mkinfit.html | 44 ++-- docs/reference/mkinmod.html | 2 +- docs/reference/mkinpredict.html | 2 +- docs/reference/mmkin.html | 4 +- docs/reference/nafta.html | 6 +- docs/reference/summary.mkinfit.html | 6 +- docs/reference/transform_odeparms.html | 330 ++++--------------------- man/Extract.mmkin.Rd | 5 - man/mccall81_245T.Rd | 6 +- man/transform_odeparms.Rd | 18 +- 17 files changed, 177 insertions(+), 914 deletions(-) diff --git a/docs/articles/FOCUS_D.html b/docs/articles/FOCUS_D.html index fabb567a..376acee2 100644 --- a/docs/articles/FOCUS_D.html +++ b/docs/articles/FOCUS_D.html @@ -166,8 +166,8 @@
summary(fit)
## mkin version used for fitting:    0.9.48.1 
 ## R version used for fitting:       3.5.2 
-## Date of fit:     Mon Mar  4 10:09:33 2019 
-## Date of summary: Mon Mar  4 10:09:33 2019 
+## Date of fit:     Mon Mar  4 14:06:39 2019 
+## Date of summary: Mon Mar  4 14:06:39 2019 
 ## 
 ## Equations:
 ## d_parent/dt = - k_parent_sink * parent - k_parent_m1 * parent
@@ -175,7 +175,7 @@
 ## 
 ## Model predictions using solution type deSolve 
 ## 
-## Fitted with method Port using 153 model solutions performed in 0.687 s
+## Fitted with method Port using 153 model solutions performed in 0.693 s
 ## 
 ## Weighting: none
 ## 
diff --git a/docs/articles/FOCUS_L.html b/docs/articles/FOCUS_L.html
index 7157f973..5dac9999 100644
--- a/docs/articles/FOCUS_L.html
+++ b/docs/articles/FOCUS_L.html
@@ -114,15 +114,15 @@
 summary(m.L1.SFO)
## mkin version used for fitting:    0.9.48.1 
 ## R version used for fitting:       3.5.2 
-## Date of fit:     Mon Mar  4 10:09:35 2019 
-## Date of summary: Mon Mar  4 10:09:35 2019 
+## Date of fit:     Mon Mar  4 14:06:41 2019 
+## Date of summary: Mon Mar  4 14:06:41 2019 
 ## 
 ## Equations:
 ## d_parent/dt = - k_parent_sink * parent
 ## 
 ## Model predictions using solution type analytical 
 ## 
-## Fitted with method Port using 37 model solutions performed in 0.102 s
+## Fitted with method Port using 37 model solutions performed in 0.095 s
 ## 
 ## Weighting: none
 ## 
@@ -205,15 +205,15 @@
 
summary(m.L1.FOMC, data = FALSE)
## mkin version used for fitting:    0.9.48.1 
 ## R version used for fitting:       3.5.2 
-## Date of fit:     Mon Mar  4 10:09:36 2019 
-## Date of summary: Mon Mar  4 10:09:36 2019 
+## Date of fit:     Mon Mar  4 14:06:43 2019 
+## Date of summary: Mon Mar  4 14:06:43 2019 
 ## 
 ## Equations:
 ## d_parent/dt = - (alpha/beta) * 1/((time/beta) + 1) * parent
 ## 
 ## Model predictions using solution type analytical 
 ## 
-## Fitted with method Port using 611 model solutions performed in 1.508 s
+## Fitted with method Port using 611 model solutions performed in 1.502 s
 ## 
 ## Weighting: none
 ## 
@@ -300,8 +300,8 @@
 
summary(m.L2.FOMC, data = FALSE)
## mkin version used for fitting:    0.9.48.1 
 ## R version used for fitting:       3.5.2 
-## Date of fit:     Mon Mar  4 10:09:37 2019 
-## Date of summary: Mon Mar  4 10:09:37 2019 
+## Date of fit:     Mon Mar  4 14:06:43 2019 
+## Date of summary: Mon Mar  4 14:06:43 2019 
 ## 
 ## Equations:
 ## d_parent/dt = - (alpha/beta) * 1/((time/beta) + 1) * parent
@@ -373,8 +373,8 @@
 ## covariance matrix; singular system.
## mkin version used for fitting:    0.9.48.1 
 ## R version used for fitting:       3.5.2 
-## Date of fit:     Mon Mar  4 10:09:38 2019 
-## Date of summary: Mon Mar  4 10:09:38 2019 
+## Date of fit:     Mon Mar  4 14:06:44 2019 
+## Date of summary: Mon Mar  4 14:06:44 2019 
 ## 
 ## Equations:
 ## d_parent/dt = - ((k1 * g * exp(-k1 * time) + k2 * (1 - g) *
@@ -383,7 +383,7 @@
 ## 
 ## Model predictions using solution type analytical 
 ## 
-## Fitted with method Port using 336 model solutions performed in 0.841 s
+## Fitted with method Port using 336 model solutions performed in 0.84 s
 ## 
 ## Weighting: none
 ## 
@@ -463,8 +463,8 @@
 
summary(mm.L3[["DFOP", 1]])
## mkin version used for fitting:    0.9.48.1 
 ## R version used for fitting:       3.5.2 
-## Date of fit:     Mon Mar  4 10:09:39 2019 
-## Date of summary: Mon Mar  4 10:09:39 2019 
+## Date of fit:     Mon Mar  4 14:06:45 2019 
+## Date of summary: Mon Mar  4 14:06:46 2019 
 ## 
 ## Equations:
 ## d_parent/dt = - ((k1 * g * exp(-k1 * time) + k2 * (1 - g) *
@@ -564,8 +564,8 @@
 
summary(mm.L4[["SFO", 1]], data = FALSE)
## mkin version used for fitting:    0.9.48.1 
 ## R version used for fitting:       3.5.2 
-## Date of fit:     Mon Mar  4 10:09:40 2019 
-## Date of summary: Mon Mar  4 10:09:40 2019 
+## Date of fit:     Mon Mar  4 14:06:46 2019 
+## Date of summary: Mon Mar  4 14:06:46 2019 
 ## 
 ## Equations:
 ## d_parent/dt = - k_parent_sink * parent
@@ -624,15 +624,15 @@
 
summary(mm.L4[["FOMC", 1]], data = FALSE)
## mkin version used for fitting:    0.9.48.1 
 ## R version used for fitting:       3.5.2 
-## Date of fit:     Mon Mar  4 10:09:40 2019 
-## Date of summary: Mon Mar  4 10:09:40 2019 
+## Date of fit:     Mon Mar  4 14:06:46 2019 
+## Date of summary: Mon Mar  4 14:06:46 2019 
 ## 
 ## Equations:
 ## d_parent/dt = - (alpha/beta) * 1/((time/beta) + 1) * parent
 ## 
 ## Model predictions using solution type analytical 
 ## 
-## Fitted with method Port using 66 model solutions performed in 0.162 s
+## Fitted with method Port using 66 model solutions performed in 0.173 s
 ## 
 ## Weighting: none
 ## 
diff --git a/docs/articles/web_only/NAFTA_examples.html b/docs/articles/web_only/NAFTA_examples.html
index db1fc478..12e5d522 100644
--- a/docs/articles/web_only/NAFTA_examples.html
+++ b/docs/articles/web_only/NAFTA_examples.html
@@ -347,7 +347,7 @@
 ##      DT50 DT90 DT50_rep
 ## SFO  86.3  287     86.3
 ## IORE 53.4  668    201.0
-## DFOP 55.6  517    253.5
+## DFOP 55.6  517    253.0
 ## 
 ## Representative half-life:
 ## [1] 201.0316
@@ -492,9 +492,9 @@ ## ## DTx values: ## DT50 DT90 DT50_rep -## SFO 14.0 46.5 13.99 +## SFO 14.0 46.5 14.00 ## IORE 16.4 29.4 8.86 -## DFOP 14.0 46.5 13.99 +## DFOP 14.0 46.5 14.00 ## ## Representative half-life: ## [1] 8.862193
@@ -644,9 +644,9 @@ ## ## DTx values: ## DT50 DT90 DT50_rep -## SFO 11.8 39.1 11.76 +## SFO 11.8 39.1 11.80 ## IORE 12.9 31.4 9.46 -## DFOP 11.8 39.1 11.76 +## DFOP 11.8 39.1 11.80 ## ## Representative half-life: ## [1] 9.461912
@@ -830,9 +830,9 @@ ## ## DTx values: ## DT50 DT90 DT50_rep -## SFO 143 474 142.7 +## SFO 143 474 143.0 ## IORE 131 236 71.2 -## DFOP 143 474 142.7 +## DFOP 143 474 143.0 ## ## Representative half-life: ## [1] 71.18014
diff --git a/docs/articles/web_only/compiled_models.html b/docs/articles/web_only/compiled_models.html index 1d96ea76..269b1098 100644 --- a/docs/articles/web_only/compiled_models.html +++ b/docs/articles/web_only/compiled_models.html @@ -129,9 +129,9 @@ }
## Lade nötiges Paket: rbenchmark
##                    test replications elapsed relative user.self sys.self
-## 3     deSolve, compiled            3   2.313    1.000     2.312        0
-## 1 deSolve, not compiled            3  17.602    7.610    17.595        0
-## 2      Eigenvalue based            3   2.853    1.233     2.851        0
+## 3     deSolve, compiled            3   2.310    1.000     2.308        0
+## 1 deSolve, not compiled            3  17.509    7.580    17.500        0
+## 2      Eigenvalue based            3   2.859    1.238     2.858        0
 ##   user.child sys.child
 ## 3          0         0
 ## 1          0         0
@@ -160,8 +160,8 @@
 }
## Successfully compiled differential equation model from auto-generated C code.
##                    test replications elapsed relative user.self sys.self
-## 2     deSolve, compiled            3   4.049    1.000     4.047        0
-## 1 deSolve, not compiled            3  37.135    9.171    37.119        0
+## 2     deSolve, compiled            3   4.074    1.000     4.072        0
+## 1 deSolve, not compiled            3  37.219    9.136    37.203        0
 ##   user.child sys.child
 ## 2          0         0
 ## 1          0         0
diff --git a/docs/reference/Extract.mmkin.html b/docs/reference/Extract.mmkin.html index 96b9f218..3567af48 100644 --- a/docs/reference/Extract.mmkin.html +++ b/docs/reference/Extract.mmkin.html @@ -206,373 +206,6 @@ #> #> $counts #> [1] "relative convergence (4)" -#>
- head( - # The same can be achieved by - fits["SFO", "B", drop = TRUE] - )
#> [[1]] -#> $par -#> parent_0 log_k_parent_sink -#> 99.174072 -2.549028 -#> -#> $ssr -#> [1] 30.65564 -#> -#> $convergence -#> [1] 0 -#> -#> $iterations -#> [1] 5 -#> -#> $evaluations -#> function gradient -#> 8 15 -#> -#> $counts -#> [1] "relative convergence (4)" -#> -#> $hessian -#> parent_0 log_k_parent_sink -#> parent_0 4.163631 -94.09343 -#> log_k_parent_sink -94.093431 6311.34610 -#> -#> $residuals -#> parent parent parent parent parent parent -#> 0.55407218 -2.98452128 4.20445742 -1.68599939 -0.58185357 -0.72033730 -#> parent parent -#> -0.24260405 -0.07020339 -#> -#> $ms -#> [1] 3.831956 -#> -#> $var_ms -#> parent -#> 3.831956 -#> -#> $var_ms_unscaled -#> parent -#> 3.831956 -#> -#> $var_ms_unweighted -#> parent -#> 3.831956 -#> -#> $rank -#> [1] 2 -#> -#> $df.residual -#> [1] 6 -#> -#> $solution_type -#> [1] "analytical" -#> -#> $transform_rates -#> [1] TRUE -#> -#> $transform_fractions -#> [1] TRUE -#> -#> $method.modFit -#> [1] "Port" -#> -#> $maxit.modFit -#> [1] "auto" -#> -#> $calls -#> [1] 29 -#> -#> $time -#> User System verstrichen -#> 0.069 0.000 0.069 -#> -#> $mkinmod -#> <mkinmod> model generated with -#> Use of formation fractions $use_of_ff: min -#> Specification $spec: -#> $parent -#> $type: SFO; $sink: TRUE -#> Coefficient matrix $coefmat available -#> Differential equations: -#> d_parent/dt = - k_parent_sink * parent -#> -#> $observed -#> name time value -#> 1 parent 0 98.62 -#> 2 parent 3 81.43 -#> 3 parent 7 53.18 -#> 4 parent 14 34.89 -#> 5 parent 30 10.09 -#> 6 parent 62 1.50 -#> 7 parent 90 0.33 -#> 8 parent 118 0.08 -#> -#> $obs_vars -#> [1] "parent" -#> -#> $predicted -#> name time value -#> 1 parent 0.000000 99.17407218 -#> 2 parent 1.191919 90.35253561 -#> 3 parent 2.383838 82.31567498 -#> 4 parent 3.000000 78.44547872 -#> 5 parent 3.575758 74.99369333 -#> 6 parent 4.767677 68.32300215 -#> 7 parent 5.959596 62.24566915 -#> 8 parent 7.000000 57.38445742 -#> 9 parent 7.151515 56.70891509 -#> 10 parent 8.343434 51.66465547 -#> 11 parent 9.535354 47.06908288 -#> 12 parent 10.727273 42.88228661 -#> 13 parent 11.919192 39.06790599 -#> 14 parent 13.111111 35.59281463 -#> 15 parent 14.000000 33.20400061 -#> 16 parent 14.303030 32.42683275 -#> 17 parent 15.494949 29.54246504 -#> 18 parent 16.686869 26.91466193 -#> 19 parent 17.878788 24.52060198 -#> 20 parent 19.070707 22.33949373 -#> 21 parent 20.262626 20.35239512 -#> 22 parent 21.454545 18.54204899 -#> 23 parent 22.646465 16.89273320 -#> 24 parent 23.838384 15.39012410 -#> 25 parent 25.030303 14.02117212 -#> 26 parent 26.222222 12.77398846 -#> 27 parent 27.414141 11.63774182 -#> 28 parent 28.606061 10.60256435 -#> 29 parent 29.797980 9.65946594 -#> 30 parent 30.000000 9.50814643 -#> 31 parent 30.989899 8.80025617 -#> 32 parent 32.181818 8.01747313 -#> 33 parent 33.373737 7.30431867 -#> 34 parent 34.565657 6.65459931 -#> 35 parent 35.757576 6.06267251 -#> 36 parent 36.949495 5.52339762 -#> 37 parent 38.141414 5.03209124 -#> 38 parent 39.333333 4.58448658 -#> 39 parent 40.525253 4.17669637 -#> 40 parent 41.717172 3.80517911 -#> 41 parent 42.909091 3.46670832 -#> 42 parent 44.101010 3.15834451 -#> 43 parent 45.292929 2.87740968 -#> 44 parent 46.484848 2.62146400 -#> 45 parent 47.676768 2.38828471 -#> 46 parent 48.868687 2.17584671 -#> 47 parent 50.060606 1.98230508 -#> 48 parent 51.252525 1.80597899 -#> 49 parent 52.444444 1.64533711 -#> 50 parent 53.636364 1.49898432 -#> 51 parent 54.828283 1.36564963 -#> 52 parent 56.020202 1.24417505 -#> 53 parent 57.212121 1.13350565 -#> 54 parent 58.404040 1.03268029 -#> 55 parent 59.595960 0.94082335 -#> 56 parent 60.787879 0.85713708 -#> 57 parent 61.979798 0.78089471 -#> 58 parent 62.000000 0.77966270 -#> 59 parent 63.171717 0.71143411 -#> 60 parent 64.363636 0.64815202 -#> 61 parent 65.555556 0.59049888 -#> 62 parent 66.747475 0.53797399 -#> 63 parent 67.939394 0.49012119 -#> 64 parent 69.131313 0.44652489 -#> 65 parent 70.323232 0.40680649 -#> 66 parent 71.515152 0.37062104 -#> 67 parent 72.707071 0.33765429 -#> 68 parent 73.898990 0.30761993 -#> 69 parent 75.090909 0.28025713 -#> 70 parent 76.282828 0.25532825 -#> 71 parent 77.474747 0.23261679 -#> 72 parent 78.666667 0.21192552 -#> 73 parent 79.858586 0.19307474 -#> 74 parent 81.050505 0.17590074 -#> 75 parent 82.242424 0.16025436 -#> 76 parent 83.434343 0.14599973 -#> 77 parent 84.626263 0.13301305 -#> 78 parent 85.818182 0.12118154 -#> 79 parent 87.010101 0.11040244 -#> 80 parent 88.202020 0.10058214 -#> 81 parent 89.393939 0.09163535 -#> 82 parent 90.000000 0.08739595 -#> 83 parent 90.585859 0.08348439 -#> 84 parent 91.777778 0.07605845 -#> 85 parent 92.969697 0.06929305 -#> 86 parent 94.161616 0.06312943 -#> 87 parent 95.353535 0.05751406 -#> 88 parent 96.545455 0.05239819 -#> 89 parent 97.737374 0.04773737 -#> 90 parent 98.929293 0.04349113 -#> 91 parent 100.121212 0.03962259 -#> 92 parent 101.313131 0.03609816 -#> 93 parent 102.505051 0.03288723 -#> 94 parent 103.696970 0.02996191 -#> 95 parent 104.888889 0.02729679 -#> 96 parent 106.080808 0.02486874 -#> 97 parent 107.272727 0.02265667 -#> 98 parent 108.464646 0.02064136 -#> 99 parent 109.656566 0.01880531 -#> 100 parent 110.848485 0.01713257 -#> 101 parent 112.040404 0.01560863 -#> 102 parent 113.232323 0.01422024 -#> 103 parent 114.424242 0.01295535 -#> 104 parent 115.616162 0.01180297 -#> 105 parent 116.808081 0.01075310 -#> 106 parent 118.000000 0.00979661 -#> -#> $cost -#> function (P) -#> { -#> assign("calls", calls + 1, inherits = TRUE) -#> if (trace_parms) -#> 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) -#> } -#> else { -#> odeini <- state.ini.fixed -#> names(odeini) <- state.ini.fixed.boxnames -#> } -#> odeparms <- c(P[(length(state.ini.optim) + 1):length(P)], -#> transparms.fixed) -#> parms <- backtransform_odeparms(odeparms, mkinmod, transform_rates = transform_rates, -#> transform_fractions = transform_fractions) -#> 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, -#> scaleVar = scaleVar) -#> if (mC$model < cost.old) { -#> if (!quiet) -#> cat("Model cost at call ", calls, ": ", mC$model, -#> "\n") -#> if (plot) { -#> outtimes_plot = seq(min(observed$time), max(observed$time), -#> length.out = 100) -#> out_plot <- mkinpredict(mkinmod, parms, odeini, outtimes_plot, -#> solution_type = solution_type, use_compiled = use_compiled, -#> method.ode = method.ode, atol = atol, rtol = rtol, -#> ...) -#> plot(0, type = "n", xlim = range(observed$time), -#> ylim = c(0, max(observed$value, na.rm = TRUE)), -#> 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 -#> for (obs_var in obs_vars) { -#> points(subset(observed, name == obs_var, c(time, -#> value)), pch = pch_obs[obs_var], col = col_obs[obs_var]) -#> } -#> matlines(out_plot$time, out_plot[-1], col = col_obs, -#> lty = lty_obs) -#> 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) -#> } -#> return(mC) -#> } -#> <bytecode: 0x55555c1f3208> -#> <environment: 0x555555c27dc0> -#> -#> $cost_notrans -#> function (P) -#> { -#> 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) -#> } -#> else { -#> odeini <- state.ini.fixed -#> names(odeini) <- state.ini.fixed.boxnames -#> } -#> odeparms <- c(P[(length(state.ini.optim) + 1):length(P)], -#> parms.fixed) -#> 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, -#> scaleVar = scaleVar) -#> return(mC) -#> } -#> <bytecode: 0x55555b84fce8> -#> <environment: 0x555555c27dc0> -#> -#> $hessian_notrans -#> parent_0 k_parent_sink -#> parent_0 4.163631 -1203.894 -#> k_parent_sink -1203.893702 1033188.753 -#> -#> $start -#> value type -#> parent_0 98.62 state -#> k_parent_sink 0.10 deparm -#> -#> $start_transformed -#> value lower upper -#> parent_0 98.620000 -Inf Inf -#> log_k_parent_sink -2.302585 -Inf Inf -#> -#> $fixed -#> [1] value type -#> <0 Zeilen> (oder row.names mit Länge 0) -#> -#> $data -#> time variable observed predicted residual -#> 1 0 parent 98.62 99.17407218 -0.55407218 -#> 2 3 parent 81.43 78.44547872 2.98452128 -#> 3 7 parent 53.18 57.38445742 -4.20445742 -#> 4 14 parent 34.89 33.20400061 1.68599939 -#> 5 30 parent 10.09 9.50814643 0.58185357 -#> 6 62 parent 1.50 0.77966270 0.72033730 -#> 7 90 parent 0.33 0.08739595 0.24260405 -#> 8 118 parent 0.08 0.00979661 0.07020339 -#> -#> $atol -#> [1] 1e-08 -#> -#> $rtol -#> [1] 1e-10 -#> -#> $weight.ini -#> [1] "none" -#> -#> $tc.ini -#> sigma_low rsd_high -#> 0.50 0.07 -#> -#> $reweight.tol -#> [1] 1e-08 -#> -#> $reweight.max.iter -#> [1] 10 -#> -#> $bparms.optim -#> parent_0 k_parent_sink -#> 99.17407218 0.07815759 -#> -#> $bparms.fixed -#> numeric(0) -#> -#> $bparms.ode -#> k_parent_sink -#> 0.07815759 -#> -#> $bparms.state -#> parent -#> 99.17407 -#> -#> $date -#> [1] "Mon Mar 4 10:07:37 2019" -#> -#> $version -#> [1] "0.9.48.1" -#> -#> $Rversion -#> [1] "3.5.2" -#> -#> attr(,"class") -#> [1] "mkinfit" "modFit" #>
plot(nafta_evaluation)
diff --git a/docs/reference/mccall81_245T.html b/docs/reference/mccall81_245T.html index 5fbbc962..47fa6482 100644 --- a/docs/reference/mccall81_245T.html +++ b/docs/reference/mccall81_245T.html @@ -161,189 +161,60 @@
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) - summary(fit.1, data = FALSE)
#> Warning: Could not estimate covariance matrix; singular system.
#> mkin version used for fitting: 0.9.48.1 -#> R version used for fitting: 3.5.2 -#> Date of fit: Mon Mar 4 10:08:00 2019 -#> Date of summary: Mon Mar 4 10:08:00 2019 -#> -#> Equations: -#> d_T245/dt = - k_T245_sink * T245 - k_T245_phenol * T245 -#> d_phenol/dt = + k_T245_phenol * T245 - k_phenol_sink * phenol - -#> k_phenol_anisole * phenol -#> d_anisole/dt = + k_phenol_anisole * phenol - k_anisole_sink * anisole -#> -#> Model predictions using solution type deSolve -#> -#> Fitted with method Port using 574 model solutions performed in 3.762 s -#> -#> Weighting: none -#> -#> Starting values for parameters to be optimised: -#> value type -#> T245_0 100.9000 state -#> k_T245_sink 0.1000 deparm -#> k_T245_phenol 0.1001 deparm -#> k_phenol_sink 0.1002 deparm -#> k_phenol_anisole 0.1003 deparm -#> k_anisole_sink 0.1004 deparm -#> -#> Starting values for the transformed parameters actually optimised: -#> value lower upper -#> T245_0 100.900000 -Inf Inf -#> log_k_T245_sink -2.302585 -Inf Inf -#> log_k_T245_phenol -2.301586 -Inf Inf -#> log_k_phenol_sink -2.300587 -Inf Inf -#> log_k_phenol_anisole -2.299590 -Inf Inf -#> log_k_anisole_sink -2.298593 -Inf Inf -#> -#> Fixed parameter values: -#> value type -#> phenol_0 0 state -#> anisole_0 0 state -#> -#> Optimised, transformed parameters with symmetric confidence intervals: -#> Estimate Std. Error Lower Upper -#> 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 -25.0800 NA NA NA -#> log_k_phenol_anisole -0.9037 NA NA NA -#> log_k_anisole_sink -5.0090 NA NA NA -#> -#> Parameter correlation: -#> Could not estimate covariance matrix; singular system. -#> Residual standard error: 2.78 on 18 degrees of freedom -#> -#> Backtransformed parameters: -#> Confidence intervals for internally transformed parameters are asymmetric. -#> t-test (unrealistically) based on the assumption of normal distribution -#> for estimators of untransformed parameters. -#> 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 1.286e-11 4.575e-11 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 -#> -#> Chi2 error levels in percent: -#> err.min n.optim df -#> All data 10.070 6 16 -#> T245 7.908 3 5 -#> phenol 106.445 2 5 -#> anisole 5.379 1 6 -#> -#> Resulting formation fractions: -#> ff -#> T245_sink 3.772e-01 -#> T245_phenol 6.228e-01 -#> phenol_sink 3.175e-11 -#> phenol_anisole 1.000e+00 -#> anisole_sink 1.000e+00 -#> -#> Estimated disappearance times: -#> DT50 DT90 -#> T245 15.982 53.091 -#> phenol 1.711 5.685 -#> anisole 103.784 344.763
# No convergence, no covariance matrix ... + summary(fit.1)$bpar
#> Warning: Could not estimate covariance matrix; singular system.
#> Estimate se_notrans t value Pr(>t) Lower +#> T245_0 1.038550e+02 2.4256088519 4.281607e+01 7.235908e-20 NA +#> k_T245_sink 1.636106e-02 0.0183803090 8.901408e-01 1.925667e-01 NA +#> k_T245_phenol 2.700936e-02 0.0179604385 1.503825e+00 7.498498e-02 NA +#> k_phenol_sink 1.286034e-11 0.2810970202 4.575054e-11 5.000000e-01 NA +#> k_phenol_anisole 4.050581e-01 0.1608928349 2.517564e+00 1.075371e-02 NA +#> k_anisole_sink 6.678742e-03 0.0008199239 8.145563e+00 9.469402e-08 NA +#> Upper +#> T245_0 NA +#> k_T245_sink NA +#> k_T245_phenol NA +#> k_phenol_sink NA +#> k_phenol_anisole NA +#> k_anisole_sink NA
endpoints(fit.1)
#> $ff +#> T245_sink T245_phenol phenol_sink phenol_anisole anisole_sink +#> 3.772401e-01 6.227599e-01 3.174937e-11 1.000000e+00 1.000000e+00 +#> +#> $SFORB +#> logical(0) +#> +#> $distimes +#> DT50 DT90 +#> T245 15.982025 53.09114 +#> phenol 1.711229 5.68458 +#> anisole 103.784093 344.76330 +#>
# No convergence, no covariance matrix ... # k_phenol_sink is really small, therefore fix it to zero 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 used for fitting: 0.9.48.1 -#> R version used for fitting: 3.5.2 -#> Date of fit: Mon Mar 4 10:08:02 2019 -#> Date of summary: Mon Mar 4 10:08:02 2019 -#> -#> Equations: -#> d_T245/dt = - k_T245_sink * T245 - k_T245_phenol * T245 -#> d_phenol/dt = + k_T245_phenol * T245 - k_phenol_sink * phenol - -#> k_phenol_anisole * phenol -#> d_anisole/dt = + k_phenol_anisole * phenol - k_anisole_sink * anisole -#> -#> Model predictions using solution type deSolve -#> -#> Fitted with method Port using 246 model solutions performed in 1.598 s -#> -#> Weighting: none -#> -#> Starting values for parameters to be optimised: -#> value type -#> T245_0 100.9000 state -#> k_T245_sink 0.1000 deparm -#> k_T245_phenol 0.1001 deparm -#> k_phenol_anisole 0.1002 deparm -#> k_anisole_sink 0.1003 deparm -#> -#> Starting values for the transformed parameters actually optimised: -#> value lower upper -#> T245_0 100.900000 -Inf Inf -#> log_k_T245_sink -2.302585 -Inf Inf -#> log_k_T245_phenol -2.301586 -Inf Inf -#> log_k_phenol_anisole -2.300587 -Inf Inf -#> log_k_anisole_sink -2.299590 -Inf Inf -#> -#> Fixed parameter values: -#> value type -#> phenol_0 0 state -#> anisole_0 0 state -#> k_phenol_sink 0 deparm -#> -#> Optimised, transformed parameters with symmetric confidence intervals: -#> Estimate Std. Error Lower Upper -#> T245_0 103.9000 2.35200 98.930 108.8000 -#> log_k_T245_sink -4.1130 0.13250 -4.390 -3.8350 -#> log_k_T245_phenol -3.6120 0.05002 -3.716 -3.5070 -#> log_k_phenol_anisole -0.9037 0.30580 -1.544 -0.2637 -#> log_k_anisole_sink -5.0090 0.11180 -5.243 -4.7750 -#> -#> Parameter correlation: -#> T245_0 log_k_T245_sink log_k_T245_phenol -#> T245_0 1.00000 0.63761 -0.1742 -#> log_k_T245_sink 0.63761 1.00000 -0.3831 -#> log_k_T245_phenol -0.17416 -0.38313 1.0000 -#> log_k_phenol_anisole -0.05948 0.08745 -0.3047 -#> log_k_anisole_sink -0.16208 -0.60469 0.5227 -#> log_k_phenol_anisole log_k_anisole_sink -#> T245_0 -0.05948 -0.1621 -#> log_k_T245_sink 0.08745 -0.6047 -#> log_k_T245_phenol -0.30470 0.5227 -#> log_k_phenol_anisole 1.00000 -0.1774 -#> log_k_anisole_sink -0.17744 1.0000 -#> -#> Residual standard error: 2.706 on 19 degrees of freedom -#> -#> Backtransformed parameters: -#> Confidence intervals for internally transformed parameters are asymmetric. -#> t-test (unrealistically) based on the assumption of normal distribution -#> for estimators of untransformed parameters. -#> Estimate t value Pr(>t) Lower Upper -#> T245_0 1.039e+02 44.160 6.462e-21 98.930000 108.80000 -#> k_T245_sink 1.636e-02 7.545 1.978e-07 0.012400 0.02159 -#> k_T245_phenol 2.701e-02 19.990 1.607e-14 0.024320 0.02999 -#> k_phenol_anisole 4.051e-01 3.270 2.014e-03 0.213600 0.76820 -#> k_anisole_sink 6.679e-03 8.942 1.544e-08 0.005285 0.00844 -#> -#> Chi2 error levels in percent: -#> err.min n.optim df -#> All data 9.831 5 17 -#> T245 7.908 3 5 -#> phenol 99.808 1 6 -#> anisole 5.379 1 6 -#> -#> Resulting formation fractions: -#> ff -#> T245_sink 0.3772 -#> T245_phenol 0.6228 -#> phenol_anisole 1.0000 -#> phenol_sink 0.0000 -#> anisole_sink 1.0000 -#> -#> Estimated disappearance times: -#> DT50 DT90 -#> T245 15.982 53.091 -#> phenol 1.711 5.685 -#> anisole 103.784 344.763
+ summary(fit.2)$bpar
#> Estimate se_notrans t value Pr(>t) Lower +#> T245_0 1.038550e+02 2.3517950656 44.159900 6.461715e-21 98.932670927 +#> k_T245_sink 1.636106e-02 0.0021685502 7.544701 1.978480e-07 0.012397413 +#> k_T245_phenol 2.700936e-02 0.0013511301 19.990199 1.606634e-14 0.024324422 +#> k_phenol_anisole 4.050581e-01 0.1238660786 3.270129 2.013627e-03 0.213574853 +#> k_anisole_sink 6.678742e-03 0.0007468908 8.942059 1.543812e-08 0.005284957 +#> Upper +#> T245_0 1.087774e+02 +#> k_T245_sink 2.159195e-02 +#> k_T245_phenol 2.999066e-02 +#> k_phenol_anisole 7.682180e-01 +#> k_anisole_sink 8.440105e-03
endpoints(fit.1)
#> $ff +#> T245_sink T245_phenol phenol_sink phenol_anisole anisole_sink +#> 3.772401e-01 6.227599e-01 3.174937e-11 1.000000e+00 1.000000e+00 +#> +#> $SFORB +#> logical(0) +#> +#> $distimes +#> DT50 DT90 +#> T245 15.982025 53.09114 +#> phenol 1.711229 5.68458 +#> anisole 103.784093 344.76330 +#>
#> mkin version used for fitting: 0.9.48.1 #> R version used for fitting: 3.5.2 -#> Date of fit: Mon Mar 4 10:08:05 2019 -#> Date of summary: Mon Mar 4 10:08:05 2019 +#> Date of fit: Mon Mar 4 14:05:12 2019 +#> Date of summary: Mon Mar 4 14:05:12 2019 #> #> Equations: #> d_parent/dt = - (alpha/beta) * 1/((time/beta) + 1) * parent @@ -518,7 +518,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 verstrichen -#> 1.026 0.000 1.035
coef(fit)
#> parent_0 log_k_parent_sink log_k_parent_m1 log_k_m1_sink +#> 1.013 0.000 1.014
coef(fit)
#> parent_0 log_k_parent_sink log_k_parent_m1 log_k_m1_sink #> 99.59848 -3.03822 -2.98030 -5.24750
endpoints(fit)
#> $ff #> parent_sink parent_m1 m1_sink #> 0.485524 0.514476 1.000000 @@ -593,7 +593,7 @@ #> Model cost at call 146 : 371.2134 #> Optimisation by method Port successfully terminated. #> User System verstrichen -#> 0.814 0.008 0.830
coef(fit.deSolve)
#> parent_0 log_k_parent_sink log_k_parent_m1 log_k_m1_sink +#> 0.821 0.000 0.822
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 @@ -631,8 +631,8 @@ 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 used for fitting: 0.9.48.1 #> R version used for fitting: 3.5.2 -#> Date of fit: Mon Mar 4 10:08:17 2019 -#> Date of summary: Mon Mar 4 10:08:17 2019 +#> Date of fit: Mon Mar 4 14:05:24 2019 +#> Date of summary: Mon Mar 4 14:05:24 2019 #> #> Equations: #> d_parent/dt = - k_parent * parent @@ -640,7 +640,7 @@ #> #> Model predictions using solution type deSolve #> -#> Fitted with method Port using 186 model solutions performed in 0.853 s +#> Fitted with method Port using 186 model solutions performed in 0.841 s #> #> Weighting: none #> @@ -748,8 +748,8 @@ #> 120 m1 33.31 28.78984 4.520e+00
f.irls <- mkinfit(SFO_SFO.ff, FOCUS_2006_D, reweight.method = "obs", quiet = TRUE) summary(f.irls)
#> mkin version used for fitting: 0.9.48.1 #> R version used for fitting: 3.5.2 -#> Date of fit: Mon Mar 4 10:08:20 2019 -#> Date of summary: Mon Mar 4 10:08:20 2019 +#> Date of fit: Mon Mar 4 14:05:26 2019 +#> Date of summary: Mon Mar 4 14:05:26 2019 #> #> Equations: #> d_parent/dt = - k_parent * parent @@ -757,7 +757,7 @@ #> #> Model predictions using solution type deSolve #> -#> Fitted with method Port using 551 model solutions performed in 2.525 s +#> Fitted with method Port using 551 model solutions performed in 2.517 s #> #> Weighting: none #> @@ -870,8 +870,8 @@ #> 120 m1 33.31 28.80898 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 used for fitting: 0.9.48.1 #> R version used for fitting: 3.5.2 -#> Date of fit: Mon Mar 4 10:08:21 2019 -#> Date of summary: Mon Mar 4 10:08:21 2019 +#> Date of fit: Mon Mar 4 14:05:27 2019 +#> Date of summary: Mon Mar 4 14:05:27 2019 #> #> Equations: #> d_parent/dt = - k_parent * parent @@ -879,7 +879,7 @@ #> #> Model predictions using solution type deSolve #> -#> Fitted with method Port using 155 model solutions performed in 0.706 s +#> Fitted with method Port using 155 model solutions performed in 0.704 s #> #> Weighting: mean #> @@ -988,8 +988,8 @@ quiet = TRUE) summary(f.w.value)
#> mkin version used for fitting: 0.9.48.1 #> R version used for fitting: 3.5.2 -#> Date of fit: Mon Mar 4 10:08:22 2019 -#> Date of summary: Mon Mar 4 10:08:22 2019 +#> Date of fit: Mon Mar 4 14:05:28 2019 +#> Date of summary: Mon Mar 4 14:05:28 2019 #> #> Equations: #> d_parent/dt = - k_parent * parent @@ -997,7 +997,7 @@ #> #> Model predictions using solution type deSolve #> -#> Fitted with method Port using 174 model solutions performed in 0.875 s +#> Fitted with method Port using 174 model solutions performed in 0.866 s #> #> Weighting: manual #> @@ -1108,8 +1108,8 @@ f.w.man <- mkinfit(SFO_SFO.ff, dw, err = "err.man", quiet = TRUE) summary(f.w.man)
#> mkin version used for fitting: 0.9.48.1 #> R version used for fitting: 3.5.2 -#> Date of fit: Mon Mar 4 10:08:23 2019 -#> Date of summary: Mon Mar 4 10:08:23 2019 +#> Date of fit: Mon Mar 4 14:05:30 2019 +#> Date of summary: Mon Mar 4 14:05:30 2019 #> #> Equations: #> d_parent/dt = - k_parent * parent @@ -1117,7 +1117,7 @@ #> #> Model predictions using solution type deSolve #> -#> Fitted with method Port using 270 model solutions performed in 1.279 s +#> Fitted with method Port using 270 model solutions performed in 1.23 s #> #> Weighting: manual #> @@ -1226,8 +1226,8 @@ reweight.method = "obs") summary(f.w.man.irls)
#> mkin version used for fitting: 0.9.48.1 #> R version used for fitting: 3.5.2 -#> Date of fit: Mon Mar 4 10:08:26 2019 -#> Date of summary: Mon Mar 4 10:08:26 2019 +#> Date of fit: Mon Mar 4 14:05:33 2019 +#> Date of summary: Mon Mar 4 14:05:33 2019 #> #> Equations: #> d_parent/dt = - k_parent * parent @@ -1235,7 +1235,7 @@ #> #> Model predictions using solution type deSolve #> -#> Fitted with method Port using 692 model solutions performed in 3.203 s +#> Fitted with method Port using 692 model solutions performed in 3.197 s #> #> Weighting: manual #> diff --git a/docs/reference/mkinmod.html b/docs/reference/mkinmod.html index ddb695e3..37f95690 100644 --- a/docs/reference/mkinmod.html +++ b/docs/reference/mkinmod.html @@ -234,7 +234,7 @@ For the definition of model types and their parameters, the equations given SFO_SFO <- mkinmod( parent = mkinsub("SFO", "m1"), m1 = mkinsub("SFO"), verbose = TRUE)
#> Compilation argument: -#> /usr/lib/R/bin/R CMD SHLIB file135d360177d0.c 2> file135d360177d0.c.err.txt +#> /usr/lib/R/bin/R CMD SHLIB filef43390002d2.c 2> filef43390002d2.c.err.txt #> Program source: #> 1: #include <R.h> #> 2: diff --git a/docs/reference/mkinpredict.html b/docs/reference/mkinpredict.html index a0880959..fb4afa9a 100644 --- a/docs/reference/mkinpredict.html +++ b/docs/reference/mkinpredict.html @@ -328,7 +328,7 @@ 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.004
system.time( +#> 0.004 0.000 0.003
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 diff --git a/docs/reference/mmkin.html b/docs/reference/mmkin.html index 5f82f41f..af963d13 100644 --- a/docs/reference/mmkin.html +++ b/docs/reference/mmkin.html @@ -194,8 +194,8 @@ time_1 <- system.time(fits.4 <- mmkin(models, datasets, cores = 1, quiet = TRUE)) time_default
#> User System verstrichen -#> 0.057 0.014 6.939
time_1
#> User System verstrichen -#> 22.525 0.000 22.538
+#> 0.049 0.025 6.950
time_1
#> User System verstrichen +#> 22.404 0.000 22.417
endpoints(fits.0[["SFO_lin", 2]])
#> $ff #> parent_M1 parent_sink M1_M2 M1_sink #> 0.7340480 0.2659520 0.7505686 0.2494314 diff --git a/docs/reference/nafta.html b/docs/reference/nafta.html index 38e642df..f12e24e0 100644 --- a/docs/reference/nafta.html +++ b/docs/reference/nafta.html @@ -212,9 +212,9 @@ #> #> DTx values: #> DT50 DT90 DT50_rep -#> SFO 407 1352 407 -#> IORE 541 5192060 1562966 -#> DFOP 429 2383 841 +#> SFO 407 1350 407 +#> IORE 541 5190000 1560000 +#> DFOP 429 2380 841 #> #> Representative half-life: #> [1] 841.4096
plot(nafta_evaluation)
diff --git a/docs/reference/summary.mkinfit.html b/docs/reference/summary.mkinfit.html index e2f4d2e2..f561e258 100644 --- a/docs/reference/summary.mkinfit.html +++ b/docs/reference/summary.mkinfit.html @@ -211,15 +211,15 @@

Examples

summary(mkinfit(mkinmod(parent = mkinsub("SFO")), FOCUS_2006_A, quiet = TRUE))
#> mkin version used for fitting: 0.9.48.1 #> R version used for fitting: 3.5.2 -#> Date of fit: Mon Mar 4 10:09:19 2019 -#> Date of summary: Mon Mar 4 10:09:19 2019 +#> Date of fit: Mon Mar 4 14:06:25 2019 +#> Date of summary: Mon Mar 4 14:06:25 2019 #> #> 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.086 s +#> Fitted with method Port using 35 model solutions performed in 0.085 s #> #> Weighting: none #> diff --git a/docs/reference/transform_odeparms.html b/docs/reference/transform_odeparms.html index 3148f00b..fbc792f1 100644 --- a/docs/reference/transform_odeparms.html +++ b/docs/reference/transform_odeparms.html @@ -203,157 +203,29 @@ The transformation of sets of formation fractions is fragile, as it supposes 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 used for fitting: 0.9.48.1 -#> R version used for fitting: 3.5.2 -#> Date of fit: Mon Mar 4 10:09:27 2019 -#> Date of summary: Mon Mar 4 10:09:27 2019 -#> -#> Equations: -#> d_parent/dt = - k_parent_sink * parent - k_parent_m1 * parent -#> d_m1/dt = + k_parent_m1 * parent - k_m1_sink * m1 -#> -#> Model predictions using solution type deSolve -#> -#> Fitted with method Port using 153 model solutions performed in 0.699 s -#> -#> Weighting: none -#> -#> Starting values for parameters to be optimised: -#> value type -#> parent_0 100.7500 state -#> k_parent_sink 0.1000 deparm -#> k_parent_m1 0.1001 deparm -#> k_m1_sink 0.1002 deparm -#> -#> Starting values for the transformed parameters actually optimised: -#> value lower upper -#> parent_0 100.750000 -Inf Inf -#> log_k_parent_sink -2.302585 -Inf Inf -#> log_k_parent_m1 -2.301586 -Inf Inf -#> log_k_m1_sink -2.300587 -Inf Inf -#> -#> Fixed parameter values: -#> value type -#> m1_0 0 state -#> -#> Optimised, transformed parameters with symmetric confidence intervals: -#> Estimate Std. Error Lower Upper -#> parent_0 99.600 1.61400 96.330 102.900 -#> log_k_parent_sink -3.038 0.07826 -3.197 -2.879 -#> log_k_parent_m1 -2.980 0.04124 -3.064 -2.897 -#> log_k_m1_sink -5.248 0.13610 -5.523 -4.972 -#> -#> Parameter correlation: -#> parent_0 log_k_parent_sink log_k_parent_m1 log_k_m1_sink -#> 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.47164 1.0000 -#> -#> Residual standard error: 3.211 on 36 degrees of freedom -#> -#> Backtransformed parameters: -#> Confidence intervals for internally transformed parameters are asymmetric. -#> 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.600000 61.720 2.024e-38 96.330000 1.029e+02 -#> k_parent_sink 0.047920 12.780 3.050e-15 0.040890 5.616e-02 -#> k_parent_m1 0.050780 24.250 3.407e-24 0.046700 5.521e-02 -#> k_m1_sink 0.005261 7.349 5.758e-09 0.003992 6.933e-03 -#> -#> Chi2 error levels in percent: -#> err.min n.optim df -#> All data 6.398 4 15 -#> parent 6.827 3 6 -#> m1 4.490 1 9 -#> -#> Resulting formation fractions: -#> ff -#> parent_sink 0.4855 -#> parent_m1 0.5145 -#> m1_sink 1.0000 -#> -#> Estimated disappearance times: -#> DT50 DT90 -#> parent 7.023 23.33 -#> 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 used for fitting: 0.9.48.1 -#> R version used for fitting: 3.5.2 -#> Date of fit: Mon Mar 4 10:09:29 2019 -#> Date of summary: Mon Mar 4 10:09:29 2019 -#> -#> Equations: -#> d_parent/dt = - k_parent_sink * parent - k_parent_m1 * parent -#> d_m1/dt = + k_parent_m1 * parent - k_m1_sink * m1 -#> -#> Model predictions using solution type deSolve -#> -#> Fitted with method Port using 350 model solutions performed in 1.584 s -#> -#> Weighting: none -#> -#> Starting values for parameters to be optimised: -#> value type -#> parent_0 100.7500 state -#> k_parent_sink 0.1000 deparm -#> k_parent_m1 0.1001 deparm -#> k_m1_sink 0.1002 deparm -#> -#> Starting values for the transformed parameters actually optimised: -#> value lower upper -#> parent_0 100.7500 -Inf Inf -#> k_parent_sink 0.1000 0 Inf -#> k_parent_m1 0.1001 0 Inf -#> k_m1_sink 0.1002 0 Inf -#> -#> Fixed parameter values: -#> value type -#> m1_0 0 state -#> -#> Optimised, transformed parameters with symmetric confidence intervals: -#> Estimate Std. Error Lower Upper -#> parent_0 99.600000 1.6140000 96.330000 1.029e+02 -#> k_parent_sink 0.047920 0.0037500 0.040310 5.553e-02 -#> k_parent_m1 0.050780 0.0020940 0.046530 5.502e-02 -#> k_m1_sink 0.005261 0.0007159 0.003809 6.713e-03 -#> -#> Parameter correlation: -#> parent_0 k_parent_sink k_parent_m1 k_m1_sink -#> parent_0 1.00000 0.6075 -0.06625 -0.1701 -#> k_parent_sink 0.60752 1.0000 -0.08740 -0.6253 -#> k_parent_m1 -0.06625 -0.0874 1.00000 0.4716 -#> k_m1_sink -0.17006 -0.6253 0.47164 1.0000 -#> -#> Residual standard error: 3.211 on 36 degrees of freedom -#> -#> Backtransformed parameters: -#> Confidence intervals for internally transformed parameters are asymmetric. -#> 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.600000 61.720 2.024e-38 96.330000 1.029e+02 -#> k_parent_sink 0.047920 12.780 3.050e-15 0.040310 5.553e-02 -#> k_parent_m1 0.050780 24.250 3.407e-24 0.046530 5.502e-02 -#> k_m1_sink 0.005261 7.349 5.758e-09 0.003809 6.713e-03 -#> -#> Chi2 error levels in percent: -#> err.min n.optim df -#> All data 6.398 4 15 -#> parent 6.827 3 6 -#> m1 4.490 1 9 -#> -#> Resulting formation fractions: -#> ff -#> parent_sink 0.4855 -#> parent_m1 0.5145 -#> m1_sink 1.0000 -#> -#> Estimated disappearance times: -#> DT50 DT90 -#> parent 7.023 23.33 -#> m1 131.761 437.70
+fit.s <- summary(fit) +# Transformed and backtransformed parameters +print(fit.s$par, 3)
#> Estimate Std. Error Lower Upper +#> parent_0 99.60 1.6137 96.33 102.87 +#> log_k_parent_sink -3.04 0.0783 -3.20 -2.88 +#> log_k_parent_m1 -2.98 0.0412 -3.06 -2.90 +#> log_k_m1_sink -5.25 0.1361 -5.52 -4.97
print(fit.s$bpar, 3)
#> Estimate se_notrans t value Pr(>t) Lower Upper +#> parent_0 99.59848 1.613712 61.72 2.02e-38 96.32572 1.03e+02 +#> k_parent_sink 0.04792 0.003750 12.78 3.05e-15 0.04089 5.62e-02 +#> k_parent_m1 0.05078 0.002094 24.25 3.41e-24 0.04670 5.52e-02 +#> k_m1_sink 0.00526 0.000716 7.35 5.76e-09 0.00399 6.93e-03
+
# Compare to the version without transforming rate parameters +fit.2 <- mkinfit(SFO_SFO, FOCUS_2006_D, transform_rates = FALSE, quiet = TRUE) +fit.2.s <- summary(fit.2) +print(fit.2.s$par, 3)
#> Estimate Std. Error Lower Upper +#> parent_0 99.59848 1.613710 96.32573 1.03e+02 +#> k_parent_sink 0.04792 0.003750 0.04031 5.55e-02 +#> k_parent_m1 0.05078 0.002094 0.04653 5.50e-02 +#> k_m1_sink 0.00526 0.000716 0.00381 6.71e-03
print(fit.2.s$bpar, 3)
#> Estimate se_notrans t value Pr(>t) Lower Upper +#> parent_0 99.59848 1.613710 61.72 2.02e-38 96.32573 1.03e+02 +#> k_parent_sink 0.04792 0.003750 12.78 3.05e-15 0.04031 5.55e-02 +#> k_parent_m1 0.05078 0.002094 24.25 3.41e-24 0.04653 5.50e-02 +#> k_m1_sink 0.00526 0.000716 7.35 5.76e-09 0.00381 6.71e-03
initials <- fit$start$value names(initials) <- rownames(fit$start) transformed <- fit$start_transformed$value @@ -367,80 +239,16 @@ The transformation of sets of formation fractions is fragile, as it supposes 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 used for fitting: 0.9.48.1 -#> R version used for fitting: 3.5.2 -#> Date of fit: Mon Mar 4 10:09:30 2019 -#> Date of summary: Mon Mar 4 10:09:30 2019 -#> -#> Equations: -#> d_parent/dt = - k_parent * parent -#> d_m1/dt = + f_parent_to_m1 * k_parent * parent - k_m1 * m1 -#> -#> Model predictions using solution type deSolve -#> -#> Fitted with method Port using 186 model solutions performed in 0.86 s -#> -#> Weighting: none -#> -#> Starting values for parameters to be optimised: -#> value type -#> parent_0 100.7500 state -#> k_parent 0.1000 deparm -#> k_m1 0.1001 deparm -#> f_parent_to_m1 0.5000 deparm -#> -#> Starting values for the transformed parameters actually optimised: -#> value lower upper -#> parent_0 100.750000 -Inf Inf -#> log_k_parent -2.302585 -Inf Inf -#> log_k_m1 -2.301586 -Inf Inf -#> f_parent_ilr_1 0.000000 -Inf Inf -#> -#> Fixed parameter values: -#> value type -#> m1_0 0 state -#> -#> Optimised, transformed parameters with symmetric confidence intervals: -#> Estimate Std. Error Lower Upper -#> parent_0 99.60000 1.61400 96.3300 102.9000 -#> log_k_parent -2.31600 0.04187 -2.4010 -2.2310 -#> log_k_m1 -5.24800 0.13610 -5.5230 -4.9720 -#> f_parent_ilr_1 0.04096 0.06477 -0.0904 0.1723 -#> -#> Parameter correlation: -#> parent_0 log_k_parent log_k_m1 f_parent_ilr_1 -#> parent_0 1.0000 0.5178 -0.1701 -0.5489 -#> log_k_parent 0.5178 1.0000 -0.3285 -0.5451 -#> log_k_m1 -0.1701 -0.3285 1.0000 0.7466 -#> f_parent_ilr_1 -0.5489 -0.5451 0.7466 1.0000 -#> -#> Residual standard error: 3.211 on 36 degrees of freedom -#> -#> Backtransformed parameters: -#> Confidence intervals for internally transformed parameters are asymmetric. -#> 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.600000 61.720 2.024e-38 96.330000 1.029e+02 -#> k_parent 0.098700 23.880 5.700e-24 0.090660 1.074e-01 -#> k_m1 0.005261 7.349 5.758e-09 0.003992 6.933e-03 -#> f_parent_to_m1 0.514500 22.490 4.375e-23 0.468100 5.606e-01 -#> -#> Chi2 error levels in percent: -#> err.min n.optim df -#> All data 6.398 4 15 -#> parent 6.459 2 7 -#> m1 4.690 2 8 -#> -#> Resulting formation fractions: -#> ff -#> parent_m1 0.5145 -#> parent_sink 0.4855 -#> -#> Estimated disappearance times: -#> DT50 DT90 -#> parent 7.023 23.33 -#> m1 131.761 437.70
initials <- c("f_parent_to_m1" = 0.5) +fit.ff.s <- summary(fit.ff) +print(fit.ff.s$par, 3)
#> Estimate Std. Error Lower Upper +#> parent_0 99.598 1.6137 96.3257 102.871 +#> log_k_parent -2.316 0.0419 -2.4006 -2.231 +#> log_k_m1 -5.248 0.1361 -5.5235 -4.972 +#> f_parent_ilr_1 0.041 0.0648 -0.0904 0.172
print(fit.ff.s$bpar, 3)
#> Estimate se_notrans t value Pr(>t) Lower Upper +#> parent_0 99.59848 1.613712 61.72 2.02e-38 96.32574 1.03e+02 +#> k_parent 0.09870 0.004132 23.88 5.70e-24 0.09066 1.07e-01 +#> k_m1 0.00526 0.000716 7.35 5.76e-09 0.00399 6.93e-03 +#> f_parent_to_m1 0.51448 0.022880 22.49 4.37e-23 0.46808 5.61e-01
initials <- c("f_parent_to_m1" = 0.5) transformed <- transform_odeparms(initials, SFO_SFO.ff) backtransform_odeparms(transformed, SFO_SFO.ff)
#> f_parent_to_m1 #> 0.5
@@ -451,70 +259,14 @@ The transformation of sets of formation fractions is fragile, as it supposes 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 used for fitting: 0.9.48.1 -#> R version used for fitting: 3.5.2 -#> Date of fit: Mon Mar 4 10:09:31 2019 -#> Date of summary: Mon Mar 4 10:09:31 2019 -#> -#> Equations: -#> d_parent/dt = - k_parent * parent -#> d_m1/dt = + k_parent * parent - k_m1 * m1 -#> -#> Model predictions using solution type deSolve -#> -#> Fitted with method Port using 104 model solutions performed in 0.476 s -#> -#> Weighting: none -#> -#> Starting values for parameters to be optimised: -#> value type -#> parent_0 100.7500 state -#> k_parent 0.1000 deparm -#> k_m1 0.1001 deparm -#> -#> Starting values for the transformed parameters actually optimised: -#> value lower upper -#> parent_0 100.750000 -Inf Inf -#> log_k_parent -2.302585 -Inf Inf -#> log_k_m1 -2.301586 -Inf Inf -#> -#> Fixed parameter values: -#> value type -#> m1_0 0 state -#> -#> Optimised, transformed parameters with symmetric confidence intervals: -#> Estimate Std. Error Lower Upper -#> parent_0 84.790 2.96500 78.78 90.800 -#> log_k_parent -2.756 0.08088 -2.92 -2.593 -#> log_k_m1 -4.214 0.11150 -4.44 -3.988 -#> -#> Parameter correlation: -#> parent_0 log_k_parent log_k_m1 -#> parent_0 1.0000 0.11058 0.46156 -#> log_k_parent 0.1106 1.00000 0.06274 -#> log_k_m1 0.4616 0.06274 1.00000 -#> -#> Residual standard error: 8.333 on 37 degrees of freedom -#> -#> Backtransformed parameters: -#> Confidence intervals for internally transformed parameters are asymmetric. -#> 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 -#> 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 -#> -#> Chi2 error levels in percent: -#> err.min n.optim df -#> All data 19.66 3 16 -#> parent 17.56 2 7 -#> m1 18.71 1 9 -#> -#> Estimated disappearance times: -#> DT50 DT90 -#> parent 10.91 36.25 -#> m1 46.89 155.75
+fit.ff.2.s <- summary(fit.ff.2) +print(fit.ff.2.s$par, 3)
#> Estimate Std. Error Lower Upper +#> parent_0 84.79 2.9651 78.78 90.80 +#> log_k_parent -2.76 0.0809 -2.92 -2.59 +#> log_k_m1 -4.21 0.1115 -4.44 -3.99
print(fit.ff.2.s$bpar, 3)
#> Estimate se_notrans t value Pr(>t) Lower Upper +#> parent_0 84.7916 2.96505 28.60 3.94e-27 78.7838 90.7994 +#> k_parent 0.0635 0.00514 12.36 5.24e-15 0.0539 0.0748 +#> k_m1 0.0148 0.00165 8.97 4.11e-11 0.0118 0.0185