| Further arguments that will be passed on to
@@ -409,7 +413,8 @@ internal rate transformation.for measurement error in analytical chemistry. Technometrics 37(2), 176-184. Ranke J and Meinecke S (2019) Error Models for the Kinetic Evaluation of Chemical
 Degradation Data. Environments 6(12) 124
-doi:10.3390/environments6120124.+doi: 10.3390/environments6120124
+. See alsosummary.mkinfit, plot.mkinfit, parms and lrtest. 
@@ -426,17 +431,17 @@ Degradation Data. Environments  6(12) 124
 # Use shorthand notation for parent only degradation
 fit <- mkinfit("FOMC" , FOCUS_2006_C , quiet = TRUE)
 summary(fit) 
-#> mkin version used for fitting:    0.9.50.3 
+ #> mkin version used for fitting:    1.0.0 
 #> R version used for fitting:       4.0.3 
-#> Date of fit:     Thu Oct 15 12:40:10 2020 
-#> Date of summary: Thu Oct 15 12:40:10 2020 
+#> Date of fit:     Wed Feb  3 17:28:58 2021 
+#> Date of summary: Wed Feb  3 17:28:58 2021 
 #> 
 #> 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.045 s
+#> Fitted using 222 model solutions performed in 0.046 s
 #> 
 #> Error model: Constant variance 
 #> 
@@ -511,13 +516,13 @@ Degradation Data. Environments  6(12) 124
 FOCUS_D <- subset(FOCUS_2006_D , value != 0)
 # Use mkinsub for convenience in model formulation. Pathway to sink included per default.
 SFO_SFO <- mkinmod( 
-  parent = mkinsub("SFO" , "m1") ,
-  m1 = mkinsub("SFO")) 
-#> Successfully compiled differential equation model from auto-generated C code. #> Temporary DLL for differentials generated and loaded 
 # Fit the model quietly to the FOCUS example dataset D using defaults
 fit <- mkinfit(SFO_SFO, FOCUS_D, quiet = TRUE)
- #> Warning: Shapiro-Wilk test for standardized residuals: p =  0.0165 #> Likelihood ratio test
 #> 
@@ -544,9 +548,9 @@ Degradation Data. Environments 6(12) 124
 #> ---
 #> Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 #>       parent_0       k_parent           k_m1 f_parent_to_m1      sigma_low 
-#>   1.007343e+02   1.005562e-01   5.166712e-03   5.083933e-01   3.049891e-03 
+#>   1.007343e+02   1.005562e-01   5.166712e-03   5.083933e-01   3.049884e-03 
 #>       rsd_high 
-#>   7.928117e-02  #> $ff
 #>   parent_m1 parent_sink 
 #>   0.5083933   0.4916067 
@@ -554,7 +558,7 @@ Degradation Data. Environments 6(12) 124
 #> $distimes
 #>             DT50      DT90
 #> parent   6.89313  22.89848
-#> m1     134.15635 445.65776
+#> m1     134.15634 445.65772
 #>  
 # We can show a quick (only one replication) benchmark for this case, as we
 # have several alternative solution methods for the model. We skip
@@ -571,33 +575,34 @@ Degradation Data. Environments 6(12) 124
       solution_type = "analytical"))
 }
  #>               test relative elapsed
-#> 3       analytical    1.000   0.752
-#> 1 deSolve_compiled    2.294   1.725
-#> 2            eigen    2.727   2.051 # }
+#> 3       analytical    1.000   0.542
+#> 1 deSolve_compiled    1.812   0.982
+#> 2            eigen    2.234   1.211 #> Successfully compiled differential equation model from auto-generated C code. fit.FOMC_SFO <- mkinfit(FOMC_SFO, FOCUS_D, quiet = TRUE)
- #> Warning: Shapiro-Wilk test for standardized residuals: p =  0.0499 #> Temporary DLL for differentials generated and loaded fit.FOMC_SFO <- mkinfit(FOMC_SFO, FOCUS_D, quiet = TRUE)
+# Again, we get a warning and try a more sophisticated error model
 fit.FOMC_SFO.tc <- mkinfit(FOMC_SFO, FOCUS_D, quiet = TRUE, error_model = "tc")
-# This model has a higher likelihood, but not significantly so
+ #> Warning: Optimisation did not converge:
+#> iteration limit reached without convergence (10) #> Likelihood ratio test
 #> 
 #> Model 1: FOMC_SFO with error model tc and fixed parameter(s) m1_0
 #> Model 2: SFO_SFO with error model tc and fixed parameter(s) m1_0
 #>   #Df  LogLik Df  Chisq Pr(>Chisq)
-#> 1   7 -64.829                     
-#> 2   6 -64.983 -1 0.3075     0.5792 # Also, the missing standard error for log_beta and the t-tests for alpha
+#> 1   7 -64.870                     
+#> 2   6 -64.983 -1 0.2259     0.6346 #> Warning: NaNs produced #> Warning: NaNs produced #> Warning: diag(.) had 0 or NA entries; non-finite result is doubtful #> mkin version used for fitting:    0.9.50.3 
+ #> Warning: NaNs produced #> Warning: NaNs produced #> Warning: NaNs produced #> Warning: diag(.) had 0 or NA entries; non-finite result is doubtful #> mkin version used for fitting:    1.0.0 
 #> R version used for fitting:       4.0.3 
-#> Date of fit:     Thu Oct 15 12:40:24 2020 
-#> Date of summary: Thu Oct 15 12:40:24 2020 
+#> Date of fit:     Wed Feb  3 17:29:09 2021 
+#> Date of summary: Wed Feb  3 17:29:09 2021 
 #> 
 #> Equations:
 #> d_parent/dt = - (alpha/beta) * 1/((time/beta) + 1) * parent
@@ -606,7 +611,7 @@ Degradation Data. Environments 6(12) 124
 #> 
 #> Model predictions using solution type deSolve 
 #> 
-#> Fitted using 3611 model solutions performed in 2.669 s
+#> Fitted using 4273 model solutions performed in 3.195 s
 #> 
 #> Error model: Two-component variance function 
 #> 
@@ -624,80 +629,85 @@ Degradation Data. Environments 6(12) 124
 #> rsd_high         0.10  error
 #> 
 #> Starting values for the transformed parameters actually optimised:
-#>                     value lower upper
-#> parent_0       100.750000  -Inf   Inf
-#> log_k_m1        -2.302585  -Inf   Inf
-#> f_parent_ilr_1   0.000000  -Inf   Inf
-#> log_alpha        0.000000  -Inf   Inf
-#> log_beta         2.302585  -Inf   Inf
-#> sigma_low        0.100000     0   Inf
-#> rsd_high         0.100000     0   Inf
+#>                      value lower upper
+#> parent_0        100.750000  -Inf   Inf
+#> log_k_m1         -2.302585  -Inf   Inf
+#> f_parent_qlogis   0.000000  -Inf   Inf
+#> log_alpha         0.000000  -Inf   Inf
+#> log_beta          2.302585  -Inf   Inf
+#> sigma_low         0.100000     0   Inf
+#> rsd_high          0.100000     0   Inf
 #> 
 #> Fixed parameter values:
 #>      value  type
 #> m1_0     0 state
 #> 
+#> 
+#> Warning(s): 
+#> Optimisation did not converge:
+#> iteration limit reached without convergence (10)
+#> 
 #> Results:
 #> 
-#>       AIC      BIC    logLik
-#>   143.658 155.1211 -64.82902
+#>        AIC      BIC    logLik
+#>   143.7396 155.2027 -64.86982
 #> 
 #> Optimised, transformed parameters with symmetric confidence intervals:
-#>                  Estimate Std. Error     Lower      Upper
-#> parent_0       101.600000  2.6390000 96.240000 107.000000
-#> log_k_m1        -5.284000  0.0928900 -5.473000  -5.095000
-#> f_parent_ilr_1   0.001008  0.0541900 -0.109500   0.111500
-#> log_alpha        5.522000  0.0077300  5.506000   5.538000
-#> log_beta         7.806000        NaN       NaN        NaN
-#> sigma_low        0.002488  0.0002431  0.001992   0.002984
-#> rsd_high         0.079210  0.0093280  0.060180   0.098230
+#>                   Estimate Std. Error   Lower    Upper
+#> parent_0         1.016e+02    1.90600 97.7400 105.5000
+#> log_k_m1        -5.285e+00    0.09286 -5.4740  -5.0950
+#> f_parent_qlogis  6.482e-04    0.06164 -0.1251   0.1264
+#> log_alpha        5.467e+00        NaN     NaN      NaN
+#> log_beta         7.750e+00        NaN     NaN      NaN
+#> sigma_low        0.000e+00        NaN     NaN      NaN
+#> rsd_high         7.989e-02        NaN     NaN      NaN
 #> 
 #> Parameter correlation:
-#>                 parent_0  log_k_m1 f_parent_ilr_1 log_alpha log_beta sigma_low
-#> parent_0        1.000000 -0.094697       -0.76654   0.70525      NaN  0.016099
-#> log_k_m1       -0.094697  1.000000        0.51404  -0.14347      NaN  0.001576
-#> f_parent_ilr_1 -0.766543  0.514038        1.00000  -0.61368      NaN  0.015465
-#> log_alpha       0.705247 -0.143468       -0.61368   1.00000      NaN  5.871780
-#> log_beta             NaN       NaN            NaN       NaN        1       NaN
-#> sigma_low       0.016099  0.001576        0.01546   5.87178      NaN  1.000000
-#> rsd_high        0.006566 -0.011662       -0.05353   0.04845      NaN -0.652554
-#>                 rsd_high
-#> parent_0        0.006566
-#> log_k_m1       -0.011662
-#> f_parent_ilr_1 -0.053525
-#> log_alpha       0.048451
-#> log_beta             NaN
-#> sigma_low      -0.652554
-#> rsd_high        1.000000
+#>                   parent_0   log_k_m1 f_parent_qlogis log_alpha log_beta
+#> parent_0         1.0000000 -0.0002167         -0.6060       NaN      NaN
+#> log_k_m1        -0.0002167  1.0000000          0.5474       NaN      NaN
+#> f_parent_qlogis -0.6060320  0.5474423          1.0000       NaN      NaN
+#> log_alpha              NaN        NaN             NaN         1      NaN
+#> log_beta               NaN        NaN             NaN       NaN        1
+#> sigma_low              NaN        NaN             NaN       NaN      NaN
+#> rsd_high               NaN        NaN             NaN       NaN      NaN
+#>                 sigma_low rsd_high
+#> parent_0              NaN      NaN
+#> log_k_m1              NaN      NaN
+#> f_parent_qlogis       NaN      NaN
+#> log_alpha             NaN      NaN
+#> log_beta              NaN      NaN
+#> sigma_low               1      NaN
+#> rsd_high              NaN        1
 #> 
 #> 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       1.016e+02 32.7800 6.312e-26 9.624e+01 1.070e+02
-#> k_m1           5.072e-03 10.1200 1.216e-11 4.197e-03 6.130e-03
-#> f_parent_to_m1 5.004e-01 20.8300 4.318e-20 4.614e-01 5.394e-01
-#> alpha          2.502e+02  0.5624 2.889e-01 2.463e+02 2.542e+02
-#> beta           2.455e+03  0.5549 2.915e-01        NA        NA
-#> sigma_low      2.488e-03  0.4843 3.158e-01 1.992e-03 2.984e-03
-#> rsd_high       7.921e-02  8.4300 8.001e-10 6.018e-02 9.823e-02
+#> parent_0       1.016e+02 32.5400 7.812e-26 97.740000 1.055e+02
+#> k_m1           5.069e-03 10.0400 1.448e-11  0.004194 6.126e-03
+#> f_parent_to_m1 5.002e-01 20.7300 5.001e-20  0.468800 5.315e-01
+#> alpha          2.367e+02  0.6205 2.697e-01        NA        NA
+#> beta           2.322e+03  0.6114 2.727e-01        NA        NA
+#> sigma_low      0.000e+00     NaN       NaN       NaN       NaN
+#> rsd_high       7.989e-02  8.6630 4.393e-10       NaN       NaN
 #> 
 #> FOCUS Chi2 error levels in percent:
 #>          err.min n.optim df
-#> All data   6.781       5 14
-#> parent     7.141       3  6
-#> m1         4.640       2  8
+#> All data   6.782       5 14
+#> parent     7.142       3  6
+#> m1         4.639       2  8
 #> 
 #> Resulting formation fractions:
 #>                 ff
-#> parent_m1   0.5004
-#> parent_sink 0.4996
+#> parent_m1   0.5002
+#> parent_sink 0.4998
 #> 
 #> Estimated disappearance times:
-#>           DT50  DT90 DT50back
-#> parent   6.812  22.7    6.834
-#> m1     136.661 454.0       NA 
+#>          DT50  DT90 DT50back
+#> parent   6.81  22.7    6.833
+#> m1     136.74 454.2       NA 
 # We can easily use starting parameters from the parent only fit (only for illustration)
 fit.FOMC = mkinfit("FOMC", FOCUS_2006_D, quiet = TRUE, error_model = "tc")
 fit.FOMC_SFO <- mkinfit(FOMC_SFO, FOCUS_D, quiet = TRUE,
-- 
cgit v1.2.3
 |