From a37ba8f8898e4629dfc9d2558fc19a180551de2d Mon Sep 17 00:00:00 2001 From: Johannes Ranke Date: Fri, 19 Jan 2018 16:01:47 +0100 Subject: Reweighting with two-component error model Static documentation except articles rebuilt by pkgdown --- docs/reference/index.html | 6 + docs/reference/mkinfit.html | 576 ++++++++++++++++++++++--------------------- docs/reference/sigma_rl.html | 167 +++++++++++++ 3 files changed, 466 insertions(+), 283 deletions(-) create mode 100644 docs/reference/sigma_rl.html (limited to 'docs/reference') diff --git a/docs/reference/index.html b/docs/reference/index.html index 54886c94..4675748c 100644 --- a/docs/reference/index.html +++ b/docs/reference/index.html @@ -337,6 +337,12 @@

ilr invilr

Function to perform isometric log-ratio transformation

+ + + +

sigma_rl

+ +

Two component error model of Rocke and Lorenzato

diff --git a/docs/reference/mkinfit.html b/docs/reference/mkinfit.html index cdf7c7ef..0102aecb 100644 --- a/docs/reference/mkinfit.html +++ b/docs/reference/mkinfit.html @@ -69,6 +69,9 @@
  • Example evaluation of FOCUS Laboratory Data L1 to L3
  • +
  • + Example evaluation of FOCUS Example Dataset Z +
  • Performance benefit by using compiled model definitions in mkin
  • @@ -83,12 +86,7 @@ @@ -130,7 +128,9 @@ control.modFit = list(), transform_rates = TRUE, transform_fractions = TRUE, - plot = FALSE, quiet = FALSE, err = NULL, weight = "none", + plot = FALSE, quiet = FALSE, err = NULL, + weight = c("none", "std", "mean", "tc"), + tc = c(sigma_low = 0.5, rsd_high = 0.07), scaleVar = FALSE, atol = 1e-8, rtol = 1e-10, n.outtimes = 100, reweight.method = NULL, @@ -293,7 +293,13 @@ weight

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

    + "std", "mean", see details of modCost, or "tc" for the + two component error model of Rocke and Lorenzato.

    + + + tc +

    The two components of the Rocke and Lorenzato error model as used + for (initial) weighting

    scaleVar @@ -321,12 +327,19 @@ 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 - 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 + i.e. no iterative weighting. + The first reweighting method is called "obs", meaning that each + observed variable is assumed to have its own variance. This variance + is estimated from the fit (mean squared residuals) 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.

    + specified by reweight.max.iter. + The second reweighting method is called "tc" (two-component error model). + When using this method, the two components of the error model according + to Rocke and Lorenzato (1995) are estimated from the fit and the resulting + variances are used for weighting the residuals in each iteration until + convergence of these components or up to the maximum number of iterations + specified.

    reweight.tol @@ -373,21 +386,26 @@ numerical ODE solver. In this situation it may help to switch off the internal rate transformation.

    +

    Source

    + +

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

    +

    Examples

    # Use shorthand notation for parent only degradation fit <- mkinfit("FOMC", FOCUS_2006_C, quiet = TRUE) -summary(fit)
    #> mkin version: 0.9.46 -#> R version: 3.4.1 -#> Date of fit: Sat Jul 29 15:14:18 2017 -#> Date of summary: Sat Jul 29 15:14:18 2017 +summary(fit)
    #> mkin version: 0.9.47.1 +#> R version: 3.4.3 +#> Date of fit: Tue Jan 30 10:05:48 2018 +#> Date of summary: Tue Jan 30 10:05:48 2018 #> #> 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.141 s +#> Fitted with method Port using 64 model solutions performed in 0.31 s #> #> Weighting: none #> @@ -456,7 +474,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 -#> 0.888 0.000 0.890
    coef(fit)
    #> parent_0 log_k_parent_sink log_k_parent_m1 log_k_m1_sink +#> 1.196 0.000 1.195
    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 @@ -535,7 +553,7 @@ #> Model cost at call 153 : 371.2134 #> Optimisation by method Port successfully terminated. #> user system elapsed -#> 0.728 0.000 0.729
    coef(fit.deSolve)
    #> parent_0 log_k_parent_sink log_k_parent_m1 log_k_m1_sink +#> 1.008 0.000 1.006
    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 @@ -576,10 +594,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.46 -#> R version: 3.4.1 -#> Date of fit: Sat Jul 29 15:14:28 2017 -#> Date of summary: Sat Jul 29 15:14:28 2017 +summary(f.noweight)
    #> mkin version: 0.9.47.1 +#> R version: 3.4.3 +#> Date of fit: Tue Jan 30 10:06:00 2018 +#> Date of summary: Tue Jan 30 10:06:00 2018 #> #> Equations: #> d_parent/dt = - k_parent * parent @@ -587,7 +605,7 @@ #> #> Model predictions using solution type deSolve #> -#> Fitted with method Port using 185 model solutions performed in 0.746 s +#> Fitted with method Port using 185 model solutions performed in 0.739 s #> #> Weighting: none #> @@ -653,54 +671,50 @@ #> #> Data: #> time variable observed predicted residual -#> 0 parent 99.46 9.960e+01 -1.385e-01 -#> 0 parent 102.04 9.960e+01 2.442e+00 -#> 1 parent 93.50 9.024e+01 3.262e+00 -#> 1 parent 92.50 9.024e+01 2.262e+00 -#> 3 parent 63.23 7.407e+01 -1.084e+01 -#> 3 parent 68.99 7.407e+01 -5.083e+00 -#> 7 parent 52.32 4.991e+01 2.408e+00 -#> 7 parent 55.13 4.991e+01 5.218e+00 -#> 14 parent 27.27 2.501e+01 2.257e+00 -#> 14 parent 26.64 2.501e+01 1.627e+00 -#> 21 parent 11.50 1.253e+01 -1.035e+00 -#> 21 parent 11.64 1.253e+01 -8.946e-01 -#> 35 parent 2.85 3.148e+00 -2.979e-01 -#> 35 parent 2.91 3.148e+00 -2.379e-01 -#> 50 parent 0.69 7.162e-01 -2.624e-02 -#> 50 parent 0.63 7.162e-01 -8.624e-02 -#> 75 parent 0.05 6.074e-02 -1.074e-02 -#> 75 parent 0.06 6.074e-02 -7.381e-04 -#> 100 parent NA 5.151e-03 NA -#> 100 parent NA 5.151e-03 NA -#> 120 parent NA 7.155e-04 NA -#> 120 parent NA 7.155e-04 NA -#> 0 m1 0.00 0.000e+00 0.000e+00 -#> 0 m1 0.00 0.000e+00 0.000e+00 -#> 1 m1 4.84 4.803e+00 3.704e-02 -#> 1 m1 5.64 4.803e+00 8.370e-01 -#> 3 m1 12.91 1.302e+01 -1.140e-01 -#> 3 m1 12.96 1.302e+01 -6.400e-02 -#> 7 m1 22.97 2.504e+01 -2.075e+00 -#> 7 m1 24.47 2.504e+01 -5.748e-01 -#> 14 m1 41.69 3.669e+01 5.000e+00 -#> 14 m1 33.21 3.669e+01 -3.480e+00 -#> 21 m1 44.37 4.165e+01 2.717e+00 -#> 21 m1 46.44 4.165e+01 4.787e+00 -#> 35 m1 41.22 4.331e+01 -2.093e+00 -#> 35 m1 37.95 4.331e+01 -5.363e+00 -#> 50 m1 41.19 4.122e+01 -2.831e-02 -#> 50 m1 40.01 4.122e+01 -1.208e+00 -#> 75 m1 40.09 3.645e+01 3.643e+00 -#> 75 m1 33.85 3.645e+01 -2.597e+00 -#> 100 m1 31.04 3.198e+01 -9.416e-01 -#> 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.46 -#> R version: 3.4.1 -#> Date of fit: Sat Jul 29 15:14:30 2017 -#> Date of summary: Sat Jul 29 15:14:30 2017 +#> 0 parent 99.46 99.59848 -1.385e-01 +#> 0 parent 102.04 99.59848 2.442e+00 +#> 1 parent 93.50 90.23787 3.262e+00 +#> 1 parent 92.50 90.23787 2.262e+00 +#> 3 parent 63.23 74.07319 -1.084e+01 +#> 3 parent 68.99 74.07319 -5.083e+00 +#> 7 parent 52.32 49.91206 2.408e+00 +#> 7 parent 55.13 49.91206 5.218e+00 +#> 14 parent 27.27 25.01257 2.257e+00 +#> 14 parent 26.64 25.01257 1.627e+00 +#> 21 parent 11.50 12.53462 -1.035e+00 +#> 21 parent 11.64 12.53462 -8.946e-01 +#> 35 parent 2.85 3.14787 -2.979e-01 +#> 35 parent 2.91 3.14787 -2.379e-01 +#> 50 parent 0.69 0.71624 -2.624e-02 +#> 50 parent 0.63 0.71624 -8.624e-02 +#> 75 parent 0.05 0.06074 -1.074e-02 +#> 75 parent 0.06 0.06074 -7.381e-04 +#> 0 m1 0.00 0.00000 0.000e+00 +#> 0 m1 0.00 0.00000 0.000e+00 +#> 1 m1 4.84 4.80296 3.704e-02 +#> 1 m1 5.64 4.80296 8.370e-01 +#> 3 m1 12.91 13.02400 -1.140e-01 +#> 3 m1 12.96 13.02400 -6.400e-02 +#> 7 m1 22.97 25.04476 -2.075e+00 +#> 7 m1 24.47 25.04476 -5.748e-01 +#> 14 m1 41.69 36.69002 5.000e+00 +#> 14 m1 33.21 36.69002 -3.480e+00 +#> 21 m1 44.37 41.65310 2.717e+00 +#> 21 m1 46.44 41.65310 4.787e+00 +#> 35 m1 41.22 43.31312 -2.093e+00 +#> 35 m1 37.95 43.31312 -5.363e+00 +#> 50 m1 41.19 41.21831 -2.831e-02 +#> 50 m1 40.01 41.21831 -1.208e+00 +#> 75 m1 40.09 36.44703 3.643e+00 +#> 75 m1 33.85 36.44703 -2.597e+00 +#> 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.irls <- mkinfit(SFO_SFO.ff, FOCUS_2006_D, reweight.method = "obs", quiet = TRUE) +summary(f.irls)
    #> mkin version: 0.9.47.1 +#> R version: 3.4.3 +#> Date of fit: Tue Jan 30 10:06:02 2018 +#> Date of summary: Tue Jan 30 10:06:02 2018 #> #> Equations: #> d_parent/dt = - k_parent * parent @@ -708,9 +722,14 @@ #> #> Model predictions using solution type deSolve #> -#> Fitted with method Port using 468 model solutions performed in 1.914 s +#> Fitted with method Port using 523 model solutions performed in 2.151 s +#> +#> Weighting: none #> -#> Weighting: none then iterative reweighting method obs +#> Iterative reweighting with method obs +#> Final mean squared residuals of observed variables: +#> parent m1 +#> 11.573408 7.407845 #> #> Starting values for parameters to be optimised: #> value type @@ -739,10 +758,10 @@ #> #> Parameter correlation: #> parent_0 log_k_parent log_k_m1 f_parent_ilr_1 -#> parent_0 1.0000 0.5083 -0.1979 -0.6147 +#> parent_0 1.0000 0.5083 -0.1979 -0.6148 #> 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.6147 -0.6062 0.7417 1.0000 +#> f_parent_ilr_1 -0.6148 -0.6062 0.7417 1.0000 #> #> Residual standard error: 1.054 on 36 degrees of freedom #> @@ -751,9 +770,9 @@ #> 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.181e-37 96.040000 1.033e+02 +#> parent_0 99.67000 55.630 8.184e-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 +#> k_m1 0.00524 7.996 8.486e-10 0.004066 6.753e-03 #> f_parent_to_m1 0.51340 23.000 2.038e-23 0.468100 5.584e-01 #> #> Chi2 error levels in percent: @@ -774,54 +793,50 @@ #> #> Data: #> time variable observed predicted residual err -#> 0 parent 99.46 9.967e+01 -2.122e-01 3.402 -#> 0 parent 102.04 9.967e+01 2.368e+00 3.402 -#> 1 parent 93.50 9.027e+01 3.228e+00 3.402 -#> 1 parent 92.50 9.027e+01 2.228e+00 3.402 -#> 3 parent 63.23 7.405e+01 -1.082e+01 3.402 -#> 3 parent 68.99 7.405e+01 -5.056e+00 3.402 -#> 7 parent 52.32 4.982e+01 2.499e+00 3.402 -#> 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.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.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 -#> 120 parent NA 6.852e-04 NA 3.402 -#> 0 m1 0.00 0.000e+00 0.000e+00 2.722 -#> 0 m1 0.00 0.000e+00 0.000e+00 2.722 -#> 1 m1 4.84 4.813e+00 2.672e-02 2.722 -#> 1 m1 5.64 4.813e+00 8.267e-01 2.722 -#> 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.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.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.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 -#> 100 m1 31.04 3.199e+01 -9.497e-01 2.722 -#> 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.46 -#> R version: 3.4.1 -#> Date of fit: Sat Jul 29 15:14:31 2017 -#> Date of summary: Sat Jul 29 15:14:31 2017 +#> 0 parent 99.46 99.67218 -2.122e-01 3.402 +#> 0 parent 102.04 99.67218 2.368e+00 3.402 +#> 1 parent 93.50 90.27153 3.228e+00 3.402 +#> 1 parent 92.50 90.27153 2.228e+00 3.402 +#> 3 parent 63.23 74.04648 -1.082e+01 3.402 +#> 3 parent 68.99 74.04648 -5.056e+00 3.402 +#> 7 parent 52.32 49.82092 2.499e+00 3.402 +#> 7 parent 55.13 49.82092 5.309e+00 3.402 +#> 14 parent 27.27 24.90287 2.367e+00 3.402 +#> 14 parent 26.64 24.90287 1.737e+00 3.402 +#> 21 parent 11.50 12.44764 -9.476e-01 3.402 +#> 21 parent 11.64 12.44764 -8.076e-01 3.402 +#> 35 parent 2.85 3.11002 -2.600e-01 3.402 +#> 35 parent 2.91 3.11002 -2.000e-01 3.402 +#> 50 parent 0.69 0.70374 -1.374e-02 3.402 +#> 50 parent 0.63 0.70374 -7.374e-02 3.402 +#> 75 parent 0.05 0.05913 -9.134e-03 3.402 +#> 75 parent 0.06 0.05913 8.662e-04 3.402 +#> 0 m1 0.00 0.00000 0.000e+00 2.722 +#> 0 m1 0.00 0.00000 0.000e+00 2.722 +#> 1 m1 4.84 4.81328 2.672e-02 2.722 +#> 1 m1 5.64 4.81328 8.267e-01 2.722 +#> 3 m1 12.91 13.04779 -1.378e-01 2.722 +#> 3 m1 12.96 13.04779 -8.779e-02 2.722 +#> 7 m1 22.97 25.07615 -2.106e+00 2.722 +#> 7 m1 24.47 25.07615 -6.062e-01 2.722 +#> 14 m1 41.69 36.70729 4.983e+00 2.722 +#> 14 m1 33.21 36.70729 -3.497e+00 2.722 +#> 21 m1 44.37 41.65050 2.720e+00 2.722 +#> 21 m1 46.44 41.65050 4.790e+00 2.722 +#> 35 m1 41.22 43.28866 -2.069e+00 2.722 +#> 35 m1 37.95 43.28866 -5.339e+00 2.722 +#> 50 m1 41.19 41.19338 -3.383e-03 2.722 +#> 50 m1 40.01 41.19338 -1.183e+00 2.722 +#> 75 m1 40.09 36.43820 3.652e+00 2.722 +#> 75 m1 33.85 36.43820 -2.588e+00 2.722 +#> 100 m1 31.04 31.98971 -9.497e-01 2.722 +#> 100 m1 33.13 31.98971 1.140e+00 2.722 +#> 120 m1 25.15 28.80897 -3.659e+00 2.722 +#> 120 m1 33.31 28.80897 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.47.1 +#> R version: 3.4.3 +#> Date of fit: Tue Jan 30 10:06:03 2018 +#> Date of summary: Tue Jan 30 10:06:03 2018 #> #> Equations: #> d_parent/dt = - k_parent * parent @@ -829,7 +844,7 @@ #> #> Model predictions using solution type deSolve #> -#> Fitted with method Port using 155 model solutions performed in 0.692 s +#> Fitted with method Port using 155 model solutions performed in 0.675 s #> #> Weighting: mean #> @@ -895,55 +910,51 @@ #> #> Data: #> time variable observed predicted residual -#> 0 parent 99.46 99.730570 -0.270570 -#> 0 parent 102.04 99.730570 2.309430 -#> 1 parent 93.50 90.298055 3.201945 -#> 1 parent 92.50 90.298055 2.201945 -#> 3 parent 63.23 74.025028 -10.795028 -#> 3 parent 68.99 74.025028 -5.035028 -#> 7 parent 52.32 49.748382 2.571618 -#> 7 parent 55.13 49.748382 5.381618 -#> 14 parent 27.27 24.815876 2.454124 -#> 14 parent 26.64 24.815876 1.824124 -#> 21 parent 11.50 12.378849 -0.878849 -#> 21 parent 11.64 12.378849 -0.738849 -#> 35 parent 2.85 3.080219 -0.230219 -#> 35 parent 2.91 3.080219 -0.170219 -#> 50 parent 0.69 0.693958 -0.003958 -#> 50 parent 0.63 0.693958 -0.063958 -#> 75 parent 0.05 0.057888 -0.007888 -#> 75 parent 0.06 0.057888 0.002112 -#> 100 parent NA 0.004829 NA -#> 100 parent NA 0.004829 NA -#> 120 parent NA 0.000662 NA -#> 120 parent NA 0.000662 NA -#> 0 m1 0.00 0.000000 0.000000 -#> 0 m1 0.00 0.000000 0.000000 -#> 1 m1 4.84 4.821488 0.018512 -#> 1 m1 5.64 4.821488 0.818512 -#> 3 m1 12.91 13.066692 -0.156692 -#> 3 m1 12.96 13.066692 -0.106692 -#> 7 m1 22.97 25.101058 -2.131058 -#> 7 m1 24.47 25.101058 -0.631058 -#> 14 m1 41.69 36.720923 4.969077 -#> 14 m1 33.21 36.720923 -3.510923 -#> 21 m1 44.37 41.648353 2.721647 -#> 21 m1 46.44 41.648353 4.791647 -#> 35 m1 41.22 43.269225 -2.049225 -#> 35 m1 37.95 43.269225 -5.319225 -#> 50 m1 41.19 41.173639 0.016361 -#> 50 m1 40.01 41.173639 -1.163639 -#> 75 m1 40.09 36.431224 3.658776 -#> 75 m1 33.85 36.431224 -2.581224 -#> 100 m1 31.04 31.996124 -0.956124 -#> 100 m1 33.13 31.996124 1.133876 -#> 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", +#> 0 parent 99.46 99.73057 -0.270570 +#> 0 parent 102.04 99.73057 2.309430 +#> 1 parent 93.50 90.29805 3.201945 +#> 1 parent 92.50 90.29805 2.201945 +#> 3 parent 63.23 74.02503 -10.795028 +#> 3 parent 68.99 74.02503 -5.035028 +#> 7 parent 52.32 49.74838 2.571618 +#> 7 parent 55.13 49.74838 5.381618 +#> 14 parent 27.27 24.81588 2.454124 +#> 14 parent 26.64 24.81588 1.824124 +#> 21 parent 11.50 12.37885 -0.878849 +#> 21 parent 11.64 12.37885 -0.738849 +#> 35 parent 2.85 3.08022 -0.230219 +#> 35 parent 2.91 3.08022 -0.170219 +#> 50 parent 0.69 0.69396 -0.003958 +#> 50 parent 0.63 0.69396 -0.063958 +#> 75 parent 0.05 0.05789 -0.007888 +#> 75 parent 0.06 0.05789 0.002112 +#> 0 m1 0.00 0.00000 0.000000 +#> 0 m1 0.00 0.00000 0.000000 +#> 1 m1 4.84 4.82149 0.018512 +#> 1 m1 5.64 4.82149 0.818512 +#> 3 m1 12.91 13.06669 -0.156692 +#> 3 m1 12.96 13.06669 -0.106692 +#> 7 m1 22.97 25.10106 -2.131058 +#> 7 m1 24.47 25.10106 -0.631058 +#> 14 m1 41.69 36.72092 4.969077 +#> 14 m1 33.21 36.72092 -3.510923 +#> 21 m1 44.37 41.64835 2.721647 +#> 21 m1 46.44 41.64835 4.791647 +#> 35 m1 41.22 43.26923 -2.049225 +#> 35 m1 37.95 43.26923 -5.319225 +#> 50 m1 41.19 41.17364 0.016361 +#> 50 m1 40.01 41.17364 -1.163639 +#> 75 m1 40.09 36.43122 3.658776 +#> 75 m1 33.85 36.43122 -2.581224 +#> 100 m1 31.04 31.99612 -0.956124 +#> 100 m1 33.13 31.99612 1.133876 +#> 120 m1 25.15 28.82413 -3.674128 +#> 120 m1 33.31 28.82413 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.46 -#> R version: 3.4.1 -#> Date of fit: Sat Jul 29 15:14:32 2017 -#> Date of summary: Sat Jul 29 15:14:32 2017 +summary(f.w.value)
    #> mkin version: 0.9.47.1 +#> R version: 3.4.3 +#> Date of fit: Tue Jan 30 10:06:04 2018 +#> Date of summary: Tue Jan 30 10:06:04 2018 #> #> Equations: #> d_parent/dt = - k_parent * parent @@ -951,7 +962,7 @@ #> #> Model predictions using solution type deSolve #> -#> Fitted with method Port using 174 model solutions performed in 0.701 s +#> Fitted with method Port using 174 model solutions performed in 0.68 s #> #> Weighting: manual #> @@ -1062,10 +1073,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.46 -#> R version: 3.4.1 -#> Date of fit: Sat Jul 29 15:14:33 2017 -#> Date of summary: Sat Jul 29 15:14:33 2017 +summary(f.w.man)
    #> mkin version: 0.9.47.1 +#> R version: 3.4.3 +#> Date of fit: Tue Jan 30 10:06:05 2018 +#> Date of summary: Tue Jan 30 10:06:05 2018 #> #> Equations: #> d_parent/dt = - k_parent * parent @@ -1073,7 +1084,7 @@ #> #> Model predictions using solution type deSolve #> -#> Fitted with method Port using 297 model solutions performed in 1.223 s +#> Fitted with method Port using 297 model solutions performed in 1.178 s #> #> Weighting: manual #> @@ -1139,55 +1150,51 @@ #> #> Data: #> time variable observed predicted residual err -#> 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 -#> 7 parent 55.13 50.050295 5.079705 1 -#> 14 parent 27.27 25.179750 2.090250 1 -#> 14 parent 26.64 25.179750 1.460250 1 -#> 21 parent 11.50 12.667654 -1.167654 1 -#> 21 parent 11.64 12.667654 -1.027654 1 -#> 35 parent 2.85 3.206164 -0.356164 1 -#> 35 parent 2.91 3.206164 -0.296164 1 -#> 50 parent 0.69 0.735619 -0.045619 1 -#> 50 parent 0.63 0.735619 -0.105619 1 -#> 75 parent 0.05 0.063256 -0.013256 1 -#> 75 parent 0.06 0.063256 -0.003256 1 -#> 100 parent NA 0.005439 NA 1 -#> 100 parent NA 0.005439 NA 1 -#> 120 parent NA 0.000764 NA 1 -#> 120 parent NA 0.000764 NA 1 -#> 0 m1 0.00 0.000000 0.000000 2 -#> 0 m1 0.00 0.000000 0.000000 2 -#> 1 m1 4.84 4.787287 0.052713 2 -#> 1 m1 5.64 4.787287 0.852713 2 -#> 3 m1 12.91 12.987848 -0.077848 2 -#> 3 m1 12.96 12.987848 -0.027848 2 -#> 7 m1 22.97 24.996945 -2.026945 2 -#> 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.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.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, +#> 0 parent 99.46 99.48598 -0.025976 1 +#> 0 parent 102.04 99.48598 2.554024 1 +#> 1 parent 93.50 90.18612 3.313883 1 +#> 1 parent 92.50 90.18612 2.313883 1 +#> 3 parent 63.23 74.11316 -10.883162 1 +#> 3 parent 68.99 74.11316 -5.123162 1 +#> 7 parent 52.32 50.05029 2.269705 1 +#> 7 parent 55.13 50.05029 5.079705 1 +#> 14 parent 27.27 25.17975 2.090250 1 +#> 14 parent 26.64 25.17975 1.460250 1 +#> 21 parent 11.50 12.66765 -1.167654 1 +#> 21 parent 11.64 12.66765 -1.027654 1 +#> 35 parent 2.85 3.20616 -0.356164 1 +#> 35 parent 2.91 3.20616 -0.296164 1 +#> 50 parent 0.69 0.73562 -0.045619 1 +#> 50 parent 0.63 0.73562 -0.105619 1 +#> 75 parent 0.05 0.06326 -0.013256 1 +#> 75 parent 0.06 0.06326 -0.003256 1 +#> 0 m1 0.00 0.00000 0.000000 2 +#> 0 m1 0.00 0.00000 0.000000 2 +#> 1 m1 4.84 4.78729 0.052713 2 +#> 1 m1 5.64 4.78729 0.852713 2 +#> 3 m1 12.91 12.98785 -0.077848 2 +#> 3 m1 12.96 12.98785 -0.027848 2 +#> 7 m1 22.97 24.99695 -2.026945 2 +#> 7 m1 24.47 24.99695 -0.526945 2 +#> 14 m1 41.69 36.66353 5.026473 2 +#> 14 m1 33.21 36.66353 -3.453527 2 +#> 21 m1 44.37 41.65681 2.713187 2 +#> 21 m1 46.44 41.65681 4.783187 2 +#> 35 m1 41.22 43.35031 -2.130312 2 +#> 35 m1 37.95 43.35031 -5.400312 2 +#> 50 m1 41.19 41.25637 -0.066365 2 +#> 50 m1 40.01 41.25637 -1.246365 2 +#> 75 m1 40.09 36.46057 3.629433 2 +#> 75 m1 33.85 36.46057 -2.610567 2 +#> 100 m1 31.04 31.96929 -0.929288 2 +#> 100 m1 33.13 31.96929 1.160712 2 +#> 120 m1 25.15 28.76062 -3.610616 2 +#> 120 m1 33.31 28.76062 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.46 -#> R version: 3.4.1 -#> Date of fit: Sat Jul 29 15:14:36 2017 -#> Date of summary: Sat Jul 29 15:14:36 2017 +summary(f.w.man.irls)
    #> mkin version: 0.9.47.1 +#> R version: 3.4.3 +#> Date of fit: Tue Jan 30 10:06:08 2018 +#> Date of summary: Tue Jan 30 10:06:08 2018 #> #> Equations: #> d_parent/dt = - k_parent * parent @@ -1195,9 +1202,14 @@ #> #> Model predictions using solution type deSolve #> -#> Fitted with method Port using 628 model solutions performed in 2.578 s +#> Fitted with method Port using 692 model solutions performed in 2.733 s +#> +#> Weighting: manual #> -#> Weighting: manual then iterative reweighting method obs +#> Iterative reweighting with method obs +#> Final mean squared residuals of observed variables: +#> parent m1 +#> 11.573407 7.407845 #> #> Starting values for parameters to be optimised: #> value type @@ -1226,10 +1238,10 @@ #> #> Parameter correlation: #> parent_0 log_k_parent log_k_m1 f_parent_ilr_1 -#> parent_0 1.0000 0.5083 -0.1979 -0.6147 +#> parent_0 1.0000 0.5083 -0.1979 -0.6148 #> 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.6147 -0.6062 0.7417 1.0000 +#> f_parent_ilr_1 -0.6148 -0.6062 0.7417 1.0000 #> #> Residual standard error: 1.054 on 36 degrees of freedom #> @@ -1238,10 +1250,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.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.039e-23 0.468100 5.584e-01 +#> parent_0 99.67000 55.630 8.184e-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.486e-10 0.004066 6.753e-03 +#> 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 @@ -1257,54 +1269,50 @@ #> Estimated disappearance times: #> DT50 DT90 #> parent 6.997 23.24 -#> m1 132.281 439.43 +#> m1 132.282 439.43 #> #> Data: #> time variable observed predicted residual err.ini err -#> 0 parent 99.46 9.967e+01 -2.122e-01 1 3.402 -#> 0 parent 102.04 9.967e+01 2.368e+00 1 3.402 -#> 1 parent 93.50 9.027e+01 3.228e+00 1 3.402 -#> 1 parent 92.50 9.027e+01 2.228e+00 1 3.402 -#> 3 parent 63.23 7.405e+01 -1.082e+01 1 3.402 -#> 3 parent 68.99 7.405e+01 -5.056e+00 1 3.402 -#> 7 parent 52.32 4.982e+01 2.499e+00 1 3.402 -#> 7 parent 55.13 4.982e+01 5.309e+00 1 3.402 -#> 14 parent 27.27 2.490e+01 2.367e+00 1 3.402 -#> 14 parent 26.64 2.490e+01 1.737e+00 1 3.402 -#> 21 parent 11.50 1.245e+01 -9.477e-01 1 3.402 -#> 21 parent 11.64 1.245e+01 -8.077e-01 1 3.402 -#> 35 parent 2.85 3.110e+00 -2.600e-01 1 3.402 -#> 35 parent 2.91 3.110e+00 -2.000e-01 1 3.402 -#> 50 parent 0.69 7.037e-01 -1.375e-02 1 3.402 -#> 50 parent 0.63 7.037e-01 -7.375e-02 1 3.402 -#> 75 parent 0.05 5.913e-02 -9.134e-03 1 3.402 -#> 75 parent 0.06 5.913e-02 8.659e-04 1 3.402 -#> 100 parent NA 4.969e-03 NA 1 3.402 -#> 100 parent NA 4.969e-03 NA 1 3.402 -#> 120 parent NA 6.852e-04 NA 1 3.402 -#> 120 parent NA 6.852e-04 NA 1 3.402 -#> 0 m1 0.00 0.000e+00 0.000e+00 2 2.722 -#> 0 m1 0.00 0.000e+00 0.000e+00 2 2.722 -#> 1 m1 4.84 4.813e+00 2.672e-02 2 2.722 -#> 1 m1 5.64 4.813e+00 8.267e-01 2 2.722 -#> 3 m1 12.91 1.305e+01 -1.378e-01 2 2.722 -#> 3 m1 12.96 1.305e+01 -8.778e-02 2 2.722 -#> 7 m1 22.97 2.508e+01 -2.106e+00 2 2.722 -#> 7 m1 24.47 2.508e+01 -6.061e-01 2 2.722 -#> 14 m1 41.69 3.671e+01 4.983e+00 2 2.722 -#> 14 m1 33.21 3.671e+01 -3.497e+00 2 2.722 -#> 21 m1 44.37 4.165e+01 2.719e+00 2 2.722 -#> 21 m1 46.44 4.165e+01 4.789e+00 2 2.722 -#> 35 m1 41.22 4.329e+01 -2.069e+00 2 2.722 -#> 35 m1 37.95 4.329e+01 -5.339e+00 2 2.722 -#> 50 m1 41.19 4.119e+01 -3.394e-03 2 2.722 -#> 50 m1 40.01 4.119e+01 -1.183e+00 2 2.722 -#> 75 m1 40.09 3.644e+01 3.652e+00 2 2.722 -#> 75 m1 33.85 3.644e+01 -2.588e+00 2 2.722 -#> 100 m1 31.04 3.199e+01 -9.497e-01 2 2.722 -#> 100 m1 33.13 3.199e+01 1.140e+00 2 2.722 -#> 120 m1 25.15 2.881e+01 -3.659e+00 2 2.722 -#> 120 m1 33.31 2.881e+01 4.501e+00 2 2.722
    +#> 0 parent 99.46 99.67218 -2.122e-01 1 3.402 +#> 0 parent 102.04 99.67218 2.368e+00 1 3.402 +#> 1 parent 93.50 90.27153 3.228e+00 1 3.402 +#> 1 parent 92.50 90.27153 2.228e+00 1 3.402 +#> 3 parent 63.23 74.04648 -1.082e+01 1 3.402 +#> 3 parent 68.99 74.04648 -5.056e+00 1 3.402 +#> 7 parent 52.32 49.82092 2.499e+00 1 3.402 +#> 7 parent 55.13 49.82092 5.309e+00 1 3.402 +#> 14 parent 27.27 24.90288 2.367e+00 1 3.402 +#> 14 parent 26.64 24.90288 1.737e+00 1 3.402 +#> 21 parent 11.50 12.44765 -9.476e-01 1 3.402 +#> 21 parent 11.64 12.44765 -8.076e-01 1 3.402 +#> 35 parent 2.85 3.11002 -2.600e-01 1 3.402 +#> 35 parent 2.91 3.11002 -2.000e-01 1 3.402 +#> 50 parent 0.69 0.70375 -1.375e-02 1 3.402 +#> 50 parent 0.63 0.70375 -7.375e-02 1 3.402 +#> 75 parent 0.05 0.05913 -9.134e-03 1 3.402 +#> 75 parent 0.06 0.05913 8.662e-04 1 3.402 +#> 0 m1 0.00 0.00000 0.000e+00 2 2.722 +#> 0 m1 0.00 0.00000 0.000e+00 2 2.722 +#> 1 m1 4.84 4.81328 2.672e-02 2 2.722 +#> 1 m1 5.64 4.81328 8.267e-01 2 2.722 +#> 3 m1 12.91 13.04779 -1.378e-01 2 2.722 +#> 3 m1 12.96 13.04779 -8.779e-02 2 2.722 +#> 7 m1 22.97 25.07615 -2.106e+00 2 2.722 +#> 7 m1 24.47 25.07615 -6.062e-01 2 2.722 +#> 14 m1 41.69 36.70729 4.983e+00 2 2.722 +#> 14 m1 33.21 36.70729 -3.497e+00 2 2.722 +#> 21 m1 44.37 41.65050 2.720e+00 2 2.722 +#> 21 m1 46.44 41.65050 4.790e+00 2 2.722 +#> 35 m1 41.22 43.28866 -2.069e+00 2 2.722 +#> 35 m1 37.95 43.28866 -5.339e+00 2 2.722 +#> 50 m1 41.19 41.19339 -3.386e-03 2 2.722 +#> 50 m1 40.01 41.19339 -1.183e+00 2 2.722 +#> 75 m1 40.09 36.43820 3.652e+00 2 2.722 +#> 75 m1 33.85 36.43820 -2.588e+00 2 2.722 +#> 100 m1 31.04 31.98971 -9.497e-01 2 2.722 +#> 100 m1 33.13 31.98971 1.140e+00 2 2.722 +#> 120 m1 25.15 28.80897 -3.659e+00 2 2.722 +#> 120 m1 33.31 28.80897 4.501e+00 2 2.722