[{"path":"https://pkgdown.jrwb.de/mkin/articles/FOCUS_L.html","id":"laboratory-data-l1","dir":"Articles","previous_headings":"","what":"Laboratory Data L1","title":"Example evaluation of FOCUS Laboratory Data L1 to L3","text":"following code defines example dataset L1 FOCUS kinetics report, p. 284: use assumptions simple first order (SFO), case declining rate constant time (FOMC) case two different phases kinetics (DFOP). detailed discussion models, please see FOCUS kinetics report. Since mkin version 0.9-32 (July 2014), can use shorthand notation like \"SFO\" parent degradation models. following two lines fit model produce summary report model fit. covers numerical analysis given FOCUS report. plot fit obtained plot function mkinfit objects. residual plot can easily obtained comparison, FOMC model fitted well, \\(\\chi^2\\) error level checked. get warning default optimisation algorithm Port converge, indication model overparameterised, .e. contains many parameters ill-defined consequence. fact, due higher number parameters, lower number degrees freedom fit, \\(\\chi^2\\) error level actually higher FOMC model (3.6%) SFO model (3.4%). Additionally, parameters log_alpha log_beta internally fitted model excessive confidence intervals, span 25 orders magnitude (!) backtransformed scale alpha beta. Also, t-test significant difference zero indicate significant difference, p-values greater 0.1, finally, parameter correlation log_alpha log_beta 1.000, clearly indicating model overparameterised. \\(\\chi^2\\) error levels reported Appendix 3 Appendix 7 FOCUS kinetics report rounded integer percentages partly deviate one percentage point results calculated mkin. reason known. However, mkin gives \\(\\chi^2\\) error levels kinfit package calculation routines kinfit package extensively compared results obtained KinGUI software, documented kinfit package vignette. KinGUI first widely used standard package field. Also, calculation \\(\\chi^2\\) error levels compared KinGUII, CAKE DegKin manager project sponsored German Umweltbundesamt (Ranke 2014).","code":"library(\"mkin\", quietly = TRUE) FOCUS_2006_L1 = data.frame( t = rep(c(0, 1, 2, 3, 5, 7, 14, 21, 30), each = 2), parent = c(88.3, 91.4, 85.6, 84.5, 78.9, 77.6, 72.0, 71.9, 50.3, 59.4, 47.0, 45.1, 27.7, 27.3, 10.0, 10.4, 2.9, 4.0)) FOCUS_2006_L1_mkin <- mkin_wide_to_long(FOCUS_2006_L1) m.L1.SFO <- mkinfit(\"SFO\", FOCUS_2006_L1_mkin, quiet = TRUE) summary(m.L1.SFO) ## mkin version used for fitting: 1.2.6 ## R version used for fitting: 4.3.2 ## Date of fit: Thu Nov 16 04:20:13 2023 ## Date of summary: Thu Nov 16 04:20:13 2023 ## ## Equations: ## d_parent/dt = - k_parent * parent ## ## Model predictions using solution type analytical ## ## Fitted using 133 model solutions performed in 0.011 s ## ## Error model: Constant variance ## ## Error model algorithm: OLS ## ## Starting values for parameters to be optimised: ## value type ## parent_0 89.85 state ## k_parent 0.10 deparm ## ## Starting values for the transformed parameters actually optimised: ## value lower upper ## parent_0 89.850000 -Inf Inf ## log_k_parent -2.302585 -Inf Inf ## ## Fixed parameter values: ## None ## ## Results: ## ## AIC BIC logLik ## 93.88778 96.5589 -43.94389 ## ## Optimised, transformed parameters with symmetric confidence intervals: ## Estimate Std. Error Lower Upper ## parent_0 92.470 1.28200 89.740 95.200 ## log_k_parent -2.347 0.03763 -2.428 -2.267 ## sigma 2.780 0.46330 1.792 3.767 ## ## Parameter correlation: ## parent_0 log_k_parent sigma ## parent_0 1.000e+00 6.186e-01 -1.516e-09 ## log_k_parent 6.186e-01 1.000e+00 -3.124e-09 ## sigma -1.516e-09 -3.124e-09 1.000e+00 ## ## 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 92.47000 72.13 8.824e-21 89.74000 95.2000 ## k_parent 0.09561 26.57 2.487e-14 0.08824 0.1036 ## sigma 2.78000 6.00 1.216e-05 1.79200 3.7670 ## ## FOCUS Chi2 error levels in percent: ## err.min n.optim df ## All data 3.424 2 7 ## parent 3.424 2 7 ## ## Estimated disappearance times: ## DT50 DT90 ## parent 7.249 24.08 ## ## Data: ## time variable observed predicted residual ## 0 parent 88.3 92.471 -4.1710 ## 0 parent 91.4 92.471 -1.0710 ## 1 parent 85.6 84.039 1.5610 ## 1 parent 84.5 84.039 0.4610 ## 2 parent 78.9 76.376 2.5241 ## 2 parent 77.6 76.376 1.2241 ## 3 parent 72.0 69.412 2.5884 ## 3 parent 71.9 69.412 2.4884 ## 5 parent 50.3 57.330 -7.0301 ## 5 parent 59.4 57.330 2.0699 ## 7 parent 47.0 47.352 -0.3515 ## 7 parent 45.1 47.352 -2.2515 ## 14 parent 27.7 24.247 3.4528 ## 14 parent 27.3 24.247 3.0528 ## 21 parent 10.0 12.416 -2.4163 ## 21 parent 10.4 12.416 -2.0163 ## 30 parent 2.9 5.251 -2.3513 ## 30 parent 4.0 5.251 -1.2513 plot(m.L1.SFO, show_errmin = TRUE, main = \"FOCUS L1 - SFO\") mkinresplot(m.L1.SFO, ylab = \"Observed\", xlab = \"Time\") m.L1.FOMC <- mkinfit(\"FOMC\", FOCUS_2006_L1_mkin, quiet=TRUE) ## Warning in mkinfit(\"FOMC\", FOCUS_2006_L1_mkin, quiet = TRUE): Optimisation did not converge: ## false convergence (8) plot(m.L1.FOMC, show_errmin = TRUE, main = \"FOCUS L1 - FOMC\") summary(m.L1.FOMC, data = FALSE) ## Warning in sqrt(diag(covar)): NaNs produced ## Warning in sqrt(1/diag(V)): NaNs produced ## Warning in cov2cor(ans$covar): diag(.) had 0 or NA entries; non-finite result ## is doubtful ## mkin version used for fitting: 1.2.6 ## R version used for fitting: 4.3.2 ## Date of fit: Thu Nov 16 04:20:13 2023 ## Date of summary: Thu Nov 16 04:20:13 2023 ## ## Equations: ## d_parent/dt = - (alpha/beta) * 1/((time/beta) + 1) * parent ## ## Model predictions using solution type analytical ## ## Fitted using 342 model solutions performed in 0.023 s ## ## Error model: Constant variance ## ## Error model algorithm: OLS ## ## Starting values for parameters to be optimised: ## value type ## parent_0 89.85 state ## alpha 1.00 deparm ## beta 10.00 deparm ## ## Starting values for the transformed parameters actually optimised: ## value lower upper ## parent_0 89.850000 -Inf Inf ## log_alpha 0.000000 -Inf Inf ## log_beta 2.302585 -Inf Inf ## ## Fixed parameter values: ## None ## ## ## Warning(s): ## Optimisation did not converge: ## false convergence (8) ## ## Results: ## ## AIC BIC logLik ## 95.88782 99.44931 -43.94391 ## ## Optimised, transformed parameters with symmetric confidence intervals: ## Estimate Std. Error Lower Upper ## parent_0 92.47 1.2820 89.720 95.220 ## log_alpha 13.20 NaN NaN NaN ## log_beta 15.54 NaN NaN NaN ## sigma 2.78 0.4607 1.792 3.768 ## ## Parameter correlation: ## parent_0 log_alpha log_beta sigma ## parent_0 1.000000 NaN NaN 0.000603 ## log_alpha NaN 1 NaN NaN ## log_beta NaN NaN 1 NaN ## sigma 0.000603 NaN NaN 1.000000 ## ## 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 9.247e+01 NA NA 89.720 95.220 ## alpha 5.386e+05 NA NA NA NA ## beta 5.633e+06 NA NA NA NA ## sigma 2.780e+00 NA NA 1.792 3.768 ## ## FOCUS Chi2 error levels in percent: ## err.min n.optim df ## All data 3.619 3 6 ## parent 3.619 3 6 ## ## Estimated disappearance times: ## DT50 DT90 DT50back ## parent 7.249 24.08 7.249"},{"path":"https://pkgdown.jrwb.de/mkin/articles/FOCUS_L.html","id":"laboratory-data-l2","dir":"Articles","previous_headings":"","what":"Laboratory Data L2","title":"Example evaluation of FOCUS Laboratory Data L1 to L3","text":"following code defines example dataset L2 FOCUS kinetics report, p. 287:","code":"FOCUS_2006_L2 = data.frame( t = rep(c(0, 1, 3, 7, 14, 28), each = 2), parent = c(96.1, 91.8, 41.4, 38.7, 19.3, 22.3, 4.6, 4.6, 2.6, 1.2, 0.3, 0.6)) FOCUS_2006_L2_mkin <- mkin_wide_to_long(FOCUS_2006_L2)"},{"path":"https://pkgdown.jrwb.de/mkin/articles/FOCUS_L.html","id":"sfo-fit-for-l2","dir":"Articles","previous_headings":"Laboratory Data L2","what":"SFO fit for L2","title":"Example evaluation of FOCUS Laboratory Data L1 to L3","text":", SFO model fitted result plotted. residual plot can obtained simply adding argument show_residuals plot command. \\(\\chi^2\\) error level 14% suggests model fit well. also obvious plots fit, included residual plot. FOCUS kinetics report, stated apparent systematic error observed residual plot measured DT90 (approximately day 5), underestimation beyond point. may add difficult judge random nature residuals just three samplings days 0, 1 3. Also, clear priori consistent underestimation approximate DT90 irrelevant. However, can rationalised fact FOCUS fate models generally implement SFO kinetics.","code":"m.L2.SFO <- mkinfit(\"SFO\", FOCUS_2006_L2_mkin, quiet=TRUE) plot(m.L2.SFO, show_residuals = TRUE, show_errmin = TRUE, main = \"FOCUS L2 - SFO\")"},{"path":"https://pkgdown.jrwb.de/mkin/articles/FOCUS_L.html","id":"fomc-fit-for-l2","dir":"Articles","previous_headings":"Laboratory Data L2","what":"FOMC fit for L2","title":"Example evaluation of FOCUS Laboratory Data L1 to L3","text":"comparison, FOMC model fitted well, \\(\\chi^2\\) error level checked. error level \\(\\chi^2\\) test passes much lower case. Therefore, FOMC model provides better description data, less experimental error assumed order explain data.","code":"m.L2.FOMC <- mkinfit(\"FOMC\", FOCUS_2006_L2_mkin, quiet = TRUE) plot(m.L2.FOMC, show_residuals = TRUE, main = \"FOCUS L2 - FOMC\") summary(m.L2.FOMC, data = FALSE) ## mkin version used for fitting: 1.2.6 ## R version used for fitting: 4.3.2 ## Date of fit: Thu Nov 16 04:20:13 2023 ## Date of summary: Thu Nov 16 04:20:14 2023 ## ## Equations: ## d_parent/dt = - (alpha/beta) * 1/((time/beta) + 1) * parent ## ## Model predictions using solution type analytical ## ## Fitted using 239 model solutions performed in 0.014 s ## ## Error model: Constant variance ## ## Error model algorithm: OLS ## ## Starting values for parameters to be optimised: ## value type ## parent_0 93.95 state ## alpha 1.00 deparm ## beta 10.00 deparm ## ## Starting values for the transformed parameters actually optimised: ## value lower upper ## parent_0 93.950000 -Inf Inf ## log_alpha 0.000000 -Inf Inf ## log_beta 2.302585 -Inf Inf ## ## Fixed parameter values: ## None ## ## Results: ## ## AIC BIC logLik ## 61.78966 63.72928 -26.89483 ## ## Optimised, transformed parameters with symmetric confidence intervals: ## Estimate Std. Error Lower Upper ## parent_0 93.7700 1.6130 90.05000 97.4900 ## log_alpha 0.3180 0.1559 -0.04149 0.6776 ## log_beta 0.2102 0.2493 -0.36460 0.7850 ## sigma 2.2760 0.4645 1.20500 3.3470 ## ## Parameter correlation: ## parent_0 log_alpha log_beta sigma ## parent_0 1.000e+00 -1.151e-01 -2.085e-01 -7.436e-09 ## log_alpha -1.151e-01 1.000e+00 9.741e-01 -1.617e-07 ## log_beta -2.085e-01 9.741e-01 1.000e+00 -1.386e-07 ## sigma -7.436e-09 -1.617e-07 -1.386e-07 1.000e+00 ## ## 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 93.770 58.120 4.267e-12 90.0500 97.490 ## alpha 1.374 6.414 1.030e-04 0.9594 1.969 ## beta 1.234 4.012 1.942e-03 0.6945 2.192 ## sigma 2.276 4.899 5.977e-04 1.2050 3.347 ## ## FOCUS Chi2 error levels in percent: ## err.min n.optim df ## All data 6.205 3 3 ## parent 6.205 3 3 ## ## Estimated disappearance times: ## DT50 DT90 DT50back ## parent 0.8092 5.356 1.612"},{"path":"https://pkgdown.jrwb.de/mkin/articles/FOCUS_L.html","id":"dfop-fit-for-l2","dir":"Articles","previous_headings":"Laboratory Data L2","what":"DFOP fit for L2","title":"Example evaluation of FOCUS Laboratory Data L1 to L3","text":"Fitting four parameter DFOP model reduces \\(\\chi^2\\) error level. , DFOP model clearly best-fit model dataset L2 based chi^2 error level criterion.","code":"m.L2.DFOP <- mkinfit(\"DFOP\", FOCUS_2006_L2_mkin, quiet = TRUE) plot(m.L2.DFOP, show_residuals = TRUE, show_errmin = TRUE, main = \"FOCUS L2 - DFOP\") summary(m.L2.DFOP, data = FALSE) ## mkin version used for fitting: 1.2.6 ## R version used for fitting: 4.3.2 ## Date of fit: Thu Nov 16 04:20:14 2023 ## Date of summary: Thu Nov 16 04:20:14 2023 ## ## Equations: ## d_parent/dt = - ((k1 * g * exp(-k1 * time) + k2 * (1 - g) * exp(-k2 * ## time)) / (g * exp(-k1 * time) + (1 - g) * exp(-k2 * time))) ## * parent ## ## Model predictions using solution type analytical ## ## Fitted using 581 model solutions performed in 0.041 s ## ## Error model: Constant variance ## ## Error model algorithm: OLS ## ## Starting values for parameters to be optimised: ## value type ## parent_0 93.95 state ## k1 0.10 deparm ## k2 0.01 deparm ## g 0.50 deparm ## ## Starting values for the transformed parameters actually optimised: ## value lower upper ## parent_0 93.950000 -Inf Inf ## log_k1 -2.302585 -Inf Inf ## log_k2 -4.605170 -Inf Inf ## g_qlogis 0.000000 -Inf Inf ## ## Fixed parameter values: ## None ## ## Results: ## ## AIC BIC logLik ## 52.36695 54.79148 -21.18347 ## ## Optimised, transformed parameters with symmetric confidence intervals: ## Estimate Std. Error Lower Upper ## parent_0 93.950 9.998e-01 91.5900 96.3100 ## log_k1 3.113 1.849e+03 -4369.0000 4375.0000 ## log_k2 -1.088 6.285e-02 -1.2370 -0.9394 ## g_qlogis -0.399 9.946e-02 -0.6342 -0.1638 ## sigma 1.414 2.886e-01 0.7314 2.0960 ## ## Parameter correlation: ## parent_0 log_k1 log_k2 g_qlogis sigma ## parent_0 1.000e+00 6.763e-07 -8.944e-10 2.665e-01 -1.083e-09 ## log_k1 6.763e-07 1.000e+00 1.112e-04 -2.187e-04 -1.027e-05 ## log_k2 -8.944e-10 1.112e-04 1.000e+00 -7.903e-01 9.464e-09 ## g_qlogis 2.665e-01 -2.187e-04 -7.903e-01 1.000e+00 -1.532e-08 ## sigma -1.083e-09 -1.027e-05 9.464e-09 -1.532e-08 1.000e+00 ## ## 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 93.9500 9.397e+01 2.036e-12 91.5900 96.3100 ## k1 22.4900 5.533e-04 4.998e-01 0.0000 Inf ## k2 0.3369 1.591e+01 4.697e-07 0.2904 0.3909 ## g 0.4016 1.680e+01 3.238e-07 0.3466 0.4591 ## sigma 1.4140 4.899e+00 8.776e-04 0.7314 2.0960 ## ## FOCUS Chi2 error levels in percent: ## err.min n.optim df ## All data 2.53 4 2 ## parent 2.53 4 2 ## ## Estimated disappearance times: ## DT50 DT90 DT50back DT50_k1 DT50_k2 ## parent 0.5335 5.311 1.599 0.03083 2.058"},{"path":"https://pkgdown.jrwb.de/mkin/articles/FOCUS_L.html","id":"laboratory-data-l3","dir":"Articles","previous_headings":"","what":"Laboratory Data L3","title":"Example evaluation of FOCUS Laboratory Data L1 to L3","text":"following code defines example dataset L3 FOCUS kinetics report, p. 290.","code":"FOCUS_2006_L3 = data.frame( t = c(0, 3, 7, 14, 30, 60, 91, 120), parent = c(97.8, 60, 51, 43, 35, 22, 15, 12)) FOCUS_2006_L3_mkin <- mkin_wide_to_long(FOCUS_2006_L3)"},{"path":"https://pkgdown.jrwb.de/mkin/articles/FOCUS_L.html","id":"fit-multiple-models","dir":"Articles","previous_headings":"Laboratory Data L3","what":"Fit multiple models","title":"Example evaluation of FOCUS Laboratory Data L1 to L3","text":"mkin version 0.9-39 (June 2015), can fit several models one datasets one call function mmkin. datasets passed list, case named list holding L3 dataset prepared . \\(\\chi^2\\) error level 21% well plot suggest SFO model fit well. FOMC model performs better, error level \\(\\chi^2\\) test passes 7%. Fitting four parameter DFOP model reduces \\(\\chi^2\\) error level considerably.","code":"# Only use one core here, not to offend the CRAN checks mm.L3 <- mmkin(c(\"SFO\", \"FOMC\", \"DFOP\"), cores = 1, list(\"FOCUS L3\" = FOCUS_2006_L3_mkin), quiet = TRUE) plot(mm.L3)"},{"path":"https://pkgdown.jrwb.de/mkin/articles/FOCUS_L.html","id":"accessing-mmkin-objects","dir":"Articles","previous_headings":"Laboratory Data L3","what":"Accessing mmkin objects","title":"Example evaluation of FOCUS Laboratory Data L1 to L3","text":"objects returned mmkin arranged like matrix, models row index datasets column index. can extract summary plot e.g. DFOP fit, using square brackets indexing result use summary plot functions working mkinfit objects. , look model plot, confidence intervals parameters correlation matrix suggest parameter estimates reliable, DFOP model can used best-fit model based \\(\\chi^2\\) error level criterion laboratory data L3. also example standard t-test parameter g_ilr misleading, tests significant difference zero. case, zero appears correct value parameter, confidence interval backtransformed parameter g quite narrow.","code":"summary(mm.L3[[\"DFOP\", 1]]) ## mkin version used for fitting: 1.2.6 ## R version used for fitting: 4.3.2 ## Date of fit: Thu Nov 16 04:20:14 2023 ## Date of summary: Thu Nov 16 04:20:14 2023 ## ## Equations: ## d_parent/dt = - ((k1 * g * exp(-k1 * time) + k2 * (1 - g) * exp(-k2 * ## time)) / (g * exp(-k1 * time) + (1 - g) * exp(-k2 * time))) ## * parent ## ## Model predictions using solution type analytical ## ## Fitted using 376 model solutions performed in 0.024 s ## ## Error model: Constant variance ## ## Error model algorithm: OLS ## ## Starting values for parameters to be optimised: ## value type ## parent_0 97.80 state ## k1 0.10 deparm ## k2 0.01 deparm ## g 0.50 deparm ## ## Starting values for the transformed parameters actually optimised: ## value lower upper ## parent_0 97.800000 -Inf Inf ## log_k1 -2.302585 -Inf Inf ## log_k2 -4.605170 -Inf Inf ## g_qlogis 0.000000 -Inf Inf ## ## Fixed parameter values: ## None ## ## Results: ## ## AIC BIC logLik ## 32.97732 33.37453 -11.48866 ## ## Optimised, transformed parameters with symmetric confidence intervals: ## Estimate Std. Error Lower Upper ## parent_0 97.7500 1.01900 94.5000 101.000000 ## log_k1 -0.6612 0.10050 -0.9812 -0.341300 ## log_k2 -4.2860 0.04322 -4.4230 -4.148000 ## g_qlogis -0.1739 0.05270 -0.3416 -0.006142 ## sigma 1.0170 0.25430 0.2079 1.827000 ## ## Parameter correlation: ## parent_0 log_k1 log_k2 g_qlogis sigma ## parent_0 1.000e+00 1.732e-01 2.282e-02 4.009e-01 -9.696e-08 ## log_k1 1.732e-01 1.000e+00 4.945e-01 -5.809e-01 7.148e-07 ## log_k2 2.282e-02 4.945e-01 1.000e+00 -6.812e-01 1.022e-06 ## g_qlogis 4.009e-01 -5.809e-01 -6.812e-01 1.000e+00 -7.930e-07 ## sigma -9.696e-08 7.148e-07 1.022e-06 -7.930e-07 1.000e+00 ## ## 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 97.75000 95.960 1.248e-06 94.50000 101.00000 ## k1 0.51620 9.947 1.081e-03 0.37490 0.71090 ## k2 0.01376 23.140 8.840e-05 0.01199 0.01579 ## g 0.45660 34.920 2.581e-05 0.41540 0.49850 ## sigma 1.01700 4.000 1.400e-02 0.20790 1.82700 ## ## FOCUS Chi2 error levels in percent: ## err.min n.optim df ## All data 2.225 4 4 ## parent 2.225 4 4 ## ## Estimated disappearance times: ## DT50 DT90 DT50back DT50_k1 DT50_k2 ## parent 7.464 123 37.03 1.343 50.37 ## ## Data: ## time variable observed predicted residual ## 0 parent 97.8 97.75 0.05396 ## 3 parent 60.0 60.45 -0.44933 ## 7 parent 51.0 49.44 1.56338 ## 14 parent 43.0 43.84 -0.83632 ## 30 parent 35.0 35.15 -0.14707 ## 60 parent 22.0 23.26 -1.25919 ## 91 parent 15.0 15.18 -0.18181 ## 120 parent 12.0 10.19 1.81395 plot(mm.L3[[\"DFOP\", 1]], show_errmin = TRUE)"},{"path":"https://pkgdown.jrwb.de/mkin/articles/FOCUS_L.html","id":"laboratory-data-l4","dir":"Articles","previous_headings":"","what":"Laboratory Data L4","title":"Example evaluation of FOCUS Laboratory Data L1 to L3","text":"following code defines example dataset L4 FOCUS kinetics report, p. 293: Fits SFO FOMC models, plots summaries produced : \\(\\chi^2\\) error level 3.3% well plot suggest SFO model fits well. error level \\(\\chi^2\\) test passes slightly lower FOMC model. However, difference appears negligible.","code":"FOCUS_2006_L4 = data.frame( t = c(0, 3, 7, 14, 30, 60, 91, 120), parent = c(96.6, 96.3, 94.3, 88.8, 74.9, 59.9, 53.5, 49.0)) FOCUS_2006_L4_mkin <- mkin_wide_to_long(FOCUS_2006_L4) # Only use one core here, not to offend the CRAN checks mm.L4 <- mmkin(c(\"SFO\", \"FOMC\"), cores = 1, list(\"FOCUS L4\" = FOCUS_2006_L4_mkin), quiet = TRUE) plot(mm.L4) summary(mm.L4[[\"SFO\", 1]], data = FALSE) ## mkin version used for fitting: 1.2.6 ## R version used for fitting: 4.3.2 ## Date of fit: Thu Nov 16 04:20:14 2023 ## Date of summary: Thu Nov 16 04:20:15 2023 ## ## Equations: ## d_parent/dt = - k_parent * parent ## ## Model predictions using solution type analytical ## ## Fitted using 142 model solutions performed in 0.01 s ## ## Error model: Constant variance ## ## Error model algorithm: OLS ## ## Starting values for parameters to be optimised: ## value type ## parent_0 96.6 state ## k_parent 0.1 deparm ## ## Starting values for the transformed parameters actually optimised: ## value lower upper ## parent_0 96.600000 -Inf Inf ## log_k_parent -2.302585 -Inf Inf ## ## Fixed parameter values: ## None ## ## Results: ## ## AIC BIC logLik ## 47.12133 47.35966 -20.56067 ## ## Optimised, transformed parameters with symmetric confidence intervals: ## Estimate Std. Error Lower Upper ## parent_0 96.440 1.69900 92.070 100.800 ## log_k_parent -5.030 0.07059 -5.211 -4.848 ## sigma 3.162 0.79050 1.130 5.194 ## ## Parameter correlation: ## parent_0 log_k_parent sigma ## parent_0 1.000e+00 5.938e-01 3.430e-07 ## log_k_parent 5.938e-01 1.000e+00 5.885e-07 ## sigma 3.430e-07 5.885e-07 1.000e+00 ## ## 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 96.440000 56.77 1.604e-08 92.070000 1.008e+02 ## k_parent 0.006541 14.17 1.578e-05 0.005455 7.842e-03 ## sigma 3.162000 4.00 5.162e-03 1.130000 5.194e+00 ## ## FOCUS Chi2 error levels in percent: ## err.min n.optim df ## All data 3.287 2 6 ## parent 3.287 2 6 ## ## Estimated disappearance times: ## DT50 DT90 ## parent 106 352 summary(mm.L4[[\"FOMC\", 1]], data = FALSE) ## mkin version used for fitting: 1.2.6 ## R version used for fitting: 4.3.2 ## Date of fit: Thu Nov 16 04:20:15 2023 ## Date of summary: Thu Nov 16 04:20:15 2023 ## ## Equations: ## d_parent/dt = - (alpha/beta) * 1/((time/beta) + 1) * parent ## ## Model predictions using solution type analytical ## ## Fitted using 224 model solutions performed in 0.014 s ## ## Error model: Constant variance ## ## Error model algorithm: OLS ## ## Starting values for parameters to be optimised: ## value type ## parent_0 96.6 state ## alpha 1.0 deparm ## beta 10.0 deparm ## ## Starting values for the transformed parameters actually optimised: ## value lower upper ## parent_0 96.600000 -Inf Inf ## log_alpha 0.000000 -Inf Inf ## log_beta 2.302585 -Inf Inf ## ## Fixed parameter values: ## None ## ## Results: ## ## AIC BIC logLik ## 40.37255 40.69032 -16.18628 ## ## Optimised, transformed parameters with symmetric confidence intervals: ## Estimate Std. Error Lower Upper ## parent_0 99.1400 1.2670 95.6300 102.7000 ## log_alpha -0.3506 0.2616 -1.0770 0.3756 ## log_beta 4.1740 0.3938 3.0810 5.2670 ## sigma 1.8300 0.4575 0.5598 3.1000 ## ## Parameter correlation: ## parent_0 log_alpha log_beta sigma ## parent_0 1.000e+00 -4.696e-01 -5.543e-01 -2.447e-07 ## log_alpha -4.696e-01 1.000e+00 9.889e-01 2.198e-08 ## log_beta -5.543e-01 9.889e-01 1.000e+00 4.923e-08 ## sigma -2.447e-07 2.198e-08 4.923e-08 1.000e+00 ## ## 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.1400 78.250 7.993e-08 95.6300 102.700 ## alpha 0.7042 3.823 9.365e-03 0.3407 1.456 ## beta 64.9800 2.540 3.201e-02 21.7800 193.900 ## sigma 1.8300 4.000 8.065e-03 0.5598 3.100 ## ## FOCUS Chi2 error levels in percent: ## err.min n.optim df ## All data 2.029 3 5 ## parent 2.029 3 5 ## ## Estimated disappearance times: ## DT50 DT90 DT50back ## parent 108.9 1644 494.9"},{"path":[]},{"path":"https://pkgdown.jrwb.de/mkin/articles/mkin.html","id":"abstract","dir":"Articles","previous_headings":"","what":"Abstract","title":"Short introduction to mkin","text":"regulatory evaluation chemical substances like plant protection products (pesticides), biocides chemicals, degradation data play important role. evaluation pesticide degradation experiments, detailed guidance developed, based nonlinear optimisation. R add-package mkin implements fitting models recommended guidance within R calculates statistical measures data series within one compartments, parent metabolites.","code":"library(\"mkin\", quietly = TRUE) # Define the kinetic model m_SFO_SFO_SFO <- mkinmod(parent = mkinsub(\"SFO\", \"M1\"), M1 = mkinsub(\"SFO\", \"M2\"), M2 = mkinsub(\"SFO\"), use_of_ff = \"max\", quiet = TRUE) # Produce model predictions using some arbitrary parameters sampling_times = c(0, 1, 3, 7, 14, 28, 60, 90, 120) d_SFO_SFO_SFO <- mkinpredict(m_SFO_SFO_SFO, c(k_parent = 0.03, f_parent_to_M1 = 0.5, k_M1 = log(2)/100, f_M1_to_M2 = 0.9, k_M2 = log(2)/50), c(parent = 100, M1 = 0, M2 = 0), sampling_times) # Generate a dataset by adding normally distributed errors with # standard deviation 3, for two replicates at each sampling time d_SFO_SFO_SFO_err <- add_err(d_SFO_SFO_SFO, reps = 2, sdfunc = function(x) 3, n = 1, seed = 123456789 ) # Fit the model to the dataset f_SFO_SFO_SFO <- mkinfit(m_SFO_SFO_SFO, d_SFO_SFO_SFO_err[[1]], quiet = TRUE) # Plot the results separately for parent and metabolites plot_sep(f_SFO_SFO_SFO, lpos = c(\"topright\", \"bottomright\", \"bottomright\"))"},{"path":"https://pkgdown.jrwb.de/mkin/articles/mkin.html","id":"background","dir":"Articles","previous_headings":"","what":"Background","title":"Short introduction to mkin","text":"mkin package (J. Ranke 2021) implements approach degradation kinetics recommended kinetics report provided FOrum Co-ordination pesticide fate models USe (FOCUS Work Group Degradation Kinetics 2006, 2014). covers data series describing decline one compound, data series transformation products (commonly termed metabolites) data series one compartment. possible include back reactions. Therefore, equilibrium reactions equilibrium partitioning can specified, although often leads overparameterisation model. first mkin code published 2010, commonly used tools fitting complex kinetic degradation models experimental data KinGUI (Schäfer et al. 2007), MATLAB based tool graphical user interface specifically tailored task included output proposed FOCUS Kinetics Workgroup, ModelMaker, general purpose compartment based tool providing infrastructure fitting dynamic simulation models based differential equations data. ‘mkin’ code first uploaded BerliOS development platform. taken , version control history imported R-Forge site (see e.g. initial commit 11 May 2010), code still updated. time, R package FME (Flexible Modelling Environment) (Soetaert Petzoldt 2010) already available, provided good basis developing package specifically tailored task. remaining challenge make easy possible users (including author vignette) specify system differential equations include output requested FOCUS guidance, \\(\\chi^2\\) error level defined guidance. Also, mkin introduced using analytical solutions parent kinetics improved optimization speed. Later, Eigenvalue based solutions introduced mkin case linear differential equations (.e. FOMC DFOP models used parent compound), greatly improving optimization speed cases. , become somehow obsolete, use compiled code described gives even faster execution times. possibility specify back-reactions biphasic model (SFORB) metabolites present mkin beginning.","code":""},{"path":"https://pkgdown.jrwb.de/mkin/articles/mkin.html","id":"derived-software-tools","dir":"Articles","previous_headings":"Background","what":"Derived software tools","title":"Short introduction to mkin","text":"Soon publication mkin, two derived tools published, namely KinGUII (developed Bayer Crop Science) CAKE (commissioned Tessella Syngenta), added graphical user interface (GUI), added fitting iteratively reweighted least squares (IRLS) characterisation likely parameter distributions Markov Chain Monte Carlo (MCMC) sampling. CAKE focuses smooth use experience, sacrificing flexibility model definition, originally allowing two primary metabolites parallel. current version 3.4 CAKE released May 2020 uses scheme six metabolites flexible arrangement supports biphasic modelling metabolites, support back-reactions (non-instantaneous equilibria). KinGUI offers even flexible widget specifying complex kinetic models. Back-reactions (non-instantaneous equilibria) supported early , 2014, simple first-order models specified transformation products. Starting KinGUII version 2.1, biphasic modelling metabolites also available KinGUII. graphical user interface (GUI) recently brought decent degree maturity browser based GUI named gmkin. Please see documentation page manual information. comparison scope, usability numerical results obtained tools recently published Johannes Ranke, Wöltjen, Meinecke (2018).","code":""},{"path":"https://pkgdown.jrwb.de/mkin/articles/mkin.html","id":"unique-features","dir":"Articles","previous_headings":"","what":"Unique features","title":"Short introduction to mkin","text":"Currently, main unique features available mkin speed increase using compiled code compiler present, parallel model fitting multicore machines using mmkin function, estimation parameter confidence intervals based transformed parameters (see ) possibility use two-component error model iteratively reweighted least squares fitting different variances variable introduced Gao et al. (2011) available mkin since version 0.9-22. release 0.9.49.5, IRLS algorithm complemented direct step-wise maximisation likelihood function, makes possible fit variance variable error model also two-component error model inspired error models developed analytical chemistry (Johannes Ranke Meinecke 2019).","code":""},{"path":"https://pkgdown.jrwb.de/mkin/articles/mkin.html","id":"internal-parameter-transformations","dir":"Articles","previous_headings":"","what":"Internal parameter transformations","title":"Short introduction to mkin","text":"rate constants, log transformation used, proposed Bates Watts (1988, 77, 149). Approximate intervals constructed transformed rate constants (compare Bates Watts 1988, 135), .e. logarithms. Confidence intervals rate constants obtained using appropriate backtransformation using exponential function. first version mkin allowing specifying models using formation fractions, home-made reparameterisation used order ensure sum formation fractions exceed unity. method still used current version KinGUII (v2.1 April 2014), modification allows fixing pathway sink zero. CAKE uses penalties objective function order enforce constraint. 2012, alternative reparameterisation formation fractions proposed together René Lehmann (J. Ranke Lehmann 2012), based isometric logratio transformation (ILR). aim improve validity linear approximation objective function parameter estimation procedure well subsequent calculation parameter confidence intervals. current version mkin, logit transformation used parameters bound 0 1, g parameter DFOP model.","code":""},{"path":"https://pkgdown.jrwb.de/mkin/articles/mkin.html","id":"confidence-intervals-based-on-transformed-parameters","dir":"Articles","previous_headings":"Internal parameter transformations","what":"Confidence intervals based on transformed parameters","title":"Short introduction to mkin","text":"first attempt providing improved parameter confidence intervals introduced mkin 2013, confidence intervals obtained FME transformed parameters simply backtransformed one one yield asymmetric confidence intervals backtransformed parameters. However, 1:1 relation rate constants model transformed parameters fitted model, parameters obtained isometric logratio transformation calculated set formation fractions quantify paths compounds formed specific parent compound, 1:1 relation exists. Therefore, parameter confidence intervals formation fractions obtained method appear valid case single transformation product, currently logit transformation used formation fraction. confidence intervals obtained backtransformation cases 1:1 relation transformed original parameter exist considered author vignette accurate obtained using re-estimation Hessian matrix backtransformation, implemented FME package.","code":""},{"path":"https://pkgdown.jrwb.de/mkin/articles/mkin.html","id":"parameter-t-test-based-on-untransformed-parameters","dir":"Articles","previous_headings":"Internal parameter transformations","what":"Parameter t-test based on untransformed parameters","title":"Short introduction to mkin","text":"standard output many nonlinear regression software packages includes results test significant difference zero parameters. test also recommended check validity rate constants FOCUS guidance (FOCUS Work Group Degradation Kinetics 2014, 96ff). argued precondition test, .e. normal distribution estimator parameters, fulfilled case nonlinear regression (J. Ranke Lehmann 2015). However, test commonly used industry, consultants national authorities order decide reliability parameter estimates, based FOCUS guidance mentioned . Therefore, results one-sided t-test included summary output mkin. reasonable test significant difference transformed parameters (e.g. \\(log(k)\\)) zero, t-test calculated based model definition parameter transformation, .e. similar way packages apply internal parameter transformation. note included mkin output, pointing fact t-test based unjustified assumption normal distribution parameter estimators.","code":""},{"path":[]},{"path":"https://pkgdown.jrwb.de/mkin/articles/prebuilt/2022_cyan_pathway.html","id":"introduction","dir":"Articles > Prebuilt","previous_headings":"","what":"Introduction","title":"Testing hierarchical pathway kinetics with residue data on cyantraniliprole","text":"purpose document test demonstrate nonlinear hierarchical models (NLHM) based parent degradation models SFO, FOMC, DFOP HS, serial formation two metabolites can fitted mkin package. assembled course work package 1.2 Project Number 173340 (Application nonlinear hierarchical models kinetic evaluation chemical degradation data) German Environment Agency carried 2022 2023. mkin package used version 1.2.6 currently development. newly introduced functionality used simplification excluding random effects set fits based related set fits reduced model, documentation starting parameters fit, starting parameters saem fits now listed summary. saemix package used backend fitting NLHM, also loaded make convergence plot function available. document processed knitr package, also provides kable function used improve display tabular data R markdown documents. parallel processing, parallel package used.","code":"library(mkin) library(knitr) library(saemix) library(parallel) n_cores <- detectCores() # We need to start a new cluster after defining a compiled model that is # saved as a DLL to the user directory, therefore we define a function # This is used again after defining the pathway model start_cluster <- function(n_cores) { if (Sys.info()[\"sysname\"] == \"Windows\") { ret <- makePSOCKcluster(n_cores) } else { ret <- makeForkCluster(n_cores) } return(ret) } cl <- start_cluster(n_cores)"},{"path":"https://pkgdown.jrwb.de/mkin/articles/prebuilt/2022_cyan_pathway.html","id":"test-data","dir":"Articles > Prebuilt","previous_headings":"Introduction","what":"Test data","title":"Testing hierarchical pathway kinetics with residue data on cyantraniliprole","text":"example data taken final addendum DAR 2014 distributed mkin package. Residue data time step normalisation factors read using function read_spreadsheet mkin package. function also performs time step normalisation. following tables show covariate data 5 datasets read spreadsheet file. Covariate data Dataset Nambsheim Dataset Tama Dataset Gross-Umstadt Dataset Sassafras Dataset Lleida","code":"data_file <- system.file( \"testdata\", \"cyantraniliprole_soil_efsa_2014.xlsx\", package = \"mkin\") cyan_ds <- read_spreadsheet(data_file, parent_only = FALSE) pH <- attr(cyan_ds, \"covariates\") kable(pH, caption = \"Covariate data\") for (ds_name in names(cyan_ds)) { print( kable(mkin_long_to_wide(cyan_ds[[ds_name]]), caption = paste(\"Dataset\", ds_name), booktabs = TRUE, row.names = FALSE)) cat(\"\\n\\\\clearpage\\n\") }"},{"path":"https://pkgdown.jrwb.de/mkin/articles/prebuilt/2022_cyan_pathway.html","id":"parent-only-evaluations","dir":"Articles > Prebuilt","previous_headings":"","what":"Parent only evaluations","title":"Testing hierarchical pathway kinetics with residue data on cyantraniliprole","text":"pathway fits long run times, evaluations parent data performed first, order determine hierarchical parent degradation model random effects degradation model parameters ill-defined. fits converged successfully. almost models, random effect initial concentration parent compound ill-defined. biexponential models DFOP SFORB, random effect one additional parameter ill-defined two-component error model used. Model comparison based AIC BIC indicates two-component error model preferable parent models exception DFOP. lowest AIC BIC values obtained FOMC model, followed SFORB DFOP.","code":"cyan_sep_const <- mmkin(c(\"SFO\", \"FOMC\", \"DFOP\", \"SFORB\", \"HS\"), cyan_ds, quiet = TRUE, cores = n_cores) cyan_sep_tc <- update(cyan_sep_const, error_model = \"tc\") cyan_saem_full <- mhmkin(list(cyan_sep_const, cyan_sep_tc)) status(cyan_saem_full) |> kable() illparms(cyan_saem_full) |> kable() anova(cyan_saem_full) |> kable(digits = 1) stopCluster(cl)"},{"path":[]},{"path":"https://pkgdown.jrwb.de/mkin/articles/prebuilt/2022_cyan_pathway.html","id":"evaluations-with-pathway-established-previously","dir":"Articles > Prebuilt","previous_headings":"Pathway fits","what":"Evaluations with pathway established previously","title":"Testing hierarchical pathway kinetics with residue data on cyantraniliprole","text":"test technical feasibility coupling relevant parent degradation models different transformation pathway models, list mkinmod models set . EU evaluation, parallel formation metabolites JCZ38 J9Z38 secondary formation metabolite JSE76 JCZ38 used. obtain suitable starting values NLHM fits, separate pathway fits performed datasets. separate fits converged successfully. biggest convergence problems seen using HS model constant variance. hierarchical pathway fits, random effects quantified corresponding parent data analyses excluded. code , output illparms function parent fits used argument no_random_effect mhmkin function. possibility introduced mkin version 1.2.2 currently development. status information individual fits shows fits completed successfully. matrix entries Fth FO indicate Fisher Information Matrix inverted fixed effects (theta) random effects (Omega), respectively. affected fits, ill-defined parameters determined using illparms function, relies Fisher Information Matrix. model comparison suggests pathway fits using DFOP SFORB parent compound provide best fit. two parent model, successful fits shown . Plots fits parent models shown Appendix. DFOP pathway fit two-component error SFORB pathway fit two-component error closer graphical analysis Figures shows residues transformation product JCZ38 soils Tama Nambsheim observed later time points strongly systematically underestimated.","code":"if (!dir.exists(\"cyan_dlls\")) dir.create(\"cyan_dlls\") cyan_path_1 <- list( sfo_path_1 = mkinmod( cyan = mkinsub(\"SFO\", c(\"JCZ38\", \"J9Z38\")), JCZ38 = mkinsub(\"SFO\", \"JSE76\"), J9Z38 = mkinsub(\"SFO\"), JSE76 = mkinsub(\"SFO\"), quiet = TRUE, name = \"sfo_path_1\", dll_dir = \"cyan_dlls\", overwrite = TRUE), fomc_path_1 = mkinmod( cyan = mkinsub(\"FOMC\", c(\"JCZ38\", \"J9Z38\")), JCZ38 = mkinsub(\"SFO\", \"JSE76\"), J9Z38 = mkinsub(\"SFO\"), JSE76 = mkinsub(\"SFO\"), quiet = TRUE, name = \"fomc_path_1\", dll_dir = \"cyan_dlls\", overwrite = TRUE), dfop_path_1 = mkinmod( cyan = mkinsub(\"DFOP\", c(\"JCZ38\", \"J9Z38\")), JCZ38 = mkinsub(\"SFO\", \"JSE76\"), J9Z38 = mkinsub(\"SFO\"), JSE76 = mkinsub(\"SFO\"), quiet = TRUE, name = \"dfop_path_1\", dll_dir = \"cyan_dlls\", overwrite = TRUE), sforb_path_1 = mkinmod( cyan = mkinsub(\"SFORB\", c(\"JCZ38\", \"J9Z38\")), JCZ38 = mkinsub(\"SFO\", \"JSE76\"), J9Z38 = mkinsub(\"SFO\"), JSE76 = mkinsub(\"SFO\"), quiet = TRUE, name = \"sforb_path_1\", dll_dir = \"cyan_dlls\", overwrite = TRUE), hs_path_1 = mkinmod( cyan = mkinsub(\"HS\", c(\"JCZ38\", \"J9Z38\")), JCZ38 = mkinsub(\"SFO\", \"JSE76\"), J9Z38 = mkinsub(\"SFO\"), JSE76 = mkinsub(\"SFO\"), quiet = TRUE, name = \"hs_path_1\", dll_dir = \"cyan_dlls\", overwrite = TRUE) ) cl_path_1 <- start_cluster(n_cores) f_sep_1_const <- mmkin( cyan_path_1, cyan_ds, error_model = \"const\", cluster = cl_path_1, quiet = TRUE) status(f_sep_1_const) |> kable() f_sep_1_tc <- update(f_sep_1_const, error_model = \"tc\") status(f_sep_1_tc) |> kable() f_saem_1 <- mhmkin(list(f_sep_1_const, f_sep_1_tc), no_random_effect = illparms(cyan_saem_full), cluster = cl_path_1) status(f_saem_1) |> kable() illparms(f_saem_1) |> kable() anova(f_saem_1) |> kable(digits = 1) plot(f_saem_1[[\"dfop_path_1\", \"tc\"]]) plot(f_saem_1[[\"sforb_path_1\", \"tc\"]]) stopCluster(cl_path_1)"},{"path":"https://pkgdown.jrwb.de/mkin/articles/prebuilt/2022_cyan_pathway.html","id":"alternative-pathway-fits","dir":"Articles > Prebuilt","previous_headings":"Pathway fits","what":"Alternative pathway fits","title":"Testing hierarchical pathway kinetics with residue data on cyantraniliprole","text":"improve fit JCZ38, back-reaction JSE76 JCZ38 introduced alternative version transformation pathway, analogy back-reaction K5A78 K5A77. pairs transformation products pairs organic acid corresponding amide (Addendum 2014, p. 109). FOMC provided best fit parent, biexponential models DFOP SFORB provided best initial pathway fits, three parent models used alternative pathway fits. Using constant variance, separate fits converge exception fits Sassafras soil data. Using two-component error model, separate fits converge exception alternative pathway fit DFOP used parent Sassafras dataset. hierarchical fits alternative pathway completed successfully. fits, random effects formation fractions pathways JCZ38 JSE76, reverse pathway JSE76 JCZ38 ill-defined. variants using biexponential models DFOP SFORB parent compound two-component error model give lowest AIC BIC values plotted . Compared original pathway, AIC BIC values indicate large improvement. confirmed plots, show metabolite JCZ38 fitted much better model. FOMC pathway fit two-component error, alternative pathway DFOP pathway fit two-component error, alternative pathway SFORB pathway fit two-component error, alternative pathway","code":"cyan_path_2 <- list( fomc_path_2 = mkinmod( cyan = mkinsub(\"FOMC\", c(\"JCZ38\", \"J9Z38\")), JCZ38 = mkinsub(\"SFO\", \"JSE76\"), J9Z38 = mkinsub(\"SFO\"), JSE76 = mkinsub(\"SFO\", \"JCZ38\"), name = \"fomc_path_2\", quiet = TRUE, dll_dir = \"cyan_dlls\", overwrite = TRUE ), dfop_path_2 = mkinmod( cyan = mkinsub(\"DFOP\", c(\"JCZ38\", \"J9Z38\")), JCZ38 = mkinsub(\"SFO\", \"JSE76\"), J9Z38 = mkinsub(\"SFO\"), JSE76 = mkinsub(\"SFO\", \"JCZ38\"), name = \"dfop_path_2\", quiet = TRUE, dll_dir = \"cyan_dlls\", overwrite = TRUE ), sforb_path_2 = mkinmod( cyan = mkinsub(\"SFORB\", c(\"JCZ38\", \"J9Z38\")), JCZ38 = mkinsub(\"SFO\", \"JSE76\"), J9Z38 = mkinsub(\"SFO\"), JSE76 = mkinsub(\"SFO\", \"JCZ38\"), name = \"sforb_path_2\", quiet = TRUE, dll_dir = \"cyan_dlls\", overwrite = TRUE ) ) cl_path_2 <- start_cluster(n_cores) f_sep_2_const <- mmkin( cyan_path_2, cyan_ds, error_model = \"const\", cluster = cl_path_2, quiet = TRUE) status(f_sep_2_const) |> kable() f_sep_2_tc <- update(f_sep_2_const, error_model = \"tc\") status(f_sep_2_tc) |> kable() f_saem_2 <- mhmkin(list(f_sep_2_const, f_sep_2_tc), no_random_effect = illparms(cyan_saem_full[2:4, ]), cluster = cl_path_2) status(f_saem_2) |> kable() illparms(f_saem_2) |> kable() anova(f_saem_2) |> kable(digits = 1) plot(f_saem_2[[\"fomc_path_2\", \"tc\"]]) plot(f_saem_2[[\"dfop_path_2\", \"tc\"]]) plot(f_saem_2[[\"sforb_path_2\", \"tc\"]])"},{"path":"https://pkgdown.jrwb.de/mkin/articles/prebuilt/2022_cyan_pathway.html","id":"refinement-of-alternative-pathway-fits","dir":"Articles > Prebuilt","previous_headings":"Pathway fits","what":"Refinement of alternative pathway fits","title":"Testing hierarchical pathway kinetics with residue data on cyantraniliprole","text":"ill-defined random effects identified parent fits pathway fits, excluded final evaluations . purpose, list character vectors created can indexed row column indices, contains degradation parameter names random effects excluded hierarchical fits contained f_saem_2. exception FOMC pathway fit constant variance, updated fits completed successfully. However, Fisher Information Matrix fixed effects (Fth) inverted, confidence intervals optimised parameters available. AIC BIC values best fit (DFOP pathway fit two-component error) lower previous fits alternative pathway, practical value refined evaluations limited confidence intervals obtained.","code":"no_ranef <- matrix(list(), nrow = 3, ncol = 2, dimnames = dimnames(f_saem_2)) no_ranef[[\"fomc_path_2\", \"const\"]] <- c(\"log_beta\", \"f_JCZ38_qlogis\", \"f_JSE76_qlogis\") no_ranef[[\"fomc_path_2\", \"tc\"]] <- c(\"cyan_0\", \"f_JCZ38_qlogis\", \"f_JSE76_qlogis\") no_ranef[[\"dfop_path_2\", \"const\"]] <- c(\"cyan_0\", \"f_JCZ38_qlogis\", \"f_JSE76_qlogis\") no_ranef[[\"dfop_path_2\", \"tc\"]] <- c(\"cyan_0\", \"log_k1\", \"f_JCZ38_qlogis\", \"f_JSE76_qlogis\") no_ranef[[\"sforb_path_2\", \"const\"]] <- c(\"cyan_free_0\", \"f_JCZ38_qlogis\", \"f_JSE76_qlogis\") no_ranef[[\"sforb_path_2\", \"tc\"]] <- c(\"cyan_free_0\", \"log_k_cyan_free_bound\", \"f_JCZ38_qlogis\", \"f_JSE76_qlogis\") clusterExport(cl_path_2, \"no_ranef\") f_saem_3 <- update(f_saem_2, no_random_effect = no_ranef, cluster = cl_path_2) status(f_saem_3) |> kable() illparms(f_saem_3) |> kable() anova(f_saem_3) |> kable(digits = 1) stopCluster(cl_path_2)"},{"path":"https://pkgdown.jrwb.de/mkin/articles/prebuilt/2022_cyan_pathway.html","id":"conclusion","dir":"Articles > Prebuilt","previous_headings":"","what":"Conclusion","title":"Testing hierarchical pathway kinetics with residue data on cyantraniliprole","text":"demonstrated relatively complex transformation pathway parallel formation two primary metabolites one secondary metabolite can fitted even data individual datasets quite different partly cover formation phase. run times pathway fits several hours, limiting practical feasibility iterative refinements based ill-defined parameters alternative checks parameter identifiability based multistart runs.","code":""},{"path":"https://pkgdown.jrwb.de/mkin/articles/prebuilt/2022_cyan_pathway.html","id":"acknowledgements","dir":"Articles > Prebuilt","previous_headings":"","what":"Acknowledgements","title":"Testing hierarchical pathway kinetics with residue data on cyantraniliprole","text":"helpful comments Janina Wöltjen German Environment Agency gratefully acknowledged.","code":""},{"path":[]},{"path":"https://pkgdown.jrwb.de/mkin/articles/prebuilt/2022_cyan_pathway.html","id":"plots-of-fits-that-were-not-refined-further","dir":"Articles > Prebuilt","previous_headings":"Appendix","what":"Plots of fits that were not refined further","title":"Testing hierarchical pathway kinetics with residue data on cyantraniliprole","text":"SFO pathway fit two-component error FOMC pathway fit two-component error HS pathway fit two-component error","code":"plot(f_saem_1[[\"sfo_path_1\", \"tc\"]]) plot(f_saem_1[[\"fomc_path_1\", \"tc\"]]) plot(f_saem_1[[\"sforb_path_1\", \"tc\"]])"},{"path":[]},{"path":"https://pkgdown.jrwb.de/mkin/articles/prebuilt/2022_cyan_pathway.html","id":"pathway-1","dir":"Articles > Prebuilt","previous_headings":"Appendix > Hierarchical fit listings","what":"Pathway 1","title":"Testing hierarchical pathway kinetics with residue data on cyantraniliprole","text":"Hierarchical SFO path 1 fit constant variance Hierarchical SFO path 1 fit two-component error Hierarchical FOMC path 1 fit constant variance Hierarchical FOMC path 1 fit two-component error Hierarchical DFOP path 1 fit constant variance Hierarchical DFOP path 1 fit two-component error Hierarchical SFORB path 1 fit constant variance Hierarchical SFORB path 1 fit two-component error Hierarchical HS path 1 fit constant variance","code":"saemix version used for fitting: 3.2 mkin version used for pre-fitting: 1.2.6 R version used for fitting: 4.3.2 Date of fit: Thu Nov 16 04:27:41 2023 Date of summary: Thu Nov 16 04:59:11 2023 Equations: d_cyan/dt = - k_cyan * cyan d_JCZ38/dt = + f_cyan_to_JCZ38 * k_cyan * cyan - k_JCZ38 * JCZ38 d_J9Z38/dt = + f_cyan_to_J9Z38 * k_cyan * cyan - k_J9Z38 * J9Z38 d_JSE76/dt = + f_JCZ38_to_JSE76 * k_JCZ38 * JCZ38 - k_JSE76 * JSE76 Data: 433 observations of 4 variable(s) grouped in 5 datasets Model predictions using solution type deSolve Fitted in 421.347 s Using 300, 100 iterations and 10 chains Variance model: Constant variance Starting values for degradation parameters: cyan_0 log_k_cyan log_k_JCZ38 log_k_J9Z38 log_k_JSE76 95.3304 -3.8459 -3.1305 -5.0678 -5.3196 f_cyan_ilr_1 f_cyan_ilr_2 f_JCZ38_qlogis 0.8158 23.5335 11.8774 Fixed degradation parameter values: None Starting values for random effects (square root of initial entries in omega): cyan_0 log_k_cyan log_k_JCZ38 log_k_J9Z38 log_k_JSE76 cyan_0 4.797 0.0000 0.000 0.000 0.0000 log_k_cyan 0.000 0.9619 0.000 0.000 0.0000 log_k_JCZ38 0.000 0.0000 2.139 0.000 0.0000 log_k_J9Z38 0.000 0.0000 0.000 1.639 0.0000 log_k_JSE76 0.000 0.0000 0.000 0.000 0.7894 f_cyan_ilr_1 0.000 0.0000 0.000 0.000 0.0000 f_cyan_ilr_2 0.000 0.0000 0.000 0.000 0.0000 f_JCZ38_qlogis 0.000 0.0000 0.000 0.000 0.0000 f_cyan_ilr_1 f_cyan_ilr_2 f_JCZ38_qlogis cyan_0 0.0000 0.000 0.00 log_k_cyan 0.0000 0.000 0.00 log_k_JCZ38 0.0000 0.000 0.00 log_k_J9Z38 0.0000 0.000 0.00 log_k_JSE76 0.0000 0.000 0.00 f_cyan_ilr_1 0.7714 0.000 0.00 f_cyan_ilr_2 0.0000 9.247 0.00 f_JCZ38_qlogis 0.0000 0.000 16.61 Starting values for error model parameters: a.1 1 Results: Likelihood computed by importance sampling AIC BIC logLik 2693 2687 -1331 Optimised parameters: est. lower upper cyan_0 95.1279 9.354e+01 9.671e+01 log_k_cyan -3.8527 -4.367e+00 -3.338e+00 log_k_JCZ38 -3.0381 -4.187e+00 -1.889e+00 log_k_J9Z38 -5.0095 -5.623e+00 -4.396e+00 log_k_JSE76 -5.3357 -6.025e+00 -4.646e+00 f_cyan_ilr_1 0.8050 5.174e-01 1.093e+00 f_cyan_ilr_2 12.4820 -1.050e+06 1.051e+06 f_JCZ38_qlogis 1.2912 3.561e-01 2.226e+00 a.1 4.8393 NA NA SD.log_k_cyan 0.5840 NA NA SD.log_k_JCZ38 1.2740 NA NA SD.log_k_J9Z38 0.3172 NA NA SD.log_k_JSE76 0.5677 NA NA SD.f_cyan_ilr_1 0.2623 NA NA SD.f_cyan_ilr_2 1.3724 NA NA SD.f_JCZ38_qlogis 0.1464 NA NA Correlation is not available Random effects: est. lower upper SD.log_k_cyan 0.5840 NA NA SD.log_k_JCZ38 1.2740 NA NA SD.log_k_J9Z38 0.3172 NA NA SD.log_k_JSE76 0.5677 NA NA SD.f_cyan_ilr_1 0.2623 NA NA SD.f_cyan_ilr_2 1.3724 NA NA SD.f_JCZ38_qlogis 0.1464 NA NA Variance model: est. lower upper a.1 4.839 NA NA Backtransformed parameters: est. lower upper cyan_0 95.127935 93.542456 96.713413 k_cyan 0.021221 0.012687 0.035497 k_JCZ38 0.047924 0.015189 0.151213 k_J9Z38 0.006674 0.003612 0.012332 k_JSE76 0.004817 0.002417 0.009601 f_cyan_to_JCZ38 0.757402 NA NA f_cyan_to_J9Z38 0.242597 NA NA f_JCZ38_to_JSE76 0.784347 0.588098 0.902582 Resulting formation fractions: ff cyan_JCZ38 7.574e-01 cyan_J9Z38 2.426e-01 cyan_sink 9.839e-08 JCZ38_JSE76 7.843e-01 JCZ38_sink 2.157e-01 Estimated disappearance times: DT50 DT90 cyan 32.66 108.50 JCZ38 14.46 48.05 J9Z38 103.86 345.00 JSE76 143.91 478.04 saemix version used for fitting: 3.2 mkin version used for pre-fitting: 1.2.6 R version used for fitting: 4.3.2 Date of fit: Thu Nov 16 04:27:55 2023 Date of summary: Thu Nov 16 04:59:11 2023 Equations: d_cyan/dt = - k_cyan * cyan d_JCZ38/dt = + f_cyan_to_JCZ38 * k_cyan * cyan - k_JCZ38 * JCZ38 d_J9Z38/dt = + f_cyan_to_J9Z38 * k_cyan * cyan - k_J9Z38 * J9Z38 d_JSE76/dt = + f_JCZ38_to_JSE76 * k_JCZ38 * JCZ38 - k_JSE76 * JSE76 Data: 433 observations of 4 variable(s) grouped in 5 datasets Model predictions using solution type deSolve Fitted in 435.122 s Using 300, 100 iterations and 10 chains Variance model: Two-component variance function Starting values for degradation parameters: cyan_0 log_k_cyan log_k_JCZ38 log_k_J9Z38 log_k_JSE76 96.0039 -3.8907 -3.1276 -5.0069 -4.9367 f_cyan_ilr_1 f_cyan_ilr_2 f_JCZ38_qlogis 0.7937 22.3422 17.8932 Fixed degradation parameter values: None Starting values for random effects (square root of initial entries in omega): cyan_0 log_k_cyan log_k_JCZ38 log_k_J9Z38 log_k_JSE76 cyan_0 4.859 0.000 0.00 0.00 0.0000 log_k_cyan 0.000 0.962 0.00 0.00 0.0000 log_k_JCZ38 0.000 0.000 2.04 0.00 0.0000 log_k_J9Z38 0.000 0.000 0.00 1.72 0.0000 log_k_JSE76 0.000 0.000 0.00 0.00 0.9076 f_cyan_ilr_1 0.000 0.000 0.00 0.00 0.0000 f_cyan_ilr_2 0.000 0.000 0.00 0.00 0.0000 f_JCZ38_qlogis 0.000 0.000 0.00 0.00 0.0000 f_cyan_ilr_1 f_cyan_ilr_2 f_JCZ38_qlogis cyan_0 0.0000 0.000 0.00 log_k_cyan 0.0000 0.000 0.00 log_k_JCZ38 0.0000 0.000 0.00 log_k_J9Z38 0.0000 0.000 0.00 log_k_JSE76 0.0000 0.000 0.00 f_cyan_ilr_1 0.7598 0.000 0.00 f_cyan_ilr_2 0.0000 8.939 0.00 f_JCZ38_qlogis 0.0000 0.000 14.49 Starting values for error model parameters: a.1 b.1 1 1 Results: Likelihood computed by importance sampling AIC BIC logLik 2658 2651 -1312 Optimised parameters: est. lower upper cyan_0 94.81681 NA NA log_k_cyan -3.91558 NA NA log_k_JCZ38 -3.12715 NA NA log_k_J9Z38 -5.04840 NA NA log_k_JSE76 -5.10443 NA NA f_cyan_ilr_1 0.80760 NA NA f_cyan_ilr_2 48.66960 NA NA f_JCZ38_qlogis 3.03397 NA NA a.1 3.93879 NA NA b.1 0.08057 NA NA SD.log_k_cyan 0.58921 NA NA SD.log_k_JCZ38 1.29813 NA NA SD.log_k_J9Z38 0.68372 NA NA SD.log_k_JSE76 0.35128 NA NA SD.f_cyan_ilr_1 0.38352 NA NA SD.f_cyan_ilr_2 4.98884 NA NA SD.f_JCZ38_qlogis 1.75636 NA NA Correlation is not available Random effects: est. lower upper SD.log_k_cyan 0.5892 NA NA SD.log_k_JCZ38 1.2981 NA NA SD.log_k_J9Z38 0.6837 NA NA SD.log_k_JSE76 0.3513 NA NA SD.f_cyan_ilr_1 0.3835 NA NA SD.f_cyan_ilr_2 4.9888 NA NA SD.f_JCZ38_qlogis 1.7564 NA NA Variance model: est. lower upper a.1 3.93879 NA NA b.1 0.08057 NA NA Backtransformed parameters: est. lower upper cyan_0 94.81681 NA NA k_cyan 0.01993 NA NA k_JCZ38 0.04384 NA NA k_J9Z38 0.00642 NA NA k_JSE76 0.00607 NA NA f_cyan_to_JCZ38 0.75807 NA NA f_cyan_to_J9Z38 0.24193 NA NA f_JCZ38_to_JSE76 0.95409 NA NA Resulting formation fractions: ff cyan_JCZ38 0.75807 cyan_J9Z38 0.24193 cyan_sink 0.00000 JCZ38_JSE76 0.95409 JCZ38_sink 0.04591 Estimated disappearance times: DT50 DT90 cyan 34.78 115.54 JCZ38 15.81 52.52 J9Z38 107.97 358.68 JSE76 114.20 379.35 saemix version used for fitting: 3.2 mkin version used for pre-fitting: 1.2.6 R version used for fitting: 4.3.2 Date of fit: Thu Nov 16 04:28:33 2023 Date of summary: Thu Nov 16 04:59:11 2023 Equations: d_cyan/dt = - (alpha/beta) * 1/((time/beta) + 1) * cyan d_JCZ38/dt = + f_cyan_to_JCZ38 * (alpha/beta) * 1/((time/beta) + 1) * cyan - k_JCZ38 * JCZ38 d_J9Z38/dt = + f_cyan_to_J9Z38 * (alpha/beta) * 1/((time/beta) + 1) * cyan - k_J9Z38 * J9Z38 d_JSE76/dt = + f_JCZ38_to_JSE76 * k_JCZ38 * JCZ38 - k_JSE76 * JSE76 Data: 433 observations of 4 variable(s) grouped in 5 datasets Model predictions using solution type deSolve Fitted in 473.357 s Using 300, 100 iterations and 10 chains Variance model: Constant variance Starting values for degradation parameters: cyan_0 log_k_JCZ38 log_k_J9Z38 log_k_JSE76 f_cyan_ilr_1 101.2314 -3.3680 -5.1108 -5.9416 0.7144 f_cyan_ilr_2 f_JCZ38_qlogis log_alpha log_beta 7.0229 14.9234 -0.1791 2.9811 Fixed degradation parameter values: None Starting values for random effects (square root of initial entries in omega): cyan_0 log_k_JCZ38 log_k_J9Z38 log_k_JSE76 f_cyan_ilr_1 cyan_0 5.416 0.000 0.0 0.000 0.0000 log_k_JCZ38 0.000 2.439 0.0 0.000 0.0000 log_k_J9Z38 0.000 0.000 1.7 0.000 0.0000 log_k_JSE76 0.000 0.000 0.0 1.856 0.0000 f_cyan_ilr_1 0.000 0.000 0.0 0.000 0.7164 f_cyan_ilr_2 0.000 0.000 0.0 0.000 0.0000 f_JCZ38_qlogis 0.000 0.000 0.0 0.000 0.0000 log_alpha 0.000 0.000 0.0 0.000 0.0000 log_beta 0.000 0.000 0.0 0.000 0.0000 f_cyan_ilr_2 f_JCZ38_qlogis log_alpha log_beta cyan_0 0.00 0.00 0.0000 0.0000 log_k_JCZ38 0.00 0.00 0.0000 0.0000 log_k_J9Z38 0.00 0.00 0.0000 0.0000 log_k_JSE76 0.00 0.00 0.0000 0.0000 f_cyan_ilr_1 0.00 0.00 0.0000 0.0000 f_cyan_ilr_2 11.57 0.00 0.0000 0.0000 f_JCZ38_qlogis 0.00 18.81 0.0000 0.0000 log_alpha 0.00 0.00 0.4144 0.0000 log_beta 0.00 0.00 0.0000 0.5077 Starting values for error model parameters: a.1 1 Results: Likelihood computed by importance sampling AIC BIC logLik 2428 2421 -1196 Optimised parameters: est. lower upper cyan_0 101.1664 98.51265 103.8202 log_k_JCZ38 -3.3883 -4.78250 -1.9941 log_k_J9Z38 -5.3087 -5.91564 -4.7017 log_k_JSE76 -6.1313 -7.30061 -4.9619 f_cyan_ilr_1 0.7456 0.43782 1.0534 f_cyan_ilr_2 0.8181 0.24956 1.3866 f_JCZ38_qlogis 2.0467 0.61165 3.4817 log_alpha -0.2391 -0.62806 0.1499 log_beta 2.8739 2.67664 3.0711 a.1 3.4160 3.17960 3.6525 SD.cyan_0 2.4355 0.40399 4.4671 SD.log_k_JCZ38 1.5654 0.57311 2.5576 SD.log_k_J9Z38 0.4645 -0.06533 0.9943 SD.log_k_JSE76 0.9841 0.10738 1.8609 SD.f_cyan_ilr_1 0.3285 0.10546 0.5515 SD.f_cyan_ilr_2 0.2276 -0.38711 0.8424 SD.f_JCZ38_qlogis 0.8340 -0.20970 1.8777 SD.log_alpha 0.4250 0.16017 0.6898 Correlation: cyan_0 l__JCZ3 l__J9Z3 l__JSE7 f_cy__1 f_cy__2 f_JCZ38 log_lph log_k_JCZ38 -0.0159 log_k_J9Z38 -0.0546 0.0080 log_k_JSE76 -0.0337 0.0016 0.0074 f_cyan_ilr_1 -0.0095 0.0194 -0.1573 0.0003 f_cyan_ilr_2 -0.2733 0.0799 0.3059 0.0263 0.0125 f_JCZ38_qlogis 0.0755 -0.0783 -0.0516 0.1222 -0.1155 -0.5231 log_alpha -0.0567 0.0120 0.0351 0.0189 0.0040 0.0829 -0.0502 log_beta -0.2980 0.0461 0.1382 0.0758 0.0209 0.4079 -0.2053 0.2759 Random effects: est. lower upper SD.cyan_0 2.4355 0.40399 4.4671 SD.log_k_JCZ38 1.5654 0.57311 2.5576 SD.log_k_J9Z38 0.4645 -0.06533 0.9943 SD.log_k_JSE76 0.9841 0.10738 1.8609 SD.f_cyan_ilr_1 0.3285 0.10546 0.5515 SD.f_cyan_ilr_2 0.2276 -0.38711 0.8424 SD.f_JCZ38_qlogis 0.8340 -0.20970 1.8777 SD.log_alpha 0.4250 0.16017 0.6898 Variance model: est. lower upper a.1 3.416 3.18 3.652 Backtransformed parameters: est. lower upper cyan_0 1.012e+02 9.851e+01 103.82023 k_JCZ38 3.377e-02 8.375e-03 0.13614 k_J9Z38 4.948e-03 2.697e-03 0.00908 k_JSE76 2.174e-03 6.751e-04 0.00700 f_cyan_to_JCZ38 6.389e-01 NA NA f_cyan_to_J9Z38 2.226e-01 NA NA f_JCZ38_to_JSE76 8.856e-01 6.483e-01 0.97016 alpha 7.873e-01 5.336e-01 1.16166 beta 1.771e+01 1.454e+01 21.56509 Resulting formation fractions: ff cyan_JCZ38 0.6389 cyan_J9Z38 0.2226 cyan_sink 0.1385 JCZ38_JSE76 0.8856 JCZ38_sink 0.1144 Estimated disappearance times: DT50 DT90 DT50back cyan 25.00 312.06 93.94 JCZ38 20.53 68.19 NA J9Z38 140.07 465.32 NA JSE76 318.86 1059.22 NA saemix version used for fitting: 3.2 mkin version used for pre-fitting: 1.2.6 R version used for fitting: 4.3.2 Date of fit: Thu Nov 16 04:28:46 2023 Date of summary: Thu Nov 16 04:59:11 2023 Equations: d_cyan/dt = - (alpha/beta) * 1/((time/beta) + 1) * cyan d_JCZ38/dt = + f_cyan_to_JCZ38 * (alpha/beta) * 1/((time/beta) + 1) * cyan - k_JCZ38 * JCZ38 d_J9Z38/dt = + f_cyan_to_J9Z38 * (alpha/beta) * 1/((time/beta) + 1) * cyan - k_J9Z38 * J9Z38 d_JSE76/dt = + f_JCZ38_to_JSE76 * k_JCZ38 * JCZ38 - k_JSE76 * JSE76 Data: 433 observations of 4 variable(s) grouped in 5 datasets Model predictions using solution type deSolve Fitted in 486.031 s Using 300, 100 iterations and 10 chains Variance model: Two-component variance function Starting values for degradation parameters: cyan_0 log_k_JCZ38 log_k_J9Z38 log_k_JSE76 f_cyan_ilr_1 101.13294 -3.32499 -5.09097 -5.93566 0.71359 f_cyan_ilr_2 f_JCZ38_qlogis log_alpha log_beta 10.30315 14.62272 -0.09633 3.10634 Fixed degradation parameter values: None Starting values for random effects (square root of initial entries in omega): cyan_0 log_k_JCZ38 log_k_J9Z38 log_k_JSE76 f_cyan_ilr_1 cyan_0 5.649 0.000 0.00 0.00 0.0000 log_k_JCZ38 0.000 2.319 0.00 0.00 0.0000 log_k_J9Z38 0.000 0.000 1.73 0.00 0.0000 log_k_JSE76 0.000 0.000 0.00 1.86 0.0000 f_cyan_ilr_1 0.000 0.000 0.00 0.00 0.7183 f_cyan_ilr_2 0.000 0.000 0.00 0.00 0.0000 f_JCZ38_qlogis 0.000 0.000 0.00 0.00 0.0000 log_alpha 0.000 0.000 0.00 0.00 0.0000 log_beta 0.000 0.000 0.00 0.00 0.0000 f_cyan_ilr_2 f_JCZ38_qlogis log_alpha log_beta cyan_0 0.00 0.00 0.0000 0.0000 log_k_JCZ38 0.00 0.00 0.0000 0.0000 log_k_J9Z38 0.00 0.00 0.0000 0.0000 log_k_JSE76 0.00 0.00 0.0000 0.0000 f_cyan_ilr_1 0.00 0.00 0.0000 0.0000 f_cyan_ilr_2 12.85 0.00 0.0000 0.0000 f_JCZ38_qlogis 0.00 18.54 0.0000 0.0000 log_alpha 0.00 0.00 0.3142 0.0000 log_beta 0.00 0.00 0.0000 0.7333 Starting values for error model parameters: a.1 b.1 1 1 Results: Likelihood computed by importance sampling AIC BIC logLik 2424 2416 -1193 Optimised parameters: est. lower upper cyan_0 100.65667 NA NA log_k_JCZ38 -3.45782 NA NA log_k_J9Z38 -5.23476 NA NA log_k_JSE76 -5.71827 NA NA f_cyan_ilr_1 0.68389 NA NA f_cyan_ilr_2 0.61027 NA NA f_JCZ38_qlogis 116.27482 NA NA log_alpha -0.14484 NA NA log_beta 3.03220 NA NA a.1 3.11051 NA NA b.1 0.04508 NA NA SD.log_k_JCZ38 1.39961 NA NA SD.log_k_J9Z38 0.57920 NA NA SD.log_k_JSE76 0.68364 NA NA SD.f_cyan_ilr_1 0.31477 NA NA SD.f_cyan_ilr_2 0.37716 NA NA SD.f_JCZ38_qlogis 5.52695 NA NA SD.log_alpha 0.22823 NA NA SD.log_beta 0.39161 NA NA Correlation is not available Random effects: est. lower upper SD.log_k_JCZ38 1.3996 NA NA SD.log_k_J9Z38 0.5792 NA NA SD.log_k_JSE76 0.6836 NA NA SD.f_cyan_ilr_1 0.3148 NA NA SD.f_cyan_ilr_2 0.3772 NA NA SD.f_JCZ38_qlogis 5.5270 NA NA SD.log_alpha 0.2282 NA NA SD.log_beta 0.3916 NA NA Variance model: est. lower upper a.1 3.11051 NA NA b.1 0.04508 NA NA Backtransformed parameters: est. lower upper cyan_0 1.007e+02 NA NA k_JCZ38 3.150e-02 NA NA k_J9Z38 5.328e-03 NA NA k_JSE76 3.285e-03 NA NA f_cyan_to_JCZ38 5.980e-01 NA NA f_cyan_to_J9Z38 2.273e-01 NA NA f_JCZ38_to_JSE76 1.000e+00 NA NA alpha 8.652e-01 NA NA beta 2.074e+01 NA NA Resulting formation fractions: ff cyan_JCZ38 0.5980 cyan_J9Z38 0.2273 cyan_sink 0.1746 JCZ38_JSE76 1.0000 JCZ38_sink 0.0000 Estimated disappearance times: DT50 DT90 DT50back cyan 25.48 276.2 83.15 JCZ38 22.01 73.1 NA J9Z38 130.09 432.2 NA JSE76 210.98 700.9 NA saemix version used for fitting: 3.2 mkin version used for pre-fitting: 1.2.6 R version used for fitting: 4.3.2 Date of fit: Thu Nov 16 04:29:15 2023 Date of summary: Thu Nov 16 04:59:11 2023 Equations: d_cyan/dt = - ((k1 * g * exp(-k1 * time) + k2 * (1 - g) * exp(-k2 * time)) / (g * exp(-k1 * time) + (1 - g) * exp(-k2 * time))) * cyan d_JCZ38/dt = + f_cyan_to_JCZ38 * ((k1 * g * exp(-k1 * time) + k2 * (1 - g) * exp(-k2 * time)) / (g * exp(-k1 * time) + (1 - g) * exp(-k2 * time))) * cyan - k_JCZ38 * JCZ38 d_J9Z38/dt = + f_cyan_to_J9Z38 * ((k1 * g * exp(-k1 * time) + k2 * (1 - g) * exp(-k2 * time)) / (g * exp(-k1 * time) + (1 - g) * exp(-k2 * time))) * cyan - k_J9Z38 * J9Z38 d_JSE76/dt = + f_JCZ38_to_JSE76 * k_JCZ38 * JCZ38 - k_JSE76 * JSE76 Data: 433 observations of 4 variable(s) grouped in 5 datasets Model predictions using solution type deSolve Fitted in 514.477 s Using 300, 100 iterations and 10 chains Variance model: Constant variance Starting values for degradation parameters: cyan_0 log_k_JCZ38 log_k_J9Z38 log_k_JSE76 f_cyan_ilr_1 102.0643 -3.4008 -5.0024 -5.8612 0.6855 f_cyan_ilr_2 f_JCZ38_qlogis log_k1 log_k2 g_qlogis 1.2366 13.6901 -1.8641 -4.5063 -0.6468 Fixed degradation parameter values: None Starting values for random effects (square root of initial entries in omega): cyan_0 log_k_JCZ38 log_k_J9Z38 log_k_JSE76 f_cyan_ilr_1 cyan_0 4.466 0.000 0.000 0.000 0.0000 log_k_JCZ38 0.000 2.382 0.000 0.000 0.0000 log_k_J9Z38 0.000 0.000 1.595 0.000 0.0000 log_k_JSE76 0.000 0.000 0.000 1.245 0.0000 f_cyan_ilr_1 0.000 0.000 0.000 0.000 0.6852 f_cyan_ilr_2 0.000 0.000 0.000 0.000 0.0000 f_JCZ38_qlogis 0.000 0.000 0.000 0.000 0.0000 log_k1 0.000 0.000 0.000 0.000 0.0000 log_k2 0.000 0.000 0.000 0.000 0.0000 g_qlogis 0.000 0.000 0.000 0.000 0.0000 f_cyan_ilr_2 f_JCZ38_qlogis log_k1 log_k2 g_qlogis cyan_0 0.00 0.00 0.0000 0.0000 0.000 log_k_JCZ38 0.00 0.00 0.0000 0.0000 0.000 log_k_J9Z38 0.00 0.00 0.0000 0.0000 0.000 log_k_JSE76 0.00 0.00 0.0000 0.0000 0.000 f_cyan_ilr_1 0.00 0.00 0.0000 0.0000 0.000 f_cyan_ilr_2 1.28 0.00 0.0000 0.0000 0.000 f_JCZ38_qlogis 0.00 16.08 0.0000 0.0000 0.000 log_k1 0.00 0.00 0.9866 0.0000 0.000 log_k2 0.00 0.00 0.0000 0.5953 0.000 g_qlogis 0.00 0.00 0.0000 0.0000 1.583 Starting values for error model parameters: a.1 1 Results: Likelihood computed by importance sampling AIC BIC logLik 2403 2395 -1182 Optimised parameters: est. lower upper cyan_0 102.5565 NA NA log_k_JCZ38 -3.4729 NA NA log_k_J9Z38 -5.1533 NA NA log_k_JSE76 -5.6669 NA NA f_cyan_ilr_1 0.6665 NA NA f_cyan_ilr_2 0.5191 NA NA f_JCZ38_qlogis 37.0113 NA NA log_k1 -1.8497 NA NA log_k2 -4.4931 NA NA g_qlogis -0.6383 NA NA a.1 3.2397 NA NA SD.log_k_JCZ38 1.4286 NA NA SD.log_k_J9Z38 0.5312 NA NA SD.log_k_JSE76 0.6627 NA NA SD.f_cyan_ilr_1 0.3013 NA NA SD.f_cyan_ilr_2 0.2980 NA NA SD.f_JCZ38_qlogis 0.1637 NA NA SD.log_k1 0.5069 NA NA SD.log_k2 0.3828 NA NA SD.g_qlogis 0.8641 NA NA Correlation is not available Random effects: est. lower upper SD.log_k_JCZ38 1.4286 NA NA SD.log_k_J9Z38 0.5312 NA NA SD.log_k_JSE76 0.6627 NA NA SD.f_cyan_ilr_1 0.3013 NA NA SD.f_cyan_ilr_2 0.2980 NA NA SD.f_JCZ38_qlogis 0.1637 NA NA SD.log_k1 0.5069 NA NA SD.log_k2 0.3828 NA NA SD.g_qlogis 0.8641 NA NA Variance model: est. lower upper a.1 3.24 NA NA Backtransformed parameters: est. lower upper cyan_0 1.026e+02 NA NA k_JCZ38 3.103e-02 NA NA k_J9Z38 5.780e-03 NA NA k_JSE76 3.459e-03 NA NA f_cyan_to_JCZ38 5.813e-01 NA NA f_cyan_to_J9Z38 2.265e-01 NA NA f_JCZ38_to_JSE76 1.000e+00 NA NA k1 1.573e-01 NA NA k2 1.119e-02 NA NA g 3.456e-01 NA NA Resulting formation fractions: ff cyan_JCZ38 0.5813 cyan_J9Z38 0.2265 cyan_sink 0.1922 JCZ38_JSE76 1.0000 JCZ38_sink 0.0000 Estimated disappearance times: DT50 DT90 DT50back DT50_k1 DT50_k2 cyan 25.23 167.94 50.55 4.407 61.97 JCZ38 22.34 74.22 NA NA NA J9Z38 119.92 398.36 NA NA NA JSE76 200.41 665.76 NA NA NA saemix version used for fitting: 3.2 mkin version used for pre-fitting: 1.2.6 R version used for fitting: 4.3.2 Date of fit: Thu Nov 16 04:31:58 2023 Date of summary: Thu Nov 16 04:59:11 2023 Equations: d_cyan/dt = - ((k1 * g * exp(-k1 * time) + k2 * (1 - g) * exp(-k2 * time)) / (g * exp(-k1 * time) + (1 - g) * exp(-k2 * time))) * cyan d_JCZ38/dt = + f_cyan_to_JCZ38 * ((k1 * g * exp(-k1 * time) + k2 * (1 - g) * exp(-k2 * time)) / (g * exp(-k1 * time) + (1 - g) * exp(-k2 * time))) * cyan - k_JCZ38 * JCZ38 d_J9Z38/dt = + f_cyan_to_J9Z38 * ((k1 * g * exp(-k1 * time) + k2 * (1 - g) * exp(-k2 * time)) / (g * exp(-k1 * time) + (1 - g) * exp(-k2 * time))) * cyan - k_J9Z38 * J9Z38 d_JSE76/dt = + f_JCZ38_to_JSE76 * k_JCZ38 * JCZ38 - k_JSE76 * JSE76 Data: 433 observations of 4 variable(s) grouped in 5 datasets Model predictions using solution type deSolve Fitted in 677.928 s Using 300, 100 iterations and 10 chains Variance model: Two-component variance function Starting values for degradation parameters: cyan_0 log_k_JCZ38 log_k_J9Z38 log_k_JSE76 f_cyan_ilr_1 101.3964 -3.3626 -4.9792 -5.8727 0.6814 f_cyan_ilr_2 f_JCZ38_qlogis log_k1 log_k2 g_qlogis 6.8713 13.6901 -1.9222 -4.5035 -0.7172 Fixed degradation parameter values: None Starting values for random effects (square root of initial entries in omega): cyan_0 log_k_JCZ38 log_k_J9Z38 log_k_JSE76 f_cyan_ilr_1 cyan_0 5.317 0.000 0.000 0.000 0.0000 log_k_JCZ38 0.000 2.272 0.000 0.000 0.0000 log_k_J9Z38 0.000 0.000 1.633 0.000 0.0000 log_k_JSE76 0.000 0.000 0.000 1.271 0.0000 f_cyan_ilr_1 0.000 0.000 0.000 0.000 0.6839 f_cyan_ilr_2 0.000 0.000 0.000 0.000 0.0000 f_JCZ38_qlogis 0.000 0.000 0.000 0.000 0.0000 log_k1 0.000 0.000 0.000 0.000 0.0000 log_k2 0.000 0.000 0.000 0.000 0.0000 g_qlogis 0.000 0.000 0.000 0.000 0.0000 f_cyan_ilr_2 f_JCZ38_qlogis log_k1 log_k2 g_qlogis cyan_0 0.00 0.00 0.0000 0.0000 0.000 log_k_JCZ38 0.00 0.00 0.0000 0.0000 0.000 log_k_J9Z38 0.00 0.00 0.0000 0.0000 0.000 log_k_JSE76 0.00 0.00 0.0000 0.0000 0.000 f_cyan_ilr_1 0.00 0.00 0.0000 0.0000 0.000 f_cyan_ilr_2 11.95 0.00 0.0000 0.0000 0.000 f_JCZ38_qlogis 0.00 16.08 0.0000 0.0000 0.000 log_k1 0.00 0.00 0.9496 0.0000 0.000 log_k2 0.00 0.00 0.0000 0.5846 0.000 g_qlogis 0.00 0.00 0.0000 0.0000 1.719 Starting values for error model parameters: a.1 b.1 1 1 Results: Likelihood computed by importance sampling AIC BIC logLik 2398 2390 -1179 Optimised parameters: est. lower upper cyan_0 100.69709 NA NA log_k_JCZ38 -3.46669 NA NA log_k_J9Z38 -5.05076 NA NA log_k_JSE76 -5.55558 NA NA f_cyan_ilr_1 0.66045 NA NA f_cyan_ilr_2 0.84275 NA NA f_JCZ38_qlogis 64.22404 NA NA log_k1 -2.17715 NA NA log_k2 -4.55002 NA NA g_qlogis -0.55920 NA NA a.1 2.95785 NA NA b.1 0.04456 NA NA SD.log_k_JCZ38 1.39881 NA NA SD.log_k_J9Z38 0.67788 NA NA SD.log_k_JSE76 0.52603 NA NA SD.f_cyan_ilr_1 0.32490 NA NA SD.f_cyan_ilr_2 0.53923 NA NA SD.f_JCZ38_qlogis 2.75576 NA NA SD.log_k2 0.30694 NA NA SD.g_qlogis 0.83619 NA NA Correlation is not available Random effects: est. lower upper SD.log_k_JCZ38 1.3988 NA NA SD.log_k_J9Z38 0.6779 NA NA SD.log_k_JSE76 0.5260 NA NA SD.f_cyan_ilr_1 0.3249 NA NA SD.f_cyan_ilr_2 0.5392 NA NA SD.f_JCZ38_qlogis 2.7558 NA NA SD.log_k2 0.3069 NA NA SD.g_qlogis 0.8362 NA NA Variance model: est. lower upper a.1 2.95785 NA NA b.1 0.04456 NA NA Backtransformed parameters: est. lower upper cyan_0 1.007e+02 NA NA k_JCZ38 3.122e-02 NA NA k_J9Z38 6.404e-03 NA NA k_JSE76 3.866e-03 NA NA f_cyan_to_JCZ38 6.187e-01 NA NA f_cyan_to_J9Z38 2.431e-01 NA NA f_JCZ38_to_JSE76 1.000e+00 NA NA k1 1.134e-01 NA NA k2 1.057e-02 NA NA g 3.637e-01 NA NA Resulting formation fractions: ff cyan_JCZ38 0.6187 cyan_J9Z38 0.2431 cyan_sink 0.1382 JCZ38_JSE76 1.0000 JCZ38_sink 0.0000 Estimated disappearance times: DT50 DT90 DT50back DT50_k1 DT50_k2 cyan 26.35 175.12 52.72 6.114 65.6 JCZ38 22.20 73.75 NA NA NA J9Z38 108.23 359.53 NA NA NA JSE76 179.30 595.62 NA NA NA saemix version used for fitting: 3.2 mkin version used for pre-fitting: 1.2.6 R version used for fitting: 4.3.2 Date of fit: Thu Nov 16 04:29:33 2023 Date of summary: Thu Nov 16 04:59:11 2023 Equations: d_cyan_free/dt = - k_cyan_free * cyan_free - k_cyan_free_bound * cyan_free + k_cyan_bound_free * cyan_bound d_cyan_bound/dt = + k_cyan_free_bound * cyan_free - k_cyan_bound_free * cyan_bound d_JCZ38/dt = + f_cyan_free_to_JCZ38 * k_cyan_free * cyan_free - k_JCZ38 * JCZ38 d_J9Z38/dt = + f_cyan_free_to_J9Z38 * k_cyan_free * cyan_free - k_J9Z38 * J9Z38 d_JSE76/dt = + f_JCZ38_to_JSE76 * k_JCZ38 * JCZ38 - k_JSE76 * JSE76 Data: 433 observations of 4 variable(s) grouped in 5 datasets Model predictions using solution type deSolve Fitted in 532.937 s Using 300, 100 iterations and 10 chains Variance model: Constant variance Starting values for degradation parameters: cyan_free_0 log_k_cyan_free log_k_cyan_free_bound 102.0643 -2.8987 -2.7077 log_k_cyan_bound_free log_k_JCZ38 log_k_J9Z38 -3.4717 -3.4008 -5.0024 log_k_JSE76 f_cyan_ilr_1 f_cyan_ilr_2 -5.8613 0.6855 1.2366 f_JCZ38_qlogis 13.7395 Fixed degradation parameter values: None Starting values for random effects (square root of initial entries in omega): cyan_free_0 log_k_cyan_free log_k_cyan_free_bound cyan_free_0 4.466 0.0000 0.000 log_k_cyan_free 0.000 0.6158 0.000 log_k_cyan_free_bound 0.000 0.0000 1.463 log_k_cyan_bound_free 0.000 0.0000 0.000 log_k_JCZ38 0.000 0.0000 0.000 log_k_J9Z38 0.000 0.0000 0.000 log_k_JSE76 0.000 0.0000 0.000 f_cyan_ilr_1 0.000 0.0000 0.000 f_cyan_ilr_2 0.000 0.0000 0.000 f_JCZ38_qlogis 0.000 0.0000 0.000 log_k_cyan_bound_free log_k_JCZ38 log_k_J9Z38 log_k_JSE76 cyan_free_0 0.000 0.000 0.000 0.000 log_k_cyan_free 0.000 0.000 0.000 0.000 log_k_cyan_free_bound 0.000 0.000 0.000 0.000 log_k_cyan_bound_free 1.058 0.000 0.000 0.000 log_k_JCZ38 0.000 2.382 0.000 0.000 log_k_J9Z38 0.000 0.000 1.595 0.000 log_k_JSE76 0.000 0.000 0.000 1.245 f_cyan_ilr_1 0.000 0.000 0.000 0.000 f_cyan_ilr_2 0.000 0.000 0.000 0.000 f_JCZ38_qlogis 0.000 0.000 0.000 0.000 f_cyan_ilr_1 f_cyan_ilr_2 f_JCZ38_qlogis cyan_free_0 0.0000 0.00 0.00 log_k_cyan_free 0.0000 0.00 0.00 log_k_cyan_free_bound 0.0000 0.00 0.00 log_k_cyan_bound_free 0.0000 0.00 0.00 log_k_JCZ38 0.0000 0.00 0.00 log_k_J9Z38 0.0000 0.00 0.00 log_k_JSE76 0.0000 0.00 0.00 f_cyan_ilr_1 0.6852 0.00 0.00 f_cyan_ilr_2 0.0000 1.28 0.00 f_JCZ38_qlogis 0.0000 0.00 16.13 Starting values for error model parameters: a.1 1 Results: Likelihood computed by importance sampling AIC BIC logLik 2401 2394 -1181 Optimised parameters: est. lower upper cyan_free_0 102.8136 NA NA log_k_cyan_free -2.7935 NA NA log_k_cyan_free_bound -2.5440 NA NA log_k_cyan_bound_free -3.4303 NA NA log_k_JCZ38 -3.5010 NA NA log_k_J9Z38 -5.1226 NA NA log_k_JSE76 -5.6314 NA NA f_cyan_ilr_1 0.6609 NA NA f_cyan_ilr_2 0.5085 NA NA f_JCZ38_qlogis 44.0153 NA NA a.1 3.2318 NA NA SD.log_k_cyan_free 0.3211 NA NA SD.log_k_cyan_free_bound 0.8408 NA NA SD.log_k_cyan_bound_free 0.5724 NA NA SD.log_k_JCZ38 1.4925 NA NA SD.log_k_J9Z38 0.5816 NA NA SD.log_k_JSE76 0.6037 NA NA SD.f_cyan_ilr_1 0.3115 NA NA SD.f_cyan_ilr_2 0.3436 NA NA SD.f_JCZ38_qlogis 4.8937 NA NA Correlation is not available Random effects: est. lower upper SD.log_k_cyan_free 0.3211 NA NA SD.log_k_cyan_free_bound 0.8408 NA NA SD.log_k_cyan_bound_free 0.5724 NA NA SD.log_k_JCZ38 1.4925 NA NA SD.log_k_J9Z38 0.5816 NA NA SD.log_k_JSE76 0.6037 NA NA SD.f_cyan_ilr_1 0.3115 NA NA SD.f_cyan_ilr_2 0.3436 NA NA SD.f_JCZ38_qlogis 4.8937 NA NA Variance model: est. lower upper a.1 3.232 NA NA Backtransformed parameters: est. lower upper cyan_free_0 1.028e+02 NA NA k_cyan_free 6.120e-02 NA NA k_cyan_free_bound 7.855e-02 NA NA k_cyan_bound_free 3.238e-02 NA NA k_JCZ38 3.017e-02 NA NA k_J9Z38 5.961e-03 NA NA k_JSE76 3.584e-03 NA NA f_cyan_free_to_JCZ38 5.784e-01 NA NA f_cyan_free_to_J9Z38 2.271e-01 NA NA f_JCZ38_to_JSE76 1.000e+00 NA NA Estimated Eigenvalues of SFORB model(s): cyan_b1 cyan_b2 cyan_g 0.15973 0.01241 0.33124 Resulting formation fractions: ff cyan_free_JCZ38 0.5784 cyan_free_J9Z38 0.2271 cyan_free_sink 0.1945 cyan_free 1.0000 JCZ38_JSE76 1.0000 JCZ38_sink 0.0000 Estimated disappearance times: DT50 DT90 DT50back DT50_cyan_b1 DT50_cyan_b2 cyan 24.51 153.18 46.11 4.34 55.87 JCZ38 22.98 76.33 NA NA NA J9Z38 116.28 386.29 NA NA NA JSE76 193.42 642.53 NA NA NA saemix version used for fitting: 3.2 mkin version used for pre-fitting: 1.2.6 R version used for fitting: 4.3.2 Date of fit: Thu Nov 16 04:31:58 2023 Date of summary: Thu Nov 16 04:59:11 2023 Equations: d_cyan_free/dt = - k_cyan_free * cyan_free - k_cyan_free_bound * cyan_free + k_cyan_bound_free * cyan_bound d_cyan_bound/dt = + k_cyan_free_bound * cyan_free - k_cyan_bound_free * cyan_bound d_JCZ38/dt = + f_cyan_free_to_JCZ38 * k_cyan_free * cyan_free - k_JCZ38 * JCZ38 d_J9Z38/dt = + f_cyan_free_to_J9Z38 * k_cyan_free * cyan_free - k_J9Z38 * J9Z38 d_JSE76/dt = + f_JCZ38_to_JSE76 * k_JCZ38 * JCZ38 - k_JSE76 * JSE76 Data: 433 observations of 4 variable(s) grouped in 5 datasets Model predictions using solution type deSolve Fitted in 677.936 s Using 300, 100 iterations and 10 chains Variance model: Two-component variance function Starting values for degradation parameters: cyan_free_0 log_k_cyan_free log_k_cyan_free_bound 101.3964 -2.9881 -2.7949 log_k_cyan_bound_free log_k_JCZ38 log_k_J9Z38 -3.4376 -3.3626 -4.9792 log_k_JSE76 f_cyan_ilr_1 f_cyan_ilr_2 -5.8727 0.6814 6.7399 f_JCZ38_qlogis 13.7395 Fixed degradation parameter values: None Starting values for random effects (square root of initial entries in omega): cyan_free_0 log_k_cyan_free log_k_cyan_free_bound cyan_free_0 5.317 0.0000 0.000 log_k_cyan_free 0.000 0.7301 0.000 log_k_cyan_free_bound 0.000 0.0000 1.384 log_k_cyan_bound_free 0.000 0.0000 0.000 log_k_JCZ38 0.000 0.0000 0.000 log_k_J9Z38 0.000 0.0000 0.000 log_k_JSE76 0.000 0.0000 0.000 f_cyan_ilr_1 0.000 0.0000 0.000 f_cyan_ilr_2 0.000 0.0000 0.000 f_JCZ38_qlogis 0.000 0.0000 0.000 log_k_cyan_bound_free log_k_JCZ38 log_k_J9Z38 log_k_JSE76 cyan_free_0 0.000 0.000 0.000 0.000 log_k_cyan_free 0.000 0.000 0.000 0.000 log_k_cyan_free_bound 0.000 0.000 0.000 0.000 log_k_cyan_bound_free 1.109 0.000 0.000 0.000 log_k_JCZ38 0.000 2.272 0.000 0.000 log_k_J9Z38 0.000 0.000 1.633 0.000 log_k_JSE76 0.000 0.000 0.000 1.271 f_cyan_ilr_1 0.000 0.000 0.000 0.000 f_cyan_ilr_2 0.000 0.000 0.000 0.000 f_JCZ38_qlogis 0.000 0.000 0.000 0.000 f_cyan_ilr_1 f_cyan_ilr_2 f_JCZ38_qlogis cyan_free_0 0.0000 0.00 0.00 log_k_cyan_free 0.0000 0.00 0.00 log_k_cyan_free_bound 0.0000 0.00 0.00 log_k_cyan_bound_free 0.0000 0.00 0.00 log_k_JCZ38 0.0000 0.00 0.00 log_k_J9Z38 0.0000 0.00 0.00 log_k_JSE76 0.0000 0.00 0.00 f_cyan_ilr_1 0.6838 0.00 0.00 f_cyan_ilr_2 0.0000 11.69 0.00 f_JCZ38_qlogis 0.0000 0.00 16.13 Starting values for error model parameters: a.1 b.1 1 1 Results: Likelihood computed by importance sampling AIC BIC logLik 2400 2392 -1180 Optimised parameters: est. lower upper cyan_free_0 100.56004 NA NA log_k_cyan_free -3.12657 NA NA log_k_cyan_free_bound -3.16825 NA NA log_k_cyan_bound_free -3.66003 NA NA log_k_JCZ38 -3.47278 NA NA log_k_J9Z38 -5.06823 NA NA log_k_JSE76 -5.54327 NA NA f_cyan_ilr_1 0.66631 NA NA f_cyan_ilr_2 0.82898 NA NA f_JCZ38_qlogis 38.31115 NA NA a.1 2.98352 NA NA b.1 0.04388 NA NA SD.log_k_cyan_free 0.49145 NA NA SD.log_k_cyan_bound_free 0.27347 NA NA SD.log_k_JCZ38 1.41193 NA NA SD.log_k_J9Z38 0.66073 NA NA SD.log_k_JSE76 0.55885 NA NA SD.f_cyan_ilr_1 0.33020 NA NA SD.f_cyan_ilr_2 0.51367 NA NA SD.f_JCZ38_qlogis 5.52122 NA NA Correlation is not available Random effects: est. lower upper SD.log_k_cyan_free 0.4914 NA NA SD.log_k_cyan_bound_free 0.2735 NA NA SD.log_k_JCZ38 1.4119 NA NA SD.log_k_J9Z38 0.6607 NA NA SD.log_k_JSE76 0.5589 NA NA SD.f_cyan_ilr_1 0.3302 NA NA SD.f_cyan_ilr_2 0.5137 NA NA SD.f_JCZ38_qlogis 5.5212 NA NA Variance model: est. lower upper a.1 2.98352 NA NA b.1 0.04388 NA NA Backtransformed parameters: est. lower upper cyan_free_0 1.006e+02 NA NA k_cyan_free 4.387e-02 NA NA k_cyan_free_bound 4.208e-02 NA NA k_cyan_bound_free 2.573e-02 NA NA k_JCZ38 3.103e-02 NA NA k_J9Z38 6.294e-03 NA NA k_JSE76 3.914e-03 NA NA f_cyan_free_to_JCZ38 6.188e-01 NA NA f_cyan_free_to_J9Z38 2.412e-01 NA NA f_JCZ38_to_JSE76 1.000e+00 NA NA Estimated Eigenvalues of SFORB model(s): cyan_b1 cyan_b2 cyan_g 0.10044 0.01124 0.36580 Resulting formation fractions: ff cyan_free_JCZ38 0.6188 cyan_free_J9Z38 0.2412 cyan_free_sink 0.1400 cyan_free 1.0000 JCZ38_JSE76 1.0000 JCZ38_sink 0.0000 Estimated disappearance times: DT50 DT90 DT50back DT50_cyan_b1 DT50_cyan_b2 cyan 26.05 164.4 49.48 6.901 61.67 JCZ38 22.34 74.2 NA NA NA J9Z38 110.14 365.9 NA NA NA JSE76 177.11 588.3 NA NA NA saemix version used for fitting: 3.2 mkin version used for pre-fitting: 1.2.6 R version used for fitting: 4.3.2 Date of fit: Thu Nov 16 04:29:18 2023 Date of summary: Thu Nov 16 04:59:11 2023 Equations: d_cyan/dt = - ifelse(time <= tb, k1, k2) * cyan d_JCZ38/dt = + f_cyan_to_JCZ38 * ifelse(time <= tb, k1, k2) * cyan - k_JCZ38 * JCZ38 d_J9Z38/dt = + f_cyan_to_J9Z38 * ifelse(time <= tb, k1, k2) * cyan - k_J9Z38 * J9Z38 d_JSE76/dt = + f_JCZ38_to_JSE76 * k_JCZ38 * JCZ38 - k_JSE76 * JSE76 Data: 433 observations of 4 variable(s) grouped in 5 datasets Model predictions using solution type deSolve Fitted in 518.128 s Using 300, 100 iterations and 10 chains Variance model: Constant variance Starting values for degradation parameters: cyan_0 log_k_JCZ38 log_k_J9Z38 log_k_JSE76 f_cyan_ilr_1 102.8845 -3.4495 -4.9355 -5.6040 0.6468 f_cyan_ilr_2 f_JCZ38_qlogis log_k1 log_k2 log_tb 1.2396 9.7220 -2.9079 -4.1810 1.7813 Fixed degradation parameter values: None Starting values for random effects (square root of initial entries in omega): cyan_0 log_k_JCZ38 log_k_J9Z38 log_k_JSE76 f_cyan_ilr_1 cyan_0 5.406 0.00 0.00 0.000 0.0000 log_k_JCZ38 0.000 2.33 0.00 0.000 0.0000 log_k_J9Z38 0.000 0.00 1.59 0.000 0.0000 log_k_JSE76 0.000 0.00 0.00 1.013 0.0000 f_cyan_ilr_1 0.000 0.00 0.00 0.000 0.6367 f_cyan_ilr_2 0.000 0.00 0.00 0.000 0.0000 f_JCZ38_qlogis 0.000 0.00 0.00 0.000 0.0000 log_k1 0.000 0.00 0.00 0.000 0.0000 log_k2 0.000 0.00 0.00 0.000 0.0000 log_tb 0.000 0.00 0.00 0.000 0.0000 f_cyan_ilr_2 f_JCZ38_qlogis log_k1 log_k2 log_tb cyan_0 0.000 0.00 0.0000 0.0000 0.0000 log_k_JCZ38 0.000 0.00 0.0000 0.0000 0.0000 log_k_J9Z38 0.000 0.00 0.0000 0.0000 0.0000 log_k_JSE76 0.000 0.00 0.0000 0.0000 0.0000 f_cyan_ilr_1 0.000 0.00 0.0000 0.0000 0.0000 f_cyan_ilr_2 2.038 0.00 0.0000 0.0000 0.0000 f_JCZ38_qlogis 0.000 10.33 0.0000 0.0000 0.0000 log_k1 0.000 0.00 0.7006 0.0000 0.0000 log_k2 0.000 0.00 0.0000 0.8928 0.0000 log_tb 0.000 0.00 0.0000 0.0000 0.6773 Starting values for error model parameters: a.1 1 Results: Likelihood computed by importance sampling AIC BIC logLik 2427 2419 -1194 Optimised parameters: est. lower upper cyan_0 101.9660 1.005e+02 1.035e+02 log_k_JCZ38 -3.4698 -4.716e+00 -2.224e+00 log_k_J9Z38 -5.0947 -5.740e+00 -4.450e+00 log_k_JSE76 -5.5977 -6.321e+00 -4.875e+00 f_cyan_ilr_1 0.6595 3.734e-01 9.456e-01 f_cyan_ilr_2 0.5905 1.664e-01 1.015e+00 f_JCZ38_qlogis 25.8627 -4.224e+05 4.225e+05 log_k1 -3.0884 -3.453e+00 -2.723e+00 log_k2 -4.3877 -4.778e+00 -3.998e+00 log_tb 2.3057 1.715e+00 2.896e+00 a.1 3.3228 NA NA SD.log_k_JCZ38 1.4071 NA NA SD.log_k_J9Z38 0.5774 NA NA SD.log_k_JSE76 0.6214 NA NA SD.f_cyan_ilr_1 0.3058 NA NA SD.f_cyan_ilr_2 0.3470 NA NA SD.f_JCZ38_qlogis 0.0644 NA NA SD.log_k1 0.3994 NA NA SD.log_k2 0.4373 NA NA SD.log_tb 0.6419 NA NA Correlation is not available Random effects: est. lower upper SD.log_k_JCZ38 1.4071 NA NA SD.log_k_J9Z38 0.5774 NA NA SD.log_k_JSE76 0.6214 NA NA SD.f_cyan_ilr_1 0.3058 NA NA SD.f_cyan_ilr_2 0.3470 NA NA SD.f_JCZ38_qlogis 0.0644 NA NA SD.log_k1 0.3994 NA NA SD.log_k2 0.4373 NA NA SD.log_tb 0.6419 NA NA Variance model: est. lower upper a.1 3.323 NA NA Backtransformed parameters: est. lower upper cyan_0 1.020e+02 1.005e+02 1.035e+02 k_JCZ38 3.112e-02 8.951e-03 1.082e-01 k_J9Z38 6.129e-03 3.216e-03 1.168e-02 k_JSE76 3.706e-03 1.798e-03 7.639e-03 f_cyan_to_JCZ38 5.890e-01 NA NA f_cyan_to_J9Z38 2.318e-01 NA NA f_JCZ38_to_JSE76 1.000e+00 0.000e+00 1.000e+00 k1 4.558e-02 3.164e-02 6.565e-02 k2 1.243e-02 8.417e-03 1.835e-02 tb 1.003e+01 5.557e+00 1.811e+01 Resulting formation fractions: ff cyan_JCZ38 5.890e-01 cyan_J9Z38 2.318e-01 cyan_sink 1.793e-01 JCZ38_JSE76 1.000e+00 JCZ38_sink 5.861e-12 Estimated disappearance times: DT50 DT90 DT50back DT50_k1 DT50_k2 cyan 29.02 158.51 47.72 15.21 55.77 JCZ38 22.27 73.98 NA NA NA J9Z38 113.09 375.69 NA NA NA JSE76 187.01 621.23 NA NA NA"},{"path":"https://pkgdown.jrwb.de/mkin/articles/prebuilt/2022_cyan_pathway.html","id":"pathway-2","dir":"Articles > Prebuilt","previous_headings":"Appendix > Hierarchical fit listings","what":"Pathway 2","title":"Testing hierarchical pathway kinetics with residue data on cyantraniliprole","text":"Hierarchical FOMC path 2 fit two-component error Hierarchical DFOP path 2 fit constant variance Hierarchical DFOP path 2 fit two-component error Hierarchical SFORB path 2 fit constant variance Hierarchical SFORB path 2 fit two-component error","code":"saemix version used for fitting: 3.2 mkin version used for pre-fitting: 1.2.6 R version used for fitting: 4.3.2 Date of fit: Thu Nov 16 04:40:28 2023 Date of summary: Thu Nov 16 04:59:11 2023 Equations: d_cyan/dt = - (alpha/beta) * 1/((time/beta) + 1) * cyan d_JCZ38/dt = + f_cyan_to_JCZ38 * (alpha/beta) * 1/((time/beta) + 1) * cyan - k_JCZ38 * JCZ38 + f_JSE76_to_JCZ38 * k_JSE76 * JSE76 d_J9Z38/dt = + f_cyan_to_J9Z38 * (alpha/beta) * 1/((time/beta) + 1) * cyan - k_J9Z38 * J9Z38 d_JSE76/dt = + f_JCZ38_to_JSE76 * k_JCZ38 * JCZ38 - k_JSE76 * JSE76 Data: 433 observations of 4 variable(s) grouped in 5 datasets Model predictions using solution type deSolve Fitted in 499.317 s Using 300, 100 iterations and 10 chains Variance model: Two-component variance function Starting values for degradation parameters: cyan_0 log_k_JCZ38 log_k_J9Z38 log_k_JSE76 f_cyan_ilr_1 102.4477 -1.8631 -5.1087 -2.5114 0.6826 f_cyan_ilr_2 f_JCZ38_qlogis f_JSE76_qlogis log_alpha log_beta 4.7944 15.9616 13.1566 -0.1564 2.9781 Fixed degradation parameter values: None Starting values for random effects (square root of initial entries in omega): cyan_0 log_k_JCZ38 log_k_J9Z38 log_k_JSE76 f_cyan_ilr_1 cyan_0 7.701 0.000 0.000 0.000 0.0000 log_k_JCZ38 0.000 1.448 0.000 0.000 0.0000 log_k_J9Z38 0.000 0.000 1.724 0.000 0.0000 log_k_JSE76 0.000 0.000 0.000 3.659 0.0000 f_cyan_ilr_1 0.000 0.000 0.000 0.000 0.6356 f_cyan_ilr_2 0.000 0.000 0.000 0.000 0.0000 f_JCZ38_qlogis 0.000 0.000 0.000 0.000 0.0000 f_JSE76_qlogis 0.000 0.000 0.000 0.000 0.0000 log_alpha 0.000 0.000 0.000 0.000 0.0000 log_beta 0.000 0.000 0.000 0.000 0.0000 f_cyan_ilr_2 f_JCZ38_qlogis f_JSE76_qlogis log_alpha log_beta cyan_0 0.00 0.00 0.00 0.0000 0.0000 log_k_JCZ38 0.00 0.00 0.00 0.0000 0.0000 log_k_J9Z38 0.00 0.00 0.00 0.0000 0.0000 log_k_JSE76 0.00 0.00 0.00 0.0000 0.0000 f_cyan_ilr_1 0.00 0.00 0.00 0.0000 0.0000 f_cyan_ilr_2 10.32 0.00 0.00 0.0000 0.0000 f_JCZ38_qlogis 0.00 12.23 0.00 0.0000 0.0000 f_JSE76_qlogis 0.00 0.00 14.99 0.0000 0.0000 log_alpha 0.00 0.00 0.00 0.3924 0.0000 log_beta 0.00 0.00 0.00 0.0000 0.5639 Starting values for error model parameters: a.1 b.1 1 1 Results: Likelihood computed by importance sampling AIC BIC logLik 2249 2241 -1104 Optimised parameters: est. lower upper cyan_0 101.55265 9.920e+01 103.90593 log_k_JCZ38 -2.32302 -2.832e+00 -1.81416 log_k_J9Z38 -5.13082 -5.942e+00 -4.31990 log_k_JSE76 -3.01756 -4.262e+00 -1.77360 f_cyan_ilr_1 0.70850 3.657e-01 1.05135 f_cyan_ilr_2 0.95775 2.612e-01 1.65432 f_JCZ38_qlogis 3.86105 9.248e-01 6.79733 f_JSE76_qlogis 7.51583 -1.120e+02 127.03921 log_alpha -0.15308 -4.508e-01 0.14462 log_beta 2.99165 2.711e+00 3.27202 a.1 2.04034 1.811e+00 2.26968 b.1 0.06924 5.745e-02 0.08104 SD.log_k_JCZ38 0.50818 1.390e-01 0.87736 SD.log_k_J9Z38 0.86597 2.652e-01 1.46671 SD.log_k_JSE76 1.38092 4.864e-01 2.27541 SD.f_cyan_ilr_1 0.38204 1.354e-01 0.62864 SD.f_cyan_ilr_2 0.55129 7.198e-02 1.03060 SD.f_JCZ38_qlogis 1.88457 1.710e-02 3.75205 SD.f_JSE76_qlogis 2.64018 -2.450e+03 2455.27887 SD.log_alpha 0.31860 1.047e-01 0.53249 SD.log_beta 0.24195 1.273e-02 0.47117 Correlation: cyan_0 l__JCZ3 l__J9Z3 l__JSE7 f_cy__1 f_cy__2 f_JCZ38 f_JSE76 log_k_JCZ38 -0.0235 log_k_J9Z38 -0.0442 0.0047 log_k_JSE76 -0.0023 0.0966 0.0006 f_cyan_ilr_1 -0.0032 0.0070 -0.0536 -0.0001 f_cyan_ilr_2 -0.5189 0.0452 0.1152 0.0013 -0.0304 f_JCZ38_qlogis 0.1088 -0.0848 -0.0240 0.0040 -0.0384 -0.2303 f_JSE76_qlogis -0.0545 0.1315 0.0195 0.0020 0.0252 0.1737 -0.5939 log_alpha -0.0445 0.0056 0.0261 0.0019 -0.0055 0.0586 -0.0239 -0.0284 log_beta -0.2388 0.0163 0.0566 0.0040 -0.0078 0.2183 -0.0714 -0.0332 log_lph log_k_JCZ38 log_k_J9Z38 log_k_JSE76 f_cyan_ilr_1 f_cyan_ilr_2 f_JCZ38_qlogis f_JSE76_qlogis log_alpha log_beta 0.2135 Random effects: est. lower upper SD.log_k_JCZ38 0.5082 1.390e-01 0.8774 SD.log_k_J9Z38 0.8660 2.652e-01 1.4667 SD.log_k_JSE76 1.3809 4.864e-01 2.2754 SD.f_cyan_ilr_1 0.3820 1.354e-01 0.6286 SD.f_cyan_ilr_2 0.5513 7.198e-02 1.0306 SD.f_JCZ38_qlogis 1.8846 1.710e-02 3.7520 SD.f_JSE76_qlogis 2.6402 -2.450e+03 2455.2789 SD.log_alpha 0.3186 1.047e-01 0.5325 SD.log_beta 0.2420 1.273e-02 0.4712 Variance model: est. lower upper a.1 2.04034 1.81101 2.26968 b.1 0.06924 0.05745 0.08104 Backtransformed parameters: est. lower upper cyan_0 1.016e+02 9.920e+01 103.9059 k_JCZ38 9.798e-02 5.890e-02 0.1630 k_J9Z38 5.912e-03 2.627e-03 0.0133 k_JSE76 4.892e-02 1.410e-02 0.1697 f_cyan_to_JCZ38 6.432e-01 NA NA f_cyan_to_J9Z38 2.362e-01 NA NA f_JCZ38_to_JSE76 9.794e-01 7.160e-01 0.9989 f_JSE76_to_JCZ38 9.995e-01 2.268e-49 1.0000 alpha 8.581e-01 6.371e-01 1.1556 beta 1.992e+01 1.505e+01 26.3646 Resulting formation fractions: ff cyan_JCZ38 0.6432301 cyan_J9Z38 0.2361657 cyan_sink 0.1206042 JCZ38_JSE76 0.9793879 JCZ38_sink 0.0206121 JSE76_JCZ38 0.9994559 JSE76_sink 0.0005441 Estimated disappearance times: DT50 DT90 DT50back cyan 24.759 271.61 81.76 JCZ38 7.075 23.50 NA J9Z38 117.249 389.49 NA JSE76 14.169 47.07 NA saemix version used for fitting: 3.2 mkin version used for pre-fitting: 1.2.6 R version used for fitting: 4.3.2 Date of fit: Thu Nov 16 04:41:25 2023 Date of summary: Thu Nov 16 04:59:11 2023 Equations: d_cyan/dt = - ((k1 * g * exp(-k1 * time) + k2 * (1 - g) * exp(-k2 * time)) / (g * exp(-k1 * time) + (1 - g) * exp(-k2 * time))) * cyan d_JCZ38/dt = + f_cyan_to_JCZ38 * ((k1 * g * exp(-k1 * time) + k2 * (1 - g) * exp(-k2 * time)) / (g * exp(-k1 * time) + (1 - g) * exp(-k2 * time))) * cyan - k_JCZ38 * JCZ38 + f_JSE76_to_JCZ38 * k_JSE76 * JSE76 d_J9Z38/dt = + f_cyan_to_J9Z38 * ((k1 * g * exp(-k1 * time) + k2 * (1 - g) * exp(-k2 * time)) / (g * exp(-k1 * time) + (1 - g) * exp(-k2 * time))) * cyan - k_J9Z38 * J9Z38 d_JSE76/dt = + f_JCZ38_to_JSE76 * k_JCZ38 * JCZ38 - k_JSE76 * JSE76 Data: 433 observations of 4 variable(s) grouped in 5 datasets Model predictions using solution type deSolve Fitted in 555.724 s Using 300, 100 iterations and 10 chains Variance model: Constant variance Starting values for degradation parameters: cyan_0 log_k_JCZ38 log_k_J9Z38 log_k_JSE76 f_cyan_ilr_1 102.4380 -2.3107 -5.3123 -3.7120 0.6757 f_cyan_ilr_2 f_JCZ38_qlogis f_JSE76_qlogis log_k1 log_k2 1.1439 13.1194 12.3492 -1.9317 -4.4557 g_qlogis -0.5644 Fixed degradation parameter values: None Starting values for random effects (square root of initial entries in omega): cyan_0 log_k_JCZ38 log_k_J9Z38 log_k_JSE76 f_cyan_ilr_1 cyan_0 4.591 0.0000 0.000 0.0 0.0000 log_k_JCZ38 0.000 0.7966 0.000 0.0 0.0000 log_k_J9Z38 0.000 0.0000 1.561 0.0 0.0000 log_k_JSE76 0.000 0.0000 0.000 0.8 0.0000 f_cyan_ilr_1 0.000 0.0000 0.000 0.0 0.6349 f_cyan_ilr_2 0.000 0.0000 0.000 0.0 0.0000 f_JCZ38_qlogis 0.000 0.0000 0.000 0.0 0.0000 f_JSE76_qlogis 0.000 0.0000 0.000 0.0 0.0000 log_k1 0.000 0.0000 0.000 0.0 0.0000 log_k2 0.000 0.0000 0.000 0.0 0.0000 g_qlogis 0.000 0.0000 0.000 0.0 0.0000 f_cyan_ilr_2 f_JCZ38_qlogis f_JSE76_qlogis log_k1 log_k2 cyan_0 0.000 0.00 0.00 0.000 0.0000 log_k_JCZ38 0.000 0.00 0.00 0.000 0.0000 log_k_J9Z38 0.000 0.00 0.00 0.000 0.0000 log_k_JSE76 0.000 0.00 0.00 0.000 0.0000 f_cyan_ilr_1 0.000 0.00 0.00 0.000 0.0000 f_cyan_ilr_2 1.797 0.00 0.00 0.000 0.0000 f_JCZ38_qlogis 0.000 13.86 0.00 0.000 0.0000 f_JSE76_qlogis 0.000 0.00 13.91 0.000 0.0000 log_k1 0.000 0.00 0.00 1.106 0.0000 log_k2 0.000 0.00 0.00 0.000 0.6141 g_qlogis 0.000 0.00 0.00 0.000 0.0000 g_qlogis cyan_0 0.000 log_k_JCZ38 0.000 log_k_J9Z38 0.000 log_k_JSE76 0.000 f_cyan_ilr_1 0.000 f_cyan_ilr_2 0.000 f_JCZ38_qlogis 0.000 f_JSE76_qlogis 0.000 log_k1 0.000 log_k2 0.000 g_qlogis 1.595 Starting values for error model parameters: a.1 1 Results: Likelihood computed by importance sampling AIC BIC logLik 2288 2280 -1122 Optimised parameters: est. lower upper cyan_0 102.7204 1.014e+02 1.040e+02 log_k_JCZ38 -2.8925 -4.044e+00 -1.741e+00 log_k_J9Z38 -5.1430 -5.828e+00 -4.457e+00 log_k_JSE76 -3.5577 -4.174e+00 -2.941e+00 f_cyan_ilr_1 0.6929 3.788e-01 1.007e+00 f_cyan_ilr_2 0.6066 5.342e-02 1.160e+00 f_JCZ38_qlogis 9.8071 -2.819e+03 2.838e+03 f_JSE76_qlogis 2.2229 5.684e-01 3.877e+00 log_k1 -1.9339 -2.609e+00 -1.258e+00 log_k2 -4.4709 -4.935e+00 -4.007e+00 g_qlogis -0.4987 -1.373e+00 3.757e-01 a.1 2.7368 2.545e+00 2.928e+00 SD.log_k_JCZ38 1.2747 4.577e-01 2.092e+00 SD.log_k_J9Z38 0.6758 1.418e-01 1.210e+00 SD.log_k_JSE76 0.5869 1.169e-01 1.057e+00 SD.f_cyan_ilr_1 0.3392 1.161e-01 5.622e-01 SD.f_cyan_ilr_2 0.4200 8.501e-02 7.550e-01 SD.f_JCZ38_qlogis 0.8511 -1.137e+06 1.137e+06 SD.f_JSE76_qlogis 0.3767 -5.238e-01 1.277e+00 SD.log_k1 0.7475 2.601e-01 1.235e+00 SD.log_k2 0.5179 1.837e-01 8.521e-01 SD.g_qlogis 0.9817 3.553e-01 1.608e+00 Correlation: cyan_0 l__JCZ3 l__J9Z3 l__JSE7 f_cy__1 f_cy__2 f_JCZ38 f_JSE76 log_k_JCZ38 -0.0351 log_k_J9Z38 -0.0541 0.0043 log_k_JSE76 -0.0078 0.0900 -0.0014 f_cyan_ilr_1 -0.0249 0.0268 -0.0962 0.0000 f_cyan_ilr_2 -0.3560 0.0848 0.1545 -0.0022 0.0463 f_JCZ38_qlogis 0.2005 -0.1226 -0.0347 0.0514 -0.1840 -0.5906 f_JSE76_qlogis -0.1638 0.1307 0.0266 0.0001 0.1645 0.5181 -0.9297 log_k1 0.0881 -0.0071 0.0005 -0.0070 -0.0064 -0.0346 0.0316 -0.0341 log_k2 0.0238 -0.0003 0.0082 -0.0022 -0.0017 -0.0017 -0.0002 -0.0076 g_qlogis 0.0198 -0.0002 -0.0109 0.0034 0.0017 -0.0176 0.0044 0.0051 log_k1 log_k2 log_k_JCZ38 log_k_J9Z38 log_k_JSE76 f_cyan_ilr_1 f_cyan_ilr_2 f_JCZ38_qlogis f_JSE76_qlogis log_k1 log_k2 0.0276 g_qlogis -0.0283 -0.0309 Random effects: est. lower upper SD.log_k_JCZ38 1.2747 4.577e-01 2.092e+00 SD.log_k_J9Z38 0.6758 1.418e-01 1.210e+00 SD.log_k_JSE76 0.5869 1.169e-01 1.057e+00 SD.f_cyan_ilr_1 0.3392 1.161e-01 5.622e-01 SD.f_cyan_ilr_2 0.4200 8.501e-02 7.550e-01 SD.f_JCZ38_qlogis 0.8511 -1.137e+06 1.137e+06 SD.f_JSE76_qlogis 0.3767 -5.238e-01 1.277e+00 SD.log_k1 0.7475 2.601e-01 1.235e+00 SD.log_k2 0.5179 1.837e-01 8.521e-01 SD.g_qlogis 0.9817 3.553e-01 1.608e+00 Variance model: est. lower upper a.1 2.737 2.545 2.928 Backtransformed parameters: est. lower upper cyan_0 102.72037 1.014e+02 104.00464 k_JCZ38 0.05544 1.752e-02 0.17539 k_J9Z38 0.00584 2.942e-03 0.01159 k_JSE76 0.02850 1.539e-02 0.05279 f_cyan_to_JCZ38 0.59995 NA NA f_cyan_to_J9Z38 0.22519 NA NA f_JCZ38_to_JSE76 0.99994 0.000e+00 1.00000 f_JSE76_to_JCZ38 0.90229 6.384e-01 0.97971 k1 0.14459 7.357e-02 0.28414 k2 0.01144 7.192e-03 0.01819 g 0.37784 2.021e-01 0.59284 Resulting formation fractions: ff cyan_JCZ38 5.999e-01 cyan_J9Z38 2.252e-01 cyan_sink 1.749e-01 JCZ38_JSE76 9.999e-01 JCZ38_sink 5.506e-05 JSE76_JCZ38 9.023e-01 JSE76_sink 9.771e-02 Estimated disappearance times: DT50 DT90 DT50back DT50_k1 DT50_k2 cyan 21.93 159.83 48.11 4.794 60.6 JCZ38 12.50 41.53 NA NA NA J9Z38 118.69 394.27 NA NA NA JSE76 24.32 80.78 NA NA NA saemix version used for fitting: 3.2 mkin version used for pre-fitting: 1.2.6 R version used for fitting: 4.3.2 Date of fit: Thu Nov 16 04:44:08 2023 Date of summary: Thu Nov 16 04:59:11 2023 Equations: d_cyan/dt = - ((k1 * g * exp(-k1 * time) + k2 * (1 - g) * exp(-k2 * time)) / (g * exp(-k1 * time) + (1 - g) * exp(-k2 * time))) * cyan d_JCZ38/dt = + f_cyan_to_JCZ38 * ((k1 * g * exp(-k1 * time) + k2 * (1 - g) * exp(-k2 * time)) / (g * exp(-k1 * time) + (1 - g) * exp(-k2 * time))) * cyan - k_JCZ38 * JCZ38 + f_JSE76_to_JCZ38 * k_JSE76 * JSE76 d_J9Z38/dt = + f_cyan_to_J9Z38 * ((k1 * g * exp(-k1 * time) + k2 * (1 - g) * exp(-k2 * time)) / (g * exp(-k1 * time) + (1 - g) * exp(-k2 * time))) * cyan - k_J9Z38 * J9Z38 d_JSE76/dt = + f_JCZ38_to_JSE76 * k_JCZ38 * JCZ38 - k_JSE76 * JSE76 Data: 433 observations of 4 variable(s) grouped in 5 datasets Model predictions using solution type deSolve Fitted in 718.988 s Using 300, 100 iterations and 10 chains Variance model: Two-component variance function Starting values for degradation parameters: cyan_0 log_k_JCZ38 log_k_J9Z38 log_k_JSE76 f_cyan_ilr_1 101.7393 -1.4493 -5.0118 -2.1269 0.6720 f_cyan_ilr_2 f_JCZ38_qlogis f_JSE76_qlogis log_k1 log_k2 7.3362 13.4423 13.2659 -2.0061 -4.5527 g_qlogis -0.5806 Fixed degradation parameter values: None Starting values for random effects (square root of initial entries in omega): cyan_0 log_k_JCZ38 log_k_J9Z38 log_k_JSE76 f_cyan_ilr_1 cyan_0 5.604 0.00 0.000 0.000 0.0000 log_k_JCZ38 0.000 2.77 0.000 0.000 0.0000 log_k_J9Z38 0.000 0.00 1.662 0.000 0.0000 log_k_JSE76 0.000 0.00 0.000 5.021 0.0000 f_cyan_ilr_1 0.000 0.00 0.000 0.000 0.6519 f_cyan_ilr_2 0.000 0.00 0.000 0.000 0.0000 f_JCZ38_qlogis 0.000 0.00 0.000 0.000 0.0000 f_JSE76_qlogis 0.000 0.00 0.000 0.000 0.0000 log_k1 0.000 0.00 0.000 0.000 0.0000 log_k2 0.000 0.00 0.000 0.000 0.0000 g_qlogis 0.000 0.00 0.000 0.000 0.0000 f_cyan_ilr_2 f_JCZ38_qlogis f_JSE76_qlogis log_k1 log_k2 cyan_0 0.00 0.00 0.00 0.0000 0.0000 log_k_JCZ38 0.00 0.00 0.00 0.0000 0.0000 log_k_J9Z38 0.00 0.00 0.00 0.0000 0.0000 log_k_JSE76 0.00 0.00 0.00 0.0000 0.0000 f_cyan_ilr_1 0.00 0.00 0.00 0.0000 0.0000 f_cyan_ilr_2 13.37 0.00 0.00 0.0000 0.0000 f_JCZ38_qlogis 0.00 14.21 0.00 0.0000 0.0000 f_JSE76_qlogis 0.00 0.00 14.58 0.0000 0.0000 log_k1 0.00 0.00 0.00 0.8453 0.0000 log_k2 0.00 0.00 0.00 0.0000 0.5969 g_qlogis 0.00 0.00 0.00 0.0000 0.0000 g_qlogis cyan_0 0.00 log_k_JCZ38 0.00 log_k_J9Z38 0.00 log_k_JSE76 0.00 f_cyan_ilr_1 0.00 f_cyan_ilr_2 0.00 f_JCZ38_qlogis 0.00 f_JSE76_qlogis 0.00 log_k1 0.00 log_k2 0.00 g_qlogis 1.69 Starting values for error model parameters: a.1 b.1 1 1 Results: Likelihood computed by importance sampling AIC BIC logLik 2234 2226 -1095 Optimised parameters: est. lower upper cyan_0 101.25496 99.14662 103.36331 log_k_JCZ38 -2.55593 -3.32972 -1.78215 log_k_J9Z38 -5.07103 -5.85423 -4.28783 log_k_JSE76 -3.25468 -4.17577 -2.33360 f_cyan_ilr_1 0.70139 0.35924 1.04355 f_cyan_ilr_2 1.07712 0.17789 1.97636 f_JCZ38_qlogis 3.57483 0.05990 7.08976 f_JSE76_qlogis 4.54884 -7.25628 16.35395 log_k1 -2.38201 -2.51639 -2.24763 log_k2 -4.66741 -4.91865 -4.41617 g_qlogis -0.28446 -1.14192 0.57300 a.1 2.05925 1.83267 2.28582 b.1 0.06172 0.05076 0.07268 SD.log_k_JCZ38 0.81137 0.25296 1.36977 SD.log_k_J9Z38 0.83542 0.25396 1.41689 SD.log_k_JSE76 0.97903 0.30100 1.65707 SD.f_cyan_ilr_1 0.37878 0.13374 0.62382 SD.f_cyan_ilr_2 0.67274 0.10102 1.24446 SD.f_JCZ38_qlogis 1.35327 -0.42361 3.13015 SD.f_JSE76_qlogis 1.43956 -19.15140 22.03052 SD.log_k2 0.25329 0.07521 0.43138 SD.g_qlogis 0.95167 0.35149 1.55184 Correlation: cyan_0 l__JCZ3 l__J9Z3 l__JSE7 f_cy__1 f_cy__2 f_JCZ38 f_JSE76 log_k_JCZ38 -0.0265 log_k_J9Z38 -0.0392 0.0024 log_k_JSE76 0.0011 0.1220 -0.0016 f_cyan_ilr_1 -0.0161 0.0217 -0.0552 0.0034 f_cyan_ilr_2 -0.4718 0.0829 0.1102 0.0042 0.0095 f_JCZ38_qlogis 0.1609 -0.1318 -0.0277 0.0081 -0.1040 -0.4559 f_JSE76_qlogis -0.1289 0.1494 0.0219 0.0012 0.1004 0.4309 -0.8543 log_k1 0.2618 -0.0739 -0.0167 -0.0148 -0.0444 -0.2768 0.3518 -0.3818 log_k2 0.0603 -0.0217 0.0174 -0.0058 -0.0197 -0.0533 0.0923 -0.1281 g_qlogis 0.0362 0.0115 -0.0111 0.0040 0.0095 -0.0116 -0.0439 0.0651 log_k1 log_k2 log_k_JCZ38 log_k_J9Z38 log_k_JSE76 f_cyan_ilr_1 f_cyan_ilr_2 f_JCZ38_qlogis f_JSE76_qlogis log_k1 log_k2 0.3269 g_qlogis -0.1656 -0.0928 Random effects: est. lower upper SD.log_k_JCZ38 0.8114 0.25296 1.3698 SD.log_k_J9Z38 0.8354 0.25396 1.4169 SD.log_k_JSE76 0.9790 0.30100 1.6571 SD.f_cyan_ilr_1 0.3788 0.13374 0.6238 SD.f_cyan_ilr_2 0.6727 0.10102 1.2445 SD.f_JCZ38_qlogis 1.3533 -0.42361 3.1301 SD.f_JSE76_qlogis 1.4396 -19.15140 22.0305 SD.log_k2 0.2533 0.07521 0.4314 SD.g_qlogis 0.9517 0.35149 1.5518 Variance model: est. lower upper a.1 2.05925 1.83267 2.28582 b.1 0.06172 0.05076 0.07268 Backtransformed parameters: est. lower upper cyan_0 1.013e+02 9.915e+01 103.36331 k_JCZ38 7.762e-02 3.580e-02 0.16828 k_J9Z38 6.276e-03 2.868e-03 0.01373 k_JSE76 3.859e-02 1.536e-02 0.09695 f_cyan_to_JCZ38 6.520e-01 NA NA f_cyan_to_J9Z38 2.418e-01 NA NA f_JCZ38_to_JSE76 9.727e-01 5.150e-01 0.99917 f_JSE76_to_JCZ38 9.895e-01 7.052e-04 1.00000 k1 9.236e-02 8.075e-02 0.10565 k2 9.397e-03 7.309e-03 0.01208 g 4.294e-01 2.420e-01 0.63945 Resulting formation fractions: ff cyan_JCZ38 0.65203 cyan_J9Z38 0.24181 cyan_sink 0.10616 JCZ38_JSE76 0.97274 JCZ38_sink 0.02726 JSE76_JCZ38 0.98953 JSE76_sink 0.01047 Estimated disappearance times: DT50 DT90 DT50back DT50_k1 DT50_k2 cyan 24.26 185.34 55.79 7.504 73.77 JCZ38 8.93 29.66 NA NA NA J9Z38 110.45 366.89 NA NA NA JSE76 17.96 59.66 NA NA NA saemix version used for fitting: 3.2 mkin version used for pre-fitting: 1.2.6 R version used for fitting: 4.3.2 Date of fit: Thu Nov 16 04:41:22 2023 Date of summary: Thu Nov 16 04:59:11 2023 Equations: d_cyan_free/dt = - k_cyan_free * cyan_free - k_cyan_free_bound * cyan_free + k_cyan_bound_free * cyan_bound d_cyan_bound/dt = + k_cyan_free_bound * cyan_free - k_cyan_bound_free * cyan_bound d_JCZ38/dt = + f_cyan_free_to_JCZ38 * k_cyan_free * cyan_free - k_JCZ38 * JCZ38 + f_JSE76_to_JCZ38 * k_JSE76 * JSE76 d_J9Z38/dt = + f_cyan_free_to_J9Z38 * k_cyan_free * cyan_free - k_J9Z38 * J9Z38 d_JSE76/dt = + f_JCZ38_to_JSE76 * k_JCZ38 * JCZ38 - k_JSE76 * JSE76 Data: 433 observations of 4 variable(s) grouped in 5 datasets Model predictions using solution type deSolve Fitted in 553.276 s Using 300, 100 iterations and 10 chains Variance model: Constant variance Starting values for degradation parameters: cyan_free_0 log_k_cyan_free log_k_cyan_free_bound 102.4395 -2.7673 -2.8942 log_k_cyan_bound_free log_k_JCZ38 log_k_J9Z38 -3.6201 -2.3107 -5.3123 log_k_JSE76 f_cyan_ilr_1 f_cyan_ilr_2 -3.7120 0.6754 1.1448 f_JCZ38_qlogis f_JSE76_qlogis 14.8408 15.4734 Fixed degradation parameter values: None Starting values for random effects (square root of initial entries in omega): cyan_free_0 log_k_cyan_free log_k_cyan_free_bound cyan_free_0 4.589 0.0000 0.00 log_k_cyan_free 0.000 0.4849 0.00 log_k_cyan_free_bound 0.000 0.0000 1.62 log_k_cyan_bound_free 0.000 0.0000 0.00 log_k_JCZ38 0.000 0.0000 0.00 log_k_J9Z38 0.000 0.0000 0.00 log_k_JSE76 0.000 0.0000 0.00 f_cyan_ilr_1 0.000 0.0000 0.00 f_cyan_ilr_2 0.000 0.0000 0.00 f_JCZ38_qlogis 0.000 0.0000 0.00 f_JSE76_qlogis 0.000 0.0000 0.00 log_k_cyan_bound_free log_k_JCZ38 log_k_J9Z38 log_k_JSE76 cyan_free_0 0.000 0.0000 0.000 0.0 log_k_cyan_free 0.000 0.0000 0.000 0.0 log_k_cyan_free_bound 0.000 0.0000 0.000 0.0 log_k_cyan_bound_free 1.197 0.0000 0.000 0.0 log_k_JCZ38 0.000 0.7966 0.000 0.0 log_k_J9Z38 0.000 0.0000 1.561 0.0 log_k_JSE76 0.000 0.0000 0.000 0.8 f_cyan_ilr_1 0.000 0.0000 0.000 0.0 f_cyan_ilr_2 0.000 0.0000 0.000 0.0 f_JCZ38_qlogis 0.000 0.0000 0.000 0.0 f_JSE76_qlogis 0.000 0.0000 0.000 0.0 f_cyan_ilr_1 f_cyan_ilr_2 f_JCZ38_qlogis f_JSE76_qlogis cyan_free_0 0.0000 0.000 0.0 0.00 log_k_cyan_free 0.0000 0.000 0.0 0.00 log_k_cyan_free_bound 0.0000 0.000 0.0 0.00 log_k_cyan_bound_free 0.0000 0.000 0.0 0.00 log_k_JCZ38 0.0000 0.000 0.0 0.00 log_k_J9Z38 0.0000 0.000 0.0 0.00 log_k_JSE76 0.0000 0.000 0.0 0.00 f_cyan_ilr_1 0.6349 0.000 0.0 0.00 f_cyan_ilr_2 0.0000 1.797 0.0 0.00 f_JCZ38_qlogis 0.0000 0.000 15.6 0.00 f_JSE76_qlogis 0.0000 0.000 0.0 17.52 Starting values for error model parameters: a.1 1 Results: Likelihood computed by importance sampling AIC BIC logLik 2283 2275 -1120 Optimised parameters: est. lower upper cyan_free_0 102.6517 101.40815 103.8952 log_k_cyan_free -2.8729 -3.18649 -2.5593 log_k_cyan_free_bound -2.7803 -3.60525 -1.9552 log_k_cyan_bound_free -3.5845 -4.16644 -3.0026 log_k_JCZ38 -2.3411 -2.89698 -1.7852 log_k_J9Z38 -5.2487 -6.01271 -4.4847 log_k_JSE76 -3.0259 -4.28274 -1.7690 f_cyan_ilr_1 0.7289 0.38214 1.0756 f_cyan_ilr_2 0.6891 0.18277 1.1954 f_JCZ38_qlogis 4.2162 0.47015 7.9622 f_JSE76_qlogis 5.8911 -20.19088 31.9730 a.1 2.7159 2.52587 2.9060 SD.log_k_cyan_free 0.3354 0.10979 0.5610 SD.log_k_cyan_free_bound 0.9061 0.30969 1.5025 SD.log_k_cyan_bound_free 0.6376 0.21229 1.0628 SD.log_k_JCZ38 0.5499 0.14533 0.9545 SD.log_k_J9Z38 0.7457 0.15106 1.3404 SD.log_k_JSE76 1.3822 0.47329 2.2912 SD.f_cyan_ilr_1 0.3820 0.13280 0.6313 SD.f_cyan_ilr_2 0.4317 0.06803 0.7953 SD.f_JCZ38_qlogis 1.8258 -0.25423 3.9059 SD.f_JSE76_qlogis 2.2348 -83.33679 87.8065 Correlation: cyn_f_0 lg_k_c_ lg_k_cyn_f_ lg_k_cyn_b_ l__JCZ3 l__J9Z3 log_k_cyan_free 0.1944 log_k_cyan_free_bound 0.0815 0.0814 log_k_cyan_bound_free 0.0106 0.0426 0.0585 log_k_JCZ38 -0.0231 -0.0106 -0.0089 -0.0051 log_k_J9Z38 -0.0457 -0.0108 0.0019 0.0129 0.0032 log_k_JSE76 -0.0054 -0.0024 -0.0017 -0.0005 0.1108 0.0009 f_cyan_ilr_1 0.0051 -0.0005 -0.0035 -0.0056 0.0131 -0.0967 f_cyan_ilr_2 -0.3182 -0.0771 -0.0309 -0.0038 0.0680 0.1643 f_JCZ38_qlogis 0.0834 0.0369 0.0302 0.0172 -0.1145 -0.0204 f_JSE76_qlogis -0.0553 -0.0365 -0.0441 -0.0414 0.1579 0.0175 l__JSE7 f_cy__1 f_cy__2 f_JCZ38 log_k_cyan_free log_k_cyan_free_bound log_k_cyan_bound_free log_k_JCZ38 log_k_J9Z38 log_k_JSE76 f_cyan_ilr_1 -0.0002 f_cyan_ilr_2 0.0020 -0.0415 f_JCZ38_qlogis 0.0052 -0.0665 -0.3437 f_JSE76_qlogis 0.0066 0.0635 0.3491 -0.7487 Random effects: est. lower upper SD.log_k_cyan_free 0.3354 0.10979 0.5610 SD.log_k_cyan_free_bound 0.9061 0.30969 1.5025 SD.log_k_cyan_bound_free 0.6376 0.21229 1.0628 SD.log_k_JCZ38 0.5499 0.14533 0.9545 SD.log_k_J9Z38 0.7457 0.15106 1.3404 SD.log_k_JSE76 1.3822 0.47329 2.2912 SD.f_cyan_ilr_1 0.3820 0.13280 0.6313 SD.f_cyan_ilr_2 0.4317 0.06803 0.7953 SD.f_JCZ38_qlogis 1.8258 -0.25423 3.9059 SD.f_JSE76_qlogis 2.2348 -83.33679 87.8065 Variance model: est. lower upper a.1 2.716 2.526 2.906 Backtransformed parameters: est. lower upper cyan_free_0 1.027e+02 1.014e+02 103.89517 k_cyan_free 5.654e-02 4.132e-02 0.07736 k_cyan_free_bound 6.202e-02 2.718e-02 0.14153 k_cyan_bound_free 2.775e-02 1.551e-02 0.04966 k_JCZ38 9.622e-02 5.519e-02 0.16777 k_J9Z38 5.254e-03 2.447e-03 0.01128 k_JSE76 4.852e-02 1.380e-02 0.17051 f_cyan_free_to_JCZ38 6.197e-01 5.643e-01 0.84429 f_cyan_free_to_J9Z38 2.211e-01 5.643e-01 0.84429 f_JCZ38_to_JSE76 9.855e-01 6.154e-01 0.99965 f_JSE76_to_JCZ38 9.972e-01 1.703e-09 1.00000 Estimated Eigenvalues of SFORB model(s): cyan_b1 cyan_b2 cyan_g 0.13466 0.01165 0.36490 Resulting formation fractions: ff cyan_free_JCZ38 0.619745 cyan_free_J9Z38 0.221083 cyan_free_sink 0.159172 cyan_free 1.000000 JCZ38_JSE76 0.985460 JCZ38_sink 0.014540 JSE76_JCZ38 0.997244 JSE76_sink 0.002756 Estimated disappearance times: DT50 DT90 DT50back DT50_cyan_b1 DT50_cyan_b2 cyan 23.293 158.67 47.77 5.147 59.5 JCZ38 7.203 23.93 NA NA NA J9Z38 131.918 438.22 NA NA NA JSE76 14.287 47.46 NA NA NA saemix version used for fitting: 3.2 mkin version used for pre-fitting: 1.2.6 R version used for fitting: 4.3.2 Date of fit: Thu Nov 16 04:44:02 2023 Date of summary: Thu Nov 16 04:59:11 2023 Equations: d_cyan_free/dt = - k_cyan_free * cyan_free - k_cyan_free_bound * cyan_free + k_cyan_bound_free * cyan_bound d_cyan_bound/dt = + k_cyan_free_bound * cyan_free - k_cyan_bound_free * cyan_bound d_JCZ38/dt = + f_cyan_free_to_JCZ38 * k_cyan_free * cyan_free - k_JCZ38 * JCZ38 + f_JSE76_to_JCZ38 * k_JSE76 * JSE76 d_J9Z38/dt = + f_cyan_free_to_J9Z38 * k_cyan_free * cyan_free - k_J9Z38 * J9Z38 d_JSE76/dt = + f_JCZ38_to_JSE76 * k_JCZ38 * JCZ38 - k_JSE76 * JSE76 Data: 433 observations of 4 variable(s) grouped in 5 datasets Model predictions using solution type deSolve Fitted in 713.14 s Using 300, 100 iterations and 10 chains Variance model: Two-component variance function Starting values for degradation parameters: cyan_free_0 log_k_cyan_free log_k_cyan_free_bound 101.7511 -2.8370 -3.0162 log_k_cyan_bound_free log_k_JCZ38 log_k_J9Z38 -3.6600 -2.2988 -5.3129 log_k_JSE76 f_cyan_ilr_1 f_cyan_ilr_2 -3.6991 0.6722 4.8596 f_JCZ38_qlogis f_JSE76_qlogis 13.4678 14.2149 Fixed degradation parameter values: None Starting values for random effects (square root of initial entries in omega): cyan_free_0 log_k_cyan_free log_k_cyan_free_bound cyan_free_0 5.629 0.000 0.000 log_k_cyan_free 0.000 0.446 0.000 log_k_cyan_free_bound 0.000 0.000 1.449 log_k_cyan_bound_free 0.000 0.000 0.000 log_k_JCZ38 0.000 0.000 0.000 log_k_J9Z38 0.000 0.000 0.000 log_k_JSE76 0.000 0.000 0.000 f_cyan_ilr_1 0.000 0.000 0.000 f_cyan_ilr_2 0.000 0.000 0.000 f_JCZ38_qlogis 0.000 0.000 0.000 f_JSE76_qlogis 0.000 0.000 0.000 log_k_cyan_bound_free log_k_JCZ38 log_k_J9Z38 log_k_JSE76 cyan_free_0 0.000 0.0000 0.000 0.0000 log_k_cyan_free 0.000 0.0000 0.000 0.0000 log_k_cyan_free_bound 0.000 0.0000 0.000 0.0000 log_k_cyan_bound_free 1.213 0.0000 0.000 0.0000 log_k_JCZ38 0.000 0.7801 0.000 0.0000 log_k_J9Z38 0.000 0.0000 1.575 0.0000 log_k_JSE76 0.000 0.0000 0.000 0.8078 f_cyan_ilr_1 0.000 0.0000 0.000 0.0000 f_cyan_ilr_2 0.000 0.0000 0.000 0.0000 f_JCZ38_qlogis 0.000 0.0000 0.000 0.0000 f_JSE76_qlogis 0.000 0.0000 0.000 0.0000 f_cyan_ilr_1 f_cyan_ilr_2 f_JCZ38_qlogis f_JSE76_qlogis cyan_free_0 0.0000 0.000 0.00 0.00 log_k_cyan_free 0.0000 0.000 0.00 0.00 log_k_cyan_free_bound 0.0000 0.000 0.00 0.00 log_k_cyan_bound_free 0.0000 0.000 0.00 0.00 log_k_JCZ38 0.0000 0.000 0.00 0.00 log_k_J9Z38 0.0000 0.000 0.00 0.00 log_k_JSE76 0.0000 0.000 0.00 0.00 f_cyan_ilr_1 0.6518 0.000 0.00 0.00 f_cyan_ilr_2 0.0000 9.981 0.00 0.00 f_JCZ38_qlogis 0.0000 0.000 14.26 0.00 f_JSE76_qlogis 0.0000 0.000 0.00 16.17 Starting values for error model parameters: a.1 b.1 1 1 Results: Likelihood computed by importance sampling AIC BIC logLik 2240 2231 -1098 Optimised parameters: est. lower upper cyan_free_0 100.73014 9.873e+01 1.027e+02 log_k_cyan_free -3.19634 -3.641e+00 -2.752e+00 log_k_cyan_free_bound -3.43533 -3.674e+00 -3.197e+00 log_k_cyan_bound_free -3.83282 -4.163e+00 -3.503e+00 log_k_JCZ38 -2.51065 -3.225e+00 -1.796e+00 log_k_J9Z38 -5.02539 -5.825e+00 -4.226e+00 log_k_JSE76 -3.24777 -4.163e+00 -2.333e+00 f_cyan_ilr_1 0.70640 3.562e-01 1.057e+00 f_cyan_ilr_2 1.42704 3.170e-01 2.537e+00 f_JCZ38_qlogis 2.84779 1.042e+00 4.654e+00 f_JSE76_qlogis 8.63674 -6.407e+02 6.580e+02 a.1 2.07082 1.846e+00 2.296e+00 b.1 0.06227 5.120e-02 7.334e-02 SD.log_k_cyan_free 0.49674 1.865e-01 8.069e-01 SD.log_k_cyan_bound_free 0.28537 6.808e-02 5.027e-01 SD.log_k_JCZ38 0.74846 2.305e-01 1.266e+00 SD.log_k_J9Z38 0.86077 2.713e-01 1.450e+00 SD.log_k_JSE76 0.97613 3.030e-01 1.649e+00 SD.f_cyan_ilr_1 0.38994 1.382e-01 6.417e-01 SD.f_cyan_ilr_2 0.82869 3.917e-02 1.618e+00 SD.f_JCZ38_qlogis 1.05000 -2.809e-02 2.128e+00 SD.f_JSE76_qlogis 0.44681 -3.986e+05 3.986e+05 Correlation: cyn_f_0 lg_k_c_ lg_k_cyn_f_ lg_k_cyn_b_ l__JCZ3 l__J9Z3 log_k_cyan_free 0.0936 log_k_cyan_free_bound 0.1302 0.1627 log_k_cyan_bound_free 0.0029 0.0525 0.5181 log_k_JCZ38 -0.0116 -0.0077 -0.0430 -0.0236 log_k_J9Z38 -0.0192 -0.0077 -0.0048 0.0229 -0.0005 log_k_JSE76 0.0007 -0.0020 -0.0134 -0.0072 0.1225 -0.0016 f_cyan_ilr_1 -0.0118 -0.0027 -0.0132 -0.0118 0.0127 -0.0505 f_cyan_ilr_2 -0.4643 -0.0762 -0.1245 0.0137 0.0497 0.1003 f_JCZ38_qlogis 0.0710 0.0371 0.1826 0.0925 -0.0869 -0.0130 f_JSE76_qlogis -0.0367 -0.0270 -0.2274 -0.1865 0.1244 0.0098 l__JSE7 f_cy__1 f_cy__2 f_JCZ38 log_k_cyan_free log_k_cyan_free_bound log_k_cyan_bound_free log_k_JCZ38 log_k_J9Z38 log_k_JSE76 f_cyan_ilr_1 0.0036 f_cyan_ilr_2 0.0050 -0.0201 f_JCZ38_qlogis 0.0142 -0.0529 -0.2698 f_JSE76_qlogis 0.0064 0.0345 0.2015 -0.7058 Random effects: est. lower upper SD.log_k_cyan_free 0.4967 1.865e-01 8.069e-01 SD.log_k_cyan_bound_free 0.2854 6.808e-02 5.027e-01 SD.log_k_JCZ38 0.7485 2.305e-01 1.266e+00 SD.log_k_J9Z38 0.8608 2.713e-01 1.450e+00 SD.log_k_JSE76 0.9761 3.030e-01 1.649e+00 SD.f_cyan_ilr_1 0.3899 1.382e-01 6.417e-01 SD.f_cyan_ilr_2 0.8287 3.917e-02 1.618e+00 SD.f_JCZ38_qlogis 1.0500 -2.809e-02 2.128e+00 SD.f_JSE76_qlogis 0.4468 -3.986e+05 3.986e+05 Variance model: est. lower upper a.1 2.07082 1.8458 2.29588 b.1 0.06227 0.0512 0.07334 Backtransformed parameters: est. lower upper cyan_free_0 1.007e+02 9.873e+01 102.72898 k_cyan_free 4.091e-02 2.623e-02 0.06382 k_cyan_free_bound 3.221e-02 2.537e-02 0.04090 k_cyan_bound_free 2.165e-02 1.557e-02 0.03011 k_JCZ38 8.122e-02 3.975e-02 0.16594 k_J9Z38 6.569e-03 2.954e-03 0.01461 k_JSE76 3.886e-02 1.556e-02 0.09703 f_cyan_free_to_JCZ38 6.785e-01 6.102e-01 0.97309 f_cyan_free_to_J9Z38 2.498e-01 6.102e-01 0.97309 f_JCZ38_to_JSE76 9.452e-01 7.392e-01 0.99056 f_JSE76_to_JCZ38 9.998e-01 5.580e-279 1.00000 Estimated Eigenvalues of SFORB model(s): cyan_b1 cyan_b2 cyan_g 0.08426 0.01051 0.41220 Resulting formation fractions: ff cyan_free_JCZ38 0.6784541 cyan_free_J9Z38 0.2498405 cyan_free_sink 0.0717054 cyan_free 1.0000000 JCZ38_JSE76 0.9452043 JCZ38_sink 0.0547957 JSE76_JCZ38 0.9998226 JSE76_sink 0.0001774 Estimated disappearance times: DT50 DT90 DT50back DT50_cyan_b1 DT50_cyan_b2 cyan 25.237 168.51 50.73 8.226 65.95 JCZ38 8.535 28.35 NA NA NA J9Z38 105.517 350.52 NA NA NA JSE76 17.837 59.25 NA NA NA"},{"path":"https://pkgdown.jrwb.de/mkin/articles/prebuilt/2022_cyan_pathway.html","id":"pathway-2-refined-fits","dir":"Articles > Prebuilt","previous_headings":"Appendix > Hierarchical fit listings","what":"Pathway 2, refined fits","title":"Testing hierarchical pathway kinetics with residue data on cyantraniliprole","text":"Hierarchical FOMC path 2 fit reduced random effects, two-component error Hierarchical DFOP path 2 fit reduced random effects, constant variance Hierarchical DFOP path 2 fit reduced random effects, two-component error Hierarchical SFORB path 2 fit reduced random effects, constant variance Hierarchical SFORB path 2 fit reduced random effects, two-component error","code":"saemix version used for fitting: 3.2 mkin version used for pre-fitting: 1.2.6 R version used for fitting: 4.3.2 Date of fit: Thu Nov 16 04:57:07 2023 Date of summary: Thu Nov 16 04:59:11 2023 Equations: d_cyan/dt = - (alpha/beta) * 1/((time/beta) + 1) * cyan d_JCZ38/dt = + f_cyan_to_JCZ38 * (alpha/beta) * 1/((time/beta) + 1) * cyan - k_JCZ38 * JCZ38 + f_JSE76_to_JCZ38 * k_JSE76 * JSE76 d_J9Z38/dt = + f_cyan_to_J9Z38 * (alpha/beta) * 1/((time/beta) + 1) * cyan - k_J9Z38 * J9Z38 d_JSE76/dt = + f_JCZ38_to_JSE76 * k_JCZ38 * JCZ38 - k_JSE76 * JSE76 Data: 433 observations of 4 variable(s) grouped in 5 datasets Model predictions using solution type deSolve Fitted in 776.732 s Using 300, 100 iterations and 10 chains Variance model: Two-component variance function Starting values for degradation parameters: cyan_0 log_k_JCZ38 log_k_J9Z38 log_k_JSE76 f_cyan_ilr_1 102.4477 -1.8631 -5.1087 -2.5114 0.6826 f_cyan_ilr_2 f_JCZ38_qlogis f_JSE76_qlogis log_alpha log_beta 4.7944 15.9616 13.1566 -0.1564 2.9781 Fixed degradation parameter values: None Starting values for random effects (square root of initial entries in omega): cyan_0 log_k_JCZ38 log_k_J9Z38 log_k_JSE76 f_cyan_ilr_1 cyan_0 7.701 0.000 0.000 0.000 0.0000 log_k_JCZ38 0.000 1.448 0.000 0.000 0.0000 log_k_J9Z38 0.000 0.000 1.724 0.000 0.0000 log_k_JSE76 0.000 0.000 0.000 3.659 0.0000 f_cyan_ilr_1 0.000 0.000 0.000 0.000 0.6356 f_cyan_ilr_2 0.000 0.000 0.000 0.000 0.0000 f_JCZ38_qlogis 0.000 0.000 0.000 0.000 0.0000 f_JSE76_qlogis 0.000 0.000 0.000 0.000 0.0000 log_alpha 0.000 0.000 0.000 0.000 0.0000 log_beta 0.000 0.000 0.000 0.000 0.0000 f_cyan_ilr_2 f_JCZ38_qlogis f_JSE76_qlogis log_alpha log_beta cyan_0 0.00 0.00 0.00 0.0000 0.0000 log_k_JCZ38 0.00 0.00 0.00 0.0000 0.0000 log_k_J9Z38 0.00 0.00 0.00 0.0000 0.0000 log_k_JSE76 0.00 0.00 0.00 0.0000 0.0000 f_cyan_ilr_1 0.00 0.00 0.00 0.0000 0.0000 f_cyan_ilr_2 10.32 0.00 0.00 0.0000 0.0000 f_JCZ38_qlogis 0.00 12.23 0.00 0.0000 0.0000 f_JSE76_qlogis 0.00 0.00 14.99 0.0000 0.0000 log_alpha 0.00 0.00 0.00 0.3924 0.0000 log_beta 0.00 0.00 0.00 0.0000 0.5639 Starting values for error model parameters: a.1 b.1 1 1 Results: Likelihood computed by importance sampling AIC BIC logLik 2249 2242 -1106 Optimised parameters: est. lower upper cyan_0 101.24524 NA NA log_k_JCZ38 -2.85375 NA NA log_k_J9Z38 -5.07729 NA NA log_k_JSE76 -3.53511 NA NA f_cyan_ilr_1 0.67478 NA NA f_cyan_ilr_2 0.97152 NA NA f_JCZ38_qlogis 213.48001 NA NA f_JSE76_qlogis 2.02040 NA NA log_alpha -0.11041 NA NA log_beta 3.06575 NA NA a.1 2.05279 1.82393 2.28166 b.1 0.07116 0.05910 0.08322 SD.log_k_JCZ38 1.21713 0.44160 1.99266 SD.log_k_J9Z38 0.88268 0.27541 1.48995 SD.log_k_JSE76 0.59452 0.15005 1.03898 SD.f_cyan_ilr_1 0.35370 0.12409 0.58331 SD.f_cyan_ilr_2 0.78186 0.18547 1.37824 SD.log_alpha 0.27781 0.08168 0.47394 SD.log_beta 0.32608 0.06490 0.58726 Correlation is not available Random effects: est. lower upper SD.log_k_JCZ38 1.2171 0.44160 1.9927 SD.log_k_J9Z38 0.8827 0.27541 1.4900 SD.log_k_JSE76 0.5945 0.15005 1.0390 SD.f_cyan_ilr_1 0.3537 0.12409 0.5833 SD.f_cyan_ilr_2 0.7819 0.18547 1.3782 SD.log_alpha 0.2778 0.08168 0.4739 SD.log_beta 0.3261 0.06490 0.5873 Variance model: est. lower upper a.1 2.05279 1.8239 2.28166 b.1 0.07116 0.0591 0.08322 Backtransformed parameters: est. lower upper cyan_0 1.012e+02 NA NA k_JCZ38 5.763e-02 NA NA k_J9Z38 6.237e-03 NA NA k_JSE76 2.916e-02 NA NA f_cyan_to_JCZ38 6.354e-01 NA NA f_cyan_to_J9Z38 2.447e-01 NA NA f_JCZ38_to_JSE76 1.000e+00 NA NA f_JSE76_to_JCZ38 8.829e-01 NA NA alpha 8.955e-01 NA NA beta 2.145e+01 NA NA Resulting formation fractions: ff cyan_JCZ38 0.6354 cyan_J9Z38 0.2447 cyan_sink 0.1200 JCZ38_JSE76 1.0000 JCZ38_sink 0.0000 JSE76_JCZ38 0.8829 JSE76_sink 0.1171 Estimated disappearance times: DT50 DT90 DT50back cyan 25.07 259.21 78.03 JCZ38 12.03 39.96 NA J9Z38 111.14 369.19 NA JSE76 23.77 78.98 NA saemix version used for fitting: 3.2 mkin version used for pre-fitting: 1.2.6 R version used for fitting: 4.3.2 Date of fit: Thu Nov 16 04:58:51 2023 Date of summary: Thu Nov 16 04:59:11 2023 Equations: d_cyan/dt = - ((k1 * g * exp(-k1 * time) + k2 * (1 - g) * exp(-k2 * time)) / (g * exp(-k1 * time) + (1 - g) * exp(-k2 * time))) * cyan d_JCZ38/dt = + f_cyan_to_JCZ38 * ((k1 * g * exp(-k1 * time) + k2 * (1 - g) * exp(-k2 * time)) / (g * exp(-k1 * time) + (1 - g) * exp(-k2 * time))) * cyan - k_JCZ38 * JCZ38 + f_JSE76_to_JCZ38 * k_JSE76 * JSE76 d_J9Z38/dt = + f_cyan_to_J9Z38 * ((k1 * g * exp(-k1 * time) + k2 * (1 - g) * exp(-k2 * time)) / (g * exp(-k1 * time) + (1 - g) * exp(-k2 * time))) * cyan - k_J9Z38 * J9Z38 d_JSE76/dt = + f_JCZ38_to_JSE76 * k_JCZ38 * JCZ38 - k_JSE76 * JSE76 Data: 433 observations of 4 variable(s) grouped in 5 datasets Model predictions using solution type deSolve Fitted in 880.94 s Using 300, 100 iterations and 10 chains Variance model: Constant variance Starting values for degradation parameters: cyan_0 log_k_JCZ38 log_k_J9Z38 log_k_JSE76 f_cyan_ilr_1 102.4380 -2.3107 -5.3123 -3.7120 0.6757 f_cyan_ilr_2 f_JCZ38_qlogis f_JSE76_qlogis log_k1 log_k2 1.1439 13.1194 12.3492 -1.9317 -4.4557 g_qlogis -0.5644 Fixed degradation parameter values: None Starting values for random effects (square root of initial entries in omega): cyan_0 log_k_JCZ38 log_k_J9Z38 log_k_JSE76 f_cyan_ilr_1 cyan_0 4.591 0.0000 0.000 0.0 0.0000 log_k_JCZ38 0.000 0.7966 0.000 0.0 0.0000 log_k_J9Z38 0.000 0.0000 1.561 0.0 0.0000 log_k_JSE76 0.000 0.0000 0.000 0.8 0.0000 f_cyan_ilr_1 0.000 0.0000 0.000 0.0 0.6349 f_cyan_ilr_2 0.000 0.0000 0.000 0.0 0.0000 f_JCZ38_qlogis 0.000 0.0000 0.000 0.0 0.0000 f_JSE76_qlogis 0.000 0.0000 0.000 0.0 0.0000 log_k1 0.000 0.0000 0.000 0.0 0.0000 log_k2 0.000 0.0000 0.000 0.0 0.0000 g_qlogis 0.000 0.0000 0.000 0.0 0.0000 f_cyan_ilr_2 f_JCZ38_qlogis f_JSE76_qlogis log_k1 log_k2 cyan_0 0.000 0.00 0.00 0.000 0.0000 log_k_JCZ38 0.000 0.00 0.00 0.000 0.0000 log_k_J9Z38 0.000 0.00 0.00 0.000 0.0000 log_k_JSE76 0.000 0.00 0.00 0.000 0.0000 f_cyan_ilr_1 0.000 0.00 0.00 0.000 0.0000 f_cyan_ilr_2 1.797 0.00 0.00 0.000 0.0000 f_JCZ38_qlogis 0.000 13.86 0.00 0.000 0.0000 f_JSE76_qlogis 0.000 0.00 13.91 0.000 0.0000 log_k1 0.000 0.00 0.00 1.106 0.0000 log_k2 0.000 0.00 0.00 0.000 0.6141 g_qlogis 0.000 0.00 0.00 0.000 0.0000 g_qlogis cyan_0 0.000 log_k_JCZ38 0.000 log_k_J9Z38 0.000 log_k_JSE76 0.000 f_cyan_ilr_1 0.000 f_cyan_ilr_2 0.000 f_JCZ38_qlogis 0.000 f_JSE76_qlogis 0.000 log_k1 0.000 log_k2 0.000 g_qlogis 1.595 Starting values for error model parameters: a.1 1 Results: Likelihood computed by importance sampling AIC BIC logLik 2282 2274 -1121 Optimised parameters: est. lower upper cyan_0 102.6036 NA NA log_k_JCZ38 -2.9348 NA NA log_k_J9Z38 -5.1617 NA NA log_k_JSE76 -3.6396 NA NA f_cyan_ilr_1 0.6991 NA NA f_cyan_ilr_2 0.6341 NA NA f_JCZ38_qlogis 4232.3011 NA NA f_JSE76_qlogis 1.9658 NA NA log_k1 -1.9503 NA NA log_k2 -4.4745 NA NA g_qlogis -0.4967 NA NA a.1 2.7461 2.59274 2.8994 SD.log_k_JCZ38 1.3178 0.47602 2.1596 SD.log_k_J9Z38 0.7022 0.15061 1.2538 SD.log_k_JSE76 0.6566 0.15613 1.1570 SD.f_cyan_ilr_1 0.3409 0.11666 0.5652 SD.f_cyan_ilr_2 0.4385 0.09482 0.7821 SD.log_k1 0.7381 0.25599 1.2202 SD.log_k2 0.5133 0.18152 0.8450 SD.g_qlogis 0.9866 0.35681 1.6164 Correlation is not available Random effects: est. lower upper SD.log_k_JCZ38 1.3178 0.47602 2.1596 SD.log_k_J9Z38 0.7022 0.15061 1.2538 SD.log_k_JSE76 0.6566 0.15613 1.1570 SD.f_cyan_ilr_1 0.3409 0.11666 0.5652 SD.f_cyan_ilr_2 0.4385 0.09482 0.7821 SD.log_k1 0.7381 0.25599 1.2202 SD.log_k2 0.5133 0.18152 0.8450 SD.g_qlogis 0.9866 0.35681 1.6164 Variance model: est. lower upper a.1 2.746 2.593 2.899 Backtransformed parameters: est. lower upper cyan_0 1.026e+02 NA NA k_JCZ38 5.314e-02 NA NA k_J9Z38 5.732e-03 NA NA k_JSE76 2.626e-02 NA NA f_cyan_to_JCZ38 6.051e-01 NA NA f_cyan_to_J9Z38 2.251e-01 NA NA f_JCZ38_to_JSE76 1.000e+00 NA NA f_JSE76_to_JCZ38 8.772e-01 NA NA k1 1.422e-01 NA NA k2 1.140e-02 NA NA g 3.783e-01 NA NA Resulting formation fractions: ff cyan_JCZ38 0.6051 cyan_J9Z38 0.2251 cyan_sink 0.1698 JCZ38_JSE76 1.0000 JCZ38_sink 0.0000 JSE76_JCZ38 0.8772 JSE76_sink 0.1228 Estimated disappearance times: DT50 DT90 DT50back DT50_k1 DT50_k2 cyan 22.05 160.35 48.27 4.873 60.83 JCZ38 13.04 43.33 NA NA NA J9Z38 120.93 401.73 NA NA NA JSE76 26.39 87.68 NA NA NA saemix version used for fitting: 3.2 mkin version used for pre-fitting: 1.2.6 R version used for fitting: 4.3.2 Date of fit: Thu Nov 16 04:58:58 2023 Date of summary: Thu Nov 16 04:59:11 2023 Equations: d_cyan/dt = - ((k1 * g * exp(-k1 * time) + k2 * (1 - g) * exp(-k2 * time)) / (g * exp(-k1 * time) + (1 - g) * exp(-k2 * time))) * cyan d_JCZ38/dt = + f_cyan_to_JCZ38 * ((k1 * g * exp(-k1 * time) + k2 * (1 - g) * exp(-k2 * time)) / (g * exp(-k1 * time) + (1 - g) * exp(-k2 * time))) * cyan - k_JCZ38 * JCZ38 + f_JSE76_to_JCZ38 * k_JSE76 * JSE76 d_J9Z38/dt = + f_cyan_to_J9Z38 * ((k1 * g * exp(-k1 * time) + k2 * (1 - g) * exp(-k2 * time)) / (g * exp(-k1 * time) + (1 - g) * exp(-k2 * time))) * cyan - k_J9Z38 * J9Z38 d_JSE76/dt = + f_JCZ38_to_JSE76 * k_JCZ38 * JCZ38 - k_JSE76 * JSE76 Data: 433 observations of 4 variable(s) grouped in 5 datasets Model predictions using solution type deSolve Fitted in 887.853 s Using 300, 100 iterations and 10 chains Variance model: Two-component variance function Starting values for degradation parameters: cyan_0 log_k_JCZ38 log_k_J9Z38 log_k_JSE76 f_cyan_ilr_1 101.7393 -1.4493 -5.0118 -2.1269 0.6720 f_cyan_ilr_2 f_JCZ38_qlogis f_JSE76_qlogis log_k1 log_k2 7.3362 13.4423 13.2659 -2.0061 -4.5527 g_qlogis -0.5806 Fixed degradation parameter values: None Starting values for random effects (square root of initial entries in omega): cyan_0 log_k_JCZ38 log_k_J9Z38 log_k_JSE76 f_cyan_ilr_1 cyan_0 5.604 0.00 0.000 0.000 0.0000 log_k_JCZ38 0.000 2.77 0.000 0.000 0.0000 log_k_J9Z38 0.000 0.00 1.662 0.000 0.0000 log_k_JSE76 0.000 0.00 0.000 5.021 0.0000 f_cyan_ilr_1 0.000 0.00 0.000 0.000 0.6519 f_cyan_ilr_2 0.000 0.00 0.000 0.000 0.0000 f_JCZ38_qlogis 0.000 0.00 0.000 0.000 0.0000 f_JSE76_qlogis 0.000 0.00 0.000 0.000 0.0000 log_k1 0.000 0.00 0.000 0.000 0.0000 log_k2 0.000 0.00 0.000 0.000 0.0000 g_qlogis 0.000 0.00 0.000 0.000 0.0000 f_cyan_ilr_2 f_JCZ38_qlogis f_JSE76_qlogis log_k1 log_k2 cyan_0 0.00 0.00 0.00 0.0000 0.0000 log_k_JCZ38 0.00 0.00 0.00 0.0000 0.0000 log_k_J9Z38 0.00 0.00 0.00 0.0000 0.0000 log_k_JSE76 0.00 0.00 0.00 0.0000 0.0000 f_cyan_ilr_1 0.00 0.00 0.00 0.0000 0.0000 f_cyan_ilr_2 13.37 0.00 0.00 0.0000 0.0000 f_JCZ38_qlogis 0.00 14.21 0.00 0.0000 0.0000 f_JSE76_qlogis 0.00 0.00 14.58 0.0000 0.0000 log_k1 0.00 0.00 0.00 0.8453 0.0000 log_k2 0.00 0.00 0.00 0.0000 0.5969 g_qlogis 0.00 0.00 0.00 0.0000 0.0000 g_qlogis cyan_0 0.00 log_k_JCZ38 0.00 log_k_J9Z38 0.00 log_k_JSE76 0.00 f_cyan_ilr_1 0.00 f_cyan_ilr_2 0.00 f_JCZ38_qlogis 0.00 f_JSE76_qlogis 0.00 log_k1 0.00 log_k2 0.00 g_qlogis 1.69 Starting values for error model parameters: a.1 b.1 1 1 Results: Likelihood computed by importance sampling AIC BIC logLik 2237 2229 -1099 Optimised parameters: est. lower upper cyan_0 101.00243 NA NA log_k_JCZ38 -2.80828 NA NA log_k_J9Z38 -5.04449 NA NA log_k_JSE76 -3.66981 NA NA f_cyan_ilr_1 0.72564 NA NA f_cyan_ilr_2 1.37978 NA NA f_JCZ38_qlogis 1.98726 NA NA f_JSE76_qlogis 414.80884 NA NA log_k1 -2.38601 NA NA log_k2 -4.63632 NA NA g_qlogis -0.33920 NA NA a.1 2.10837 1.88051 2.33623 b.1 0.06223 0.05108 0.07338 SD.log_k_JCZ38 1.30902 0.48128 2.13675 SD.log_k_J9Z38 0.83882 0.25790 1.41974 SD.log_k_JSE76 0.58104 0.14201 1.02008 SD.f_cyan_ilr_1 0.35421 0.12398 0.58443 SD.f_cyan_ilr_2 0.79373 0.12007 1.46740 SD.log_k2 0.27476 0.08557 0.46394 SD.g_qlogis 0.96170 0.35463 1.56878 Correlation is not available Random effects: est. lower upper SD.log_k_JCZ38 1.3090 0.48128 2.1367 SD.log_k_J9Z38 0.8388 0.25790 1.4197 SD.log_k_JSE76 0.5810 0.14201 1.0201 SD.f_cyan_ilr_1 0.3542 0.12398 0.5844 SD.f_cyan_ilr_2 0.7937 0.12007 1.4674 SD.log_k2 0.2748 0.08557 0.4639 SD.g_qlogis 0.9617 0.35463 1.5688 Variance model: est. lower upper a.1 2.10837 1.88051 2.33623 b.1 0.06223 0.05108 0.07338 Backtransformed parameters: est. lower upper cyan_0 1.010e+02 NA NA k_JCZ38 6.031e-02 NA NA k_J9Z38 6.445e-03 NA NA k_JSE76 2.548e-02 NA NA f_cyan_to_JCZ38 6.808e-01 NA NA f_cyan_to_J9Z38 2.440e-01 NA NA f_JCZ38_to_JSE76 8.795e-01 NA NA f_JSE76_to_JCZ38 1.000e+00 NA NA k1 9.200e-02 NA NA k2 9.693e-03 NA NA g 4.160e-01 NA NA Resulting formation fractions: ff cyan_JCZ38 0.68081 cyan_J9Z38 0.24398 cyan_sink 0.07521 JCZ38_JSE76 0.87945 JCZ38_sink 0.12055 JSE76_JCZ38 1.00000 JSE76_sink 0.00000 Estimated disappearance times: DT50 DT90 DT50back DT50_k1 DT50_k2 cyan 25.00 182.05 54.8 7.535 71.51 JCZ38 11.49 38.18 NA NA NA J9Z38 107.55 357.28 NA NA NA JSE76 27.20 90.36 NA NA NA saemix version used for fitting: 3.2 mkin version used for pre-fitting: 1.2.6 R version used for fitting: 4.3.2 Date of fit: Thu Nov 16 04:58:49 2023 Date of summary: Thu Nov 16 04:59:11 2023 Equations: d_cyan_free/dt = - k_cyan_free * cyan_free - k_cyan_free_bound * cyan_free + k_cyan_bound_free * cyan_bound d_cyan_bound/dt = + k_cyan_free_bound * cyan_free - k_cyan_bound_free * cyan_bound d_JCZ38/dt = + f_cyan_free_to_JCZ38 * k_cyan_free * cyan_free - k_JCZ38 * JCZ38 + f_JSE76_to_JCZ38 * k_JSE76 * JSE76 d_J9Z38/dt = + f_cyan_free_to_J9Z38 * k_cyan_free * cyan_free - k_J9Z38 * J9Z38 d_JSE76/dt = + f_JCZ38_to_JSE76 * k_JCZ38 * JCZ38 - k_JSE76 * JSE76 Data: 433 observations of 4 variable(s) grouped in 5 datasets Model predictions using solution type deSolve Fitted in 878.878 s Using 300, 100 iterations and 10 chains Variance model: Constant variance Starting values for degradation parameters: cyan_free_0 log_k_cyan_free log_k_cyan_free_bound 102.4395 -2.7673 -2.8942 log_k_cyan_bound_free log_k_JCZ38 log_k_J9Z38 -3.6201 -2.3107 -5.3123 log_k_JSE76 f_cyan_ilr_1 f_cyan_ilr_2 -3.7120 0.6754 1.1448 f_JCZ38_qlogis f_JSE76_qlogis 14.8408 15.4734 Fixed degradation parameter values: None Starting values for random effects (square root of initial entries in omega): cyan_free_0 log_k_cyan_free log_k_cyan_free_bound cyan_free_0 4.589 0.0000 0.00 log_k_cyan_free 0.000 0.4849 0.00 log_k_cyan_free_bound 0.000 0.0000 1.62 log_k_cyan_bound_free 0.000 0.0000 0.00 log_k_JCZ38 0.000 0.0000 0.00 log_k_J9Z38 0.000 0.0000 0.00 log_k_JSE76 0.000 0.0000 0.00 f_cyan_ilr_1 0.000 0.0000 0.00 f_cyan_ilr_2 0.000 0.0000 0.00 f_JCZ38_qlogis 0.000 0.0000 0.00 f_JSE76_qlogis 0.000 0.0000 0.00 log_k_cyan_bound_free log_k_JCZ38 log_k_J9Z38 log_k_JSE76 cyan_free_0 0.000 0.0000 0.000 0.0 log_k_cyan_free 0.000 0.0000 0.000 0.0 log_k_cyan_free_bound 0.000 0.0000 0.000 0.0 log_k_cyan_bound_free 1.197 0.0000 0.000 0.0 log_k_JCZ38 0.000 0.7966 0.000 0.0 log_k_J9Z38 0.000 0.0000 1.561 0.0 log_k_JSE76 0.000 0.0000 0.000 0.8 f_cyan_ilr_1 0.000 0.0000 0.000 0.0 f_cyan_ilr_2 0.000 0.0000 0.000 0.0 f_JCZ38_qlogis 0.000 0.0000 0.000 0.0 f_JSE76_qlogis 0.000 0.0000 0.000 0.0 f_cyan_ilr_1 f_cyan_ilr_2 f_JCZ38_qlogis f_JSE76_qlogis cyan_free_0 0.0000 0.000 0.0 0.00 log_k_cyan_free 0.0000 0.000 0.0 0.00 log_k_cyan_free_bound 0.0000 0.000 0.0 0.00 log_k_cyan_bound_free 0.0000 0.000 0.0 0.00 log_k_JCZ38 0.0000 0.000 0.0 0.00 log_k_J9Z38 0.0000 0.000 0.0 0.00 log_k_JSE76 0.0000 0.000 0.0 0.00 f_cyan_ilr_1 0.6349 0.000 0.0 0.00 f_cyan_ilr_2 0.0000 1.797 0.0 0.00 f_JCZ38_qlogis 0.0000 0.000 15.6 0.00 f_JSE76_qlogis 0.0000 0.000 0.0 17.52 Starting values for error model parameters: a.1 1 Results: Likelihood computed by importance sampling AIC BIC logLik 2280 2272 -1120 Optimised parameters: est. lower upper cyan_free_0 102.6532 NA NA log_k_cyan_free -2.8547 NA NA log_k_cyan_free_bound -2.7004 NA NA log_k_cyan_bound_free -3.5078 NA NA log_k_JCZ38 -2.9255 NA NA log_k_J9Z38 -5.1089 NA NA log_k_JSE76 -3.6263 NA NA f_cyan_ilr_1 0.6873 NA NA f_cyan_ilr_2 0.6498 NA NA f_JCZ38_qlogis 3624.2149 NA NA f_JSE76_qlogis 1.9991 NA NA a.1 2.7472 2.55559 2.9388 SD.log_k_cyan_free 0.3227 0.10296 0.5423 SD.log_k_cyan_free_bound 0.8757 0.29525 1.4562 SD.log_k_cyan_bound_free 0.6128 0.20220 1.0233 SD.log_k_JCZ38 1.3431 0.48474 2.2014 SD.log_k_J9Z38 0.6881 0.14714 1.2291 SD.log_k_JSE76 0.6461 0.15321 1.1390 SD.f_cyan_ilr_1 0.3361 0.11376 0.5585 SD.f_cyan_ilr_2 0.4286 0.08419 0.7730 Correlation is not available Random effects: est. lower upper SD.log_k_cyan_free 0.3227 0.10296 0.5423 SD.log_k_cyan_free_bound 0.8757 0.29525 1.4562 SD.log_k_cyan_bound_free 0.6128 0.20220 1.0233 SD.log_k_JCZ38 1.3431 0.48474 2.2014 SD.log_k_J9Z38 0.6881 0.14714 1.2291 SD.log_k_JSE76 0.6461 0.15321 1.1390 SD.f_cyan_ilr_1 0.3361 0.11376 0.5585 SD.f_cyan_ilr_2 0.4286 0.08419 0.7730 Variance model: est. lower upper a.1 2.747 2.556 2.939 Backtransformed parameters: est. lower upper cyan_free_0 1.027e+02 NA NA k_cyan_free 5.758e-02 NA NA k_cyan_free_bound 6.718e-02 NA NA k_cyan_bound_free 2.996e-02 NA NA k_JCZ38 5.364e-02 NA NA k_J9Z38 6.042e-03 NA NA k_JSE76 2.662e-02 NA NA f_cyan_free_to_JCZ38 6.039e-01 NA NA f_cyan_free_to_J9Z38 2.285e-01 NA NA f_JCZ38_to_JSE76 1.000e+00 NA NA f_JSE76_to_JCZ38 8.807e-01 NA NA Estimated Eigenvalues of SFORB model(s): cyan_b1 cyan_b2 cyan_g 0.1426 0.0121 0.3484 Resulting formation fractions: ff cyan_free_JCZ38 0.6039 cyan_free_J9Z38 0.2285 cyan_free_sink 0.1676 cyan_free 1.0000 JCZ38_JSE76 1.0000 JCZ38_sink 0.0000 JSE76_JCZ38 0.8807 JSE76_sink 0.1193 Estimated disappearance times: DT50 DT90 DT50back DT50_cyan_b1 DT50_cyan_b2 cyan 23.84 154.95 46.65 4.86 57.31 JCZ38 12.92 42.93 NA NA NA J9Z38 114.71 381.07 NA NA NA JSE76 26.04 86.51 NA NA NA saemix version used for fitting: 3.2 mkin version used for pre-fitting: 1.2.6 R version used for fitting: 4.3.2 Date of fit: Thu Nov 16 04:59:10 2023 Date of summary: Thu Nov 16 04:59:11 2023 Equations: d_cyan_free/dt = - k_cyan_free * cyan_free - k_cyan_free_bound * cyan_free + k_cyan_bound_free * cyan_bound d_cyan_bound/dt = + k_cyan_free_bound * cyan_free - k_cyan_bound_free * cyan_bound d_JCZ38/dt = + f_cyan_free_to_JCZ38 * k_cyan_free * cyan_free - k_JCZ38 * JCZ38 + f_JSE76_to_JCZ38 * k_JSE76 * JSE76 d_J9Z38/dt = + f_cyan_free_to_J9Z38 * k_cyan_free * cyan_free - k_J9Z38 * J9Z38 d_JSE76/dt = + f_JCZ38_to_JSE76 * k_JCZ38 * JCZ38 - k_JSE76 * JSE76 Data: 433 observations of 4 variable(s) grouped in 5 datasets Model predictions using solution type deSolve Fitted in 899.539 s Using 300, 100 iterations and 10 chains Variance model: Two-component variance function Starting values for degradation parameters: cyan_free_0 log_k_cyan_free log_k_cyan_free_bound 101.7511 -2.8370 -3.0162 log_k_cyan_bound_free log_k_JCZ38 log_k_J9Z38 -3.6600 -2.2988 -5.3129 log_k_JSE76 f_cyan_ilr_1 f_cyan_ilr_2 -3.6991 0.6722 4.8596 f_JCZ38_qlogis f_JSE76_qlogis 13.4678 14.2149 Fixed degradation parameter values: None Starting values for random effects (square root of initial entries in omega): cyan_free_0 log_k_cyan_free log_k_cyan_free_bound cyan_free_0 5.629 0.000 0.000 log_k_cyan_free 0.000 0.446 0.000 log_k_cyan_free_bound 0.000 0.000 1.449 log_k_cyan_bound_free 0.000 0.000 0.000 log_k_JCZ38 0.000 0.000 0.000 log_k_J9Z38 0.000 0.000 0.000 log_k_JSE76 0.000 0.000 0.000 f_cyan_ilr_1 0.000 0.000 0.000 f_cyan_ilr_2 0.000 0.000 0.000 f_JCZ38_qlogis 0.000 0.000 0.000 f_JSE76_qlogis 0.000 0.000 0.000 log_k_cyan_bound_free log_k_JCZ38 log_k_J9Z38 log_k_JSE76 cyan_free_0 0.000 0.0000 0.000 0.0000 log_k_cyan_free 0.000 0.0000 0.000 0.0000 log_k_cyan_free_bound 0.000 0.0000 0.000 0.0000 log_k_cyan_bound_free 1.213 0.0000 0.000 0.0000 log_k_JCZ38 0.000 0.7801 0.000 0.0000 log_k_J9Z38 0.000 0.0000 1.575 0.0000 log_k_JSE76 0.000 0.0000 0.000 0.8078 f_cyan_ilr_1 0.000 0.0000 0.000 0.0000 f_cyan_ilr_2 0.000 0.0000 0.000 0.0000 f_JCZ38_qlogis 0.000 0.0000 0.000 0.0000 f_JSE76_qlogis 0.000 0.0000 0.000 0.0000 f_cyan_ilr_1 f_cyan_ilr_2 f_JCZ38_qlogis f_JSE76_qlogis cyan_free_0 0.0000 0.000 0.00 0.00 log_k_cyan_free 0.0000 0.000 0.00 0.00 log_k_cyan_free_bound 0.0000 0.000 0.00 0.00 log_k_cyan_bound_free 0.0000 0.000 0.00 0.00 log_k_JCZ38 0.0000 0.000 0.00 0.00 log_k_J9Z38 0.0000 0.000 0.00 0.00 log_k_JSE76 0.0000 0.000 0.00 0.00 f_cyan_ilr_1 0.6518 0.000 0.00 0.00 f_cyan_ilr_2 0.0000 9.981 0.00 0.00 f_JCZ38_qlogis 0.0000 0.000 14.26 0.00 f_JSE76_qlogis 0.0000 0.000 0.00 16.17 Starting values for error model parameters: a.1 b.1 1 1 Results: Likelihood computed by importance sampling AIC BIC logLik 2241 2233 -1101 Optimised parameters: est. lower upper cyan_free_0 100.95469 NA NA log_k_cyan_free -3.18706 NA NA log_k_cyan_free_bound -3.38455 NA NA log_k_cyan_bound_free -3.75788 NA NA log_k_JCZ38 -2.77024 NA NA log_k_J9Z38 -5.03665 NA NA log_k_JSE76 -3.60289 NA NA f_cyan_ilr_1 0.72263 NA NA f_cyan_ilr_2 1.45352 NA NA f_JCZ38_qlogis 2.00778 NA NA f_JSE76_qlogis 941.58570 NA NA a.1 2.11130 1.88299 2.33960 b.1 0.06299 0.05176 0.07421 SD.log_k_cyan_free 0.50098 0.18805 0.81390 SD.log_k_cyan_bound_free 0.31671 0.08467 0.54875 SD.log_k_JCZ38 1.25865 0.45932 2.05798 SD.log_k_J9Z38 0.86833 0.27222 1.46444 SD.log_k_JSE76 0.59325 0.14711 1.03940 SD.f_cyan_ilr_1 0.35705 0.12521 0.58890 SD.f_cyan_ilr_2 0.88541 0.13797 1.63286 Correlation is not available Random effects: est. lower upper SD.log_k_cyan_free 0.5010 0.18805 0.8139 SD.log_k_cyan_bound_free 0.3167 0.08467 0.5488 SD.log_k_JCZ38 1.2587 0.45932 2.0580 SD.log_k_J9Z38 0.8683 0.27222 1.4644 SD.log_k_JSE76 0.5933 0.14711 1.0394 SD.f_cyan_ilr_1 0.3571 0.12521 0.5889 SD.f_cyan_ilr_2 0.8854 0.13797 1.6329 Variance model: est. lower upper a.1 2.11130 1.88299 2.33960 b.1 0.06299 0.05176 0.07421 Backtransformed parameters: est. lower upper cyan_free_0 1.010e+02 NA NA k_cyan_free 4.129e-02 NA NA k_cyan_free_bound 3.389e-02 NA NA k_cyan_bound_free 2.333e-02 NA NA k_JCZ38 6.265e-02 NA NA k_J9Z38 6.495e-03 NA NA k_JSE76 2.724e-02 NA NA f_cyan_free_to_JCZ38 6.844e-01 NA NA f_cyan_free_to_J9Z38 2.463e-01 NA NA f_JCZ38_to_JSE76 8.816e-01 NA NA f_JSE76_to_JCZ38 1.000e+00 NA NA Estimated Eigenvalues of SFORB model(s): cyan_b1 cyan_b2 cyan_g 0.08751 0.01101 0.39586 Resulting formation fractions: ff cyan_free_JCZ38 0.68444 cyan_free_J9Z38 0.24633 cyan_free_sink 0.06923 cyan_free 1.00000 JCZ38_JSE76 0.88161 JCZ38_sink 0.11839 JSE76_JCZ38 1.00000 JSE76_sink 0.00000 Estimated disappearance times: DT50 DT90 DT50back DT50_cyan_b1 DT50_cyan_b2 cyan 25.36 163.36 49.18 7.921 62.95 JCZ38 11.06 36.75 NA NA NA J9Z38 106.71 354.49 NA NA NA JSE76 25.44 84.51 NA NA NA"},{"path":"https://pkgdown.jrwb.de/mkin/articles/prebuilt/2022_cyan_pathway.html","id":"session-info","dir":"Articles > Prebuilt","previous_headings":"Appendix","what":"Session info","title":"Testing hierarchical pathway kinetics with residue data on cyantraniliprole","text":"","code":"R version 4.3.2 (2023-10-31) Platform: x86_64-pc-linux-gnu (64-bit) Running under: Debian GNU/Linux 12 (bookworm) Matrix products: default BLAS: /usr/lib/x86_64-linux-gnu/blas/libblas.so.3.11.0 LAPACK: /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3.11.0 locale: [1] LC_CTYPE=de_DE.UTF-8 LC_NUMERIC=C [3] LC_TIME=de_DE.UTF-8 LC_COLLATE=de_DE.UTF-8 [5] LC_MONETARY=de_DE.UTF-8 LC_MESSAGES=de_DE.UTF-8 [7] LC_PAPER=de_DE.UTF-8 LC_NAME=C [9] LC_ADDRESS=C LC_TELEPHONE=C [11] LC_MEASUREMENT=de_DE.UTF-8 LC_IDENTIFICATION=C time zone: Europe/Berlin tzcode source: system (glibc) attached base packages: [1] parallel stats graphics grDevices utils datasets methods [8] base other attached packages: [1] saemix_3.2 npde_3.3 knitr_1.42 mkin_1.2.6 loaded via a namespace (and not attached): [1] sass_0.4.6 utf8_1.2.3 generics_0.1.3 stringi_1.7.12 [5] lattice_0.21-8 digest_0.6.31 magrittr_2.0.3 evaluate_0.21 [9] grid_4.3.2 fastmap_1.1.1 cellranger_1.1.0 rprojroot_2.0.3 [13] jsonlite_1.8.4 processx_3.8.1 pkgbuild_1.4.0 deSolve_1.35 [17] DBI_1.1.3 mclust_6.0.0 ps_1.7.5 gridExtra_2.3 [21] purrr_1.0.1 fansi_1.0.4 scales_1.2.1 codetools_0.2-19 [25] textshaping_0.3.6 jquerylib_0.1.4 cli_3.6.1 crayon_1.5.2 [29] rlang_1.1.1 munsell_0.5.0 cachem_1.0.8 yaml_2.3.7 [33] inline_0.3.19 tools_4.3.2 memoise_2.0.1 dplyr_1.1.2 [37] colorspace_2.1-0 ggplot2_3.4.2 vctrs_0.6.2 R6_2.5.1 [41] zoo_1.8-12 lifecycle_1.0.3 stringr_1.5.0 fs_1.6.2 [45] MASS_7.3-60 ragg_1.2.5 callr_3.7.3 pkgconfig_2.0.3 [49] desc_1.4.2 pkgdown_2.0.7 bslib_0.4.2 pillar_1.9.0 [53] gtable_0.3.3 glue_1.6.2 systemfonts_1.0.4 highr_0.10 [57] xfun_0.39 tibble_3.2.1 lmtest_0.9-40 tidyselect_1.2.0 [61] htmltools_0.5.5 nlme_3.1-163 rmarkdown_2.21 compiler_4.3.2 [65] prettyunits_1.1.1 readxl_1.4.2"},{"path":"https://pkgdown.jrwb.de/mkin/articles/prebuilt/2022_cyan_pathway.html","id":"hardware-info","dir":"Articles > Prebuilt","previous_headings":"Appendix","what":"Hardware info","title":"Testing hierarchical pathway kinetics with residue data on cyantraniliprole","text":"","code":"CPU model: AMD Ryzen 9 7950X 16-Core Processor MemTotal: 64927712 kB"},{"path":"https://pkgdown.jrwb.de/mkin/articles/prebuilt/2022_dmta_parent.html","id":"introduction","dir":"Articles > Prebuilt","previous_headings":"","what":"Introduction","title":"Testing hierarchical parent degradation kinetics with residue data on dimethenamid and dimethenamid-P","text":"purpose document demonstrate nonlinear hierarchical models (NLHM) based parent degradation models SFO, FOMC, DFOP HS can fitted mkin package. assembled course work package 1.1 Project Number 173340 (Application nonlinear hierarchical models kinetic evaluation chemical degradation data) German Environment Agency carried 2022 2023. mkin package used version 1.2.6. contains test data functions used evaluations. saemix package used backend fitting NLHM, also loaded make convergence plot function available. document processed knitr package, also provides kable function used improve display tabular data R markdown documents. parallel processing, parallel package used.","code":"library(mkin) library(knitr) library(saemix) library(parallel) n_cores <- detectCores() if (Sys.info()[\"sysname\"] == \"Windows\") { cl <- makePSOCKcluster(n_cores) } else { cl <- makeForkCluster(n_cores) }"},{"path":"https://pkgdown.jrwb.de/mkin/articles/prebuilt/2022_dmta_parent.html","id":"data","dir":"Articles > Prebuilt","previous_headings":"","what":"Data","title":"Testing hierarchical parent degradation kinetics with residue data on dimethenamid and dimethenamid-P","text":"test data available mkin package object class mkindsg (mkin dataset group) identifier dimethenamid_2018. following preprocessing steps still necessary: data available enantiomer dimethenamid-P (DMTAP) renamed substance name data racemic mixture dimethenamid (DMTA). reason difference degradation behaviour identified EU risk assessment. data transformation products unnecessary columns discarded observation times dataset multiplied corresponding normalisation factor also available dataset, order make possible describe datasets single set parameters independent temperature Finally, datasets observed soil (Elliot 1 Elliot 2) combined, resulting dimethenamid (DMTA) data six soils. following commented R code performs preprocessing. following tables show 6 datasets. Dataset Calke Dataset Borstel Dataset Flaach Dataset BBA 2.2 Dataset BBA 2.3 Dataset Elliot","code":"# Apply a function to each of the seven datasets in the mkindsg object to create a list dmta_ds <- lapply(1:7, function(i) { ds_i <- dimethenamid_2018$ds[[i]]$data # Get a dataset ds_i[ds_i$name == \"DMTAP\", \"name\"] <- \"DMTA\" # Rename DMTAP to DMTA ds_i <- subset(ds_i, name == \"DMTA\", c(\"name\", \"time\", \"value\")) # Select data ds_i$time <- ds_i$time * dimethenamid_2018$f_time_norm[i] # Normalise time ds_i # Return the dataset }) # Use dataset titles as names for the list elements names(dmta_ds) <- sapply(dimethenamid_2018$ds, function(ds) ds$title) # Combine data for Elliot soil to obtain a named list with six elements dmta_ds[[\"Elliot\"]] <- rbind(dmta_ds[[\"Elliot 1\"]], dmta_ds[[\"Elliot 2\"]]) # dmta_ds[[\"Elliot 1\"]] <- NULL dmta_ds[[\"Elliot 2\"]] <- NULL for (ds_name in names(dmta_ds)) { print(kable(mkin_long_to_wide(dmta_ds[[ds_name]]), caption = paste(\"Dataset\", ds_name), label = paste0(\"tab:\", ds_name), booktabs = TRUE)) cat(\"\\n\\\\clearpage\\n\") }"},{"path":"https://pkgdown.jrwb.de/mkin/articles/prebuilt/2022_dmta_parent.html","id":"separate-evaluations","dir":"Articles > Prebuilt","previous_headings":"","what":"Separate evaluations","title":"Testing hierarchical parent degradation kinetics with residue data on dimethenamid and dimethenamid-P","text":"order obtain suitable starting parameters NLHM fits, separate fits four models data soil generated using mmkin function mkin package. first step, constant variance assumed. Convergence checked status function. table , OK indicates convergence, C indicates failure converge. separate fits constant variance converged, sole exception HS fit BBA 2.2 data. prepare fitting NLHM using two-component error model, separate fits updated assuming two-component error. Using two-component error model, one fit converge constant variance converge, non-SFO fits failed converge.","code":"deg_mods <- c(\"SFO\", \"FOMC\", \"DFOP\", \"HS\") f_sep_const <- mmkin( deg_mods, dmta_ds, error_model = \"const\", quiet = TRUE) status(f_sep_const) |> kable() f_sep_tc <- update(f_sep_const, error_model = \"tc\") status(f_sep_tc) |> kable()"},{"path":"https://pkgdown.jrwb.de/mkin/articles/prebuilt/2022_dmta_parent.html","id":"hierarchichal-model-fits","dir":"Articles > Prebuilt","previous_headings":"","what":"Hierarchichal model fits","title":"Testing hierarchical parent degradation kinetics with residue data on dimethenamid and dimethenamid-P","text":"following code fits eight versions hierarchical models data, using SFO, FOMC, DFOP HS parent compound, using either constant variance two-component error error model. default parameter distribution model mkin allows variation degradation parameters across assumed population soils. words, degradation parameter associated random effect first step. mhmkin function makes possible fit eight versions parallel (given sufficient number computing cores available) save execution time. Convergence plots summaries fits shown appendix. output status function shows fits terminated successfully. AIC BIC values show biphasic models DFOP HS give best fits. DFOP model preferred , better mechanistic basis batch experiments constant incubation conditions. Also, shows lowest AIC BIC values first set fits combined two-component error model. Therefore, DFOP model selected refinements fits aim make model fully identifiable.","code":"f_saem <- mhmkin(list(f_sep_const, f_sep_tc), transformations = \"saemix\") status(f_saem) |> kable() anova(f_saem) |> kable(digits = 1)"},{"path":"https://pkgdown.jrwb.de/mkin/articles/prebuilt/2022_dmta_parent.html","id":"parameter-identifiability-based-on-the-fisher-information-matrix","dir":"Articles > Prebuilt","previous_headings":"Hierarchichal model fits","what":"Parameter identifiability based on the Fisher Information Matrix","title":"Testing hierarchical parent degradation kinetics with residue data on dimethenamid and dimethenamid-P","text":"Using illparms function, ill-defined statistical model parameters standard deviations degradation parameters population error model parameters can found. According illparms function, fitted standard deviation second kinetic rate constant k2 ill-defined DFOP fits. suggests different values obtained standard deviation using different starting values. thus identified overparameterisation addressed removing random effect k2 parameter model. resulting fit, checked whether still ill-defined parameters, case. , refined model compared previous best model. model without random effect k2 reduced version previous model. Therefore, models nested can compared using likelihood ratio test. achieved argument test = TRUE anova function. AIC BIC criteria lower removal ill-defined random effect k2. p value likelihood ratio test much greater 0.05, indicating model higher likelihood (model random effects degradation parameters f_saem[[\"DFOP\", \"tc\"]]) fit significantly better model lower likelihood (reduced model f_saem_dfop_tc_no_ranef_k2). Therefore, AIC, BIC likelihood ratio test suggest use reduced model. convergence fit checked visually. Convergence plot NLHM DFOP fit two-component error without random effect ‘k2’ parameters appear converged satisfactory degree. final fit plotted using plot method mkin package. Plot final NLHM DFOP fit Finally, summary report fit produced.","code":"illparms(f_saem) |> kable() f_saem_dfop_tc_no_ranef_k2 <- update(f_saem[[\"DFOP\", \"tc\"]], no_random_effect = \"k2\") illparms(f_saem_dfop_tc_no_ranef_k2) anova(f_saem[[\"DFOP\", \"tc\"]], f_saem_dfop_tc_no_ranef_k2, test = TRUE) |> kable(format.args = list(digits = 4)) plot(f_saem_dfop_tc_no_ranef_k2) summary(f_saem_dfop_tc_no_ranef_k2) saemix version used for fitting: 3.2 mkin version used for pre-fitting: 1.2.6 R version used for fitting: 4.3.2 Date of fit: Thu Nov 16 04:59:35 2023 Date of summary: Thu Nov 16 04:59:35 2023 Equations: d_DMTA/dt = - ((k1 * g * exp(-k1 * time) + k2 * (1 - g) * exp(-k2 * time)) / (g * exp(-k1 * time) + (1 - g) * exp(-k2 * time))) * DMTA Data: 155 observations of 1 variable(s) grouped in 6 datasets Model predictions using solution type analytical Fitted in 4.4 s Using 300, 100 iterations and 9 chains Variance model: Two-component variance function Starting values for degradation parameters: DMTA_0 k1 k2 g 98.71186 0.08675 0.01374 0.93491 Fixed degradation parameter values: None Starting values for random effects (square root of initial entries in omega): DMTA_0 k1 k2 g DMTA_0 98.71 0 0 0 k1 0.00 1 0 0 k2 0.00 0 1 0 g 0.00 0 0 1 Starting values for error model parameters: a.1 b.1 1 1 Results: Likelihood computed by importance sampling AIC BIC logLik 663.7 661.8 -322.9 Optimised parameters: est. lower upper DMTA_0 98.256267 96.286112 100.22642 k1 0.064037 0.033281 0.09479 k2 0.008469 0.006002 0.01094 g 0.954167 0.914460 0.99387 a.1 1.061795 0.863943 1.25965 b.1 0.029550 0.022529 0.03657 SD.DMTA_0 2.068581 0.427706 3.70946 SD.k1 0.598285 0.258235 0.93833 SD.g 1.016689 0.360057 1.67332 Correlation: DMTA_0 k1 k2 k1 0.0213 k2 0.0541 0.0344 g -0.0521 -0.0286 -0.2744 Random effects: est. lower upper SD.DMTA_0 2.0686 0.4277 3.7095 SD.k1 0.5983 0.2582 0.9383 SD.g 1.0167 0.3601 1.6733 Variance model: est. lower upper a.1 1.06180 0.86394 1.25965 b.1 0.02955 0.02253 0.03657 Estimated disappearance times: DT50 DT90 DT50back DT50_k1 DT50_k2 DMTA 11.45 41.32 12.44 10.82 81.85"},{"path":"https://pkgdown.jrwb.de/mkin/articles/prebuilt/2022_dmta_parent.html","id":"alternative-check-of-parameter-identifiability","dir":"Articles > Prebuilt","previous_headings":"Hierarchichal model fits","what":"Alternative check of parameter identifiability","title":"Testing hierarchical parent degradation kinetics with residue data on dimethenamid and dimethenamid-P","text":"parameter check used illparms function based quadratic approximation likelihood surface near optimum, calculated using Fisher Information Matrix (FIM). alternative way check parameter identifiability (Duchesne et al. 2021) based multistart approach recently implemented mkin. graph shows boxplots parameters obtained 50 runs saem algorithm different parameter combinations, sampled range parameters obtained individual datasets fitted separately using nonlinear regression. Scaled parameters multistart runs, full model graph clearly confirms lack identifiability variance k2 full model. overparameterisation model also indicates lack identifiability variance parameter g. parameter boxplots multistart runs reduced model shown indicate runs give similar results, regardless starting parameters. Scaled parameters multistart runs, reduced model parameters top 25% fits shown (based feature introduced mkin 1.2.2 currently development), scatter even less shown . Scaled parameters multistart runs, reduced model, fits top 25% likelihood values","code":"f_saem_dfop_tc_multi <- multistart(f_saem[[\"DFOP\", \"tc\"]], n = 50, cores = 15) par(mar = c(6.1, 4.1, 2.1, 2.1)) parplot(f_saem_dfop_tc_multi, lpos = \"bottomright\", ylim = c(0.3, 10), las = 2) f_saem_dfop_tc_no_ranef_k2_multi <- multistart(f_saem_dfop_tc_no_ranef_k2, n = 50, cores = 15) par(mar = c(6.1, 4.1, 2.1, 2.1)) parplot(f_saem_dfop_tc_no_ranef_k2_multi, ylim = c(0.5, 2), las = 2, lpos = \"bottomright\") par(mar = c(6.1, 4.1, 2.1, 2.1)) parplot(f_saem_dfop_tc_no_ranef_k2_multi, ylim = c(0.5, 2), las = 2, llquant = 0.25, lpos = \"bottomright\")"},{"path":"https://pkgdown.jrwb.de/mkin/articles/prebuilt/2022_dmta_parent.html","id":"conclusions","dir":"Articles > Prebuilt","previous_headings":"","what":"Conclusions","title":"Testing hierarchical parent degradation kinetics with residue data on dimethenamid and dimethenamid-P","text":"Fitting four parent degradation models SFO, FOMC, DFOP HS part hierarchical model fits two different error models normal distributions transformed degradation parameters works without technical problems. biphasic models DFOP HS gave best fit data, default parameter distribution model fully identifiable. Removing random effect second kinetic rate constant DFOP model resulted reduced model fully identifiable showed lowest values model selection criteria AIC BIC. reliability identification model parameters confirmed using multiple starting values.","code":""},{"path":"https://pkgdown.jrwb.de/mkin/articles/prebuilt/2022_dmta_parent.html","id":"acknowledgements","dir":"Articles > Prebuilt","previous_headings":"","what":"Acknowledgements","title":"Testing hierarchical parent degradation kinetics with residue data on dimethenamid and dimethenamid-P","text":"helpful comments Janina Wöltjen German Environment Agency gratefully acknowledged.","code":""},{"path":[]},{"path":[]},{"path":"https://pkgdown.jrwb.de/mkin/articles/prebuilt/2022_dmta_parent.html","id":"hierarchical-model-fit-listings","dir":"Articles > Prebuilt","previous_headings":"Appendix","what":"Hierarchical model fit listings","title":"Testing hierarchical parent degradation kinetics with residue data on dimethenamid and dimethenamid-P","text":"Hierarchical mkin fit SFO model error model const Hierarchical mkin fit SFO model error model tc Hierarchical mkin fit FOMC model error model const Hierarchical mkin fit FOMC model error model tc Hierarchical mkin fit DFOP model error model const Hierarchical mkin fit DFOP model error model tc Hierarchical mkin fit HS model error model const Hierarchical mkin fit HS model error model tc","code":"saemix version used for fitting: 3.2 mkin version used for pre-fitting: 1.2.6 R version used for fitting: 4.3.2 Date of fit: Thu Nov 16 04:59:26 2023 Date of summary: Thu Nov 16 05:00:43 2023 Equations: d_DMTA/dt = - k_DMTA * DMTA Data: 155 observations of 1 variable(s) grouped in 6 datasets Model predictions using solution type analytical Fitted in 0.788 s Using 300, 100 iterations and 9 chains Variance model: Constant variance Starting values for degradation parameters: DMTA_0 k_DMTA 97.2953 0.0566 Fixed degradation parameter values: None Starting values for random effects (square root of initial entries in omega): DMTA_0 k_DMTA DMTA_0 97.3 0 k_DMTA 0.0 1 Starting values for error model parameters: a.1 1 Results: Likelihood computed by importance sampling AIC BIC logLik 796.3 795.3 -393.2 Optimised parameters: est. lower upper DMTA_0 97.28130 95.71113 98.8515 k_DMTA 0.05665 0.02909 0.0842 a.1 2.66442 2.35579 2.9731 SD.DMTA_0 1.54776 0.15447 2.9411 SD.k_DMTA 0.60690 0.26248 0.9513 Correlation: DMTA_0 k_DMTA 0.0168 Random effects: est. lower upper SD.DMTA_0 1.5478 0.1545 2.9411 SD.k_DMTA 0.6069 0.2625 0.9513 Variance model: est. lower upper a.1 2.664 2.356 2.973 Estimated disappearance times: DT50 DT90 DMTA 12.24 40.65 saemix version used for fitting: 3.2 mkin version used for pre-fitting: 1.2.6 R version used for fitting: 4.3.2 Date of fit: Thu Nov 16 04:59:28 2023 Date of summary: Thu Nov 16 05:00:43 2023 Equations: d_DMTA/dt = - k_DMTA * DMTA Data: 155 observations of 1 variable(s) grouped in 6 datasets Model predictions using solution type analytical Fitted in 2.428 s Using 300, 100 iterations and 9 chains Variance model: Two-component variance function Starting values for degradation parameters: DMTA_0 k_DMTA 96.99175 0.05603 Fixed degradation parameter values: None Starting values for random effects (square root of initial entries in omega): DMTA_0 k_DMTA DMTA_0 96.99 0 k_DMTA 0.00 1 Starting values for error model parameters: a.1 b.1 1 1 Results: Likelihood computed by importance sampling AIC BIC logLik 798.3 797.1 -393.2 Optimised parameters: est. lower upper DMTA_0 97.271822 95.703157 98.84049 k_DMTA 0.056638 0.029110 0.08417 a.1 2.660081 2.230398 3.08976 b.1 0.001665 -0.006911 0.01024 SD.DMTA_0 1.545520 0.145035 2.94601 SD.k_DMTA 0.606422 0.262274 0.95057 Correlation: DMTA_0 k_DMTA 0.0169 Random effects: est. lower upper SD.DMTA_0 1.5455 0.1450 2.9460 SD.k_DMTA 0.6064 0.2623 0.9506 Variance model: est. lower upper a.1 2.660081 2.230398 3.08976 b.1 0.001665 -0.006911 0.01024 Estimated disappearance times: DT50 DT90 DMTA 12.24 40.65 saemix version used for fitting: 3.2 mkin version used for pre-fitting: 1.2.6 R version used for fitting: 4.3.2 Date of fit: Thu Nov 16 04:59:27 2023 Date of summary: Thu Nov 16 05:00:43 2023 Equations: d_DMTA/dt = - (alpha/beta) * 1/((time/beta) + 1) * DMTA Data: 155 observations of 1 variable(s) grouped in 6 datasets Model predictions using solution type analytical Fitted in 1.28 s Using 300, 100 iterations and 9 chains Variance model: Constant variance Starting values for degradation parameters: DMTA_0 alpha beta 98.292 9.909 156.341 Fixed degradation parameter values: None Starting values for random effects (square root of initial entries in omega): DMTA_0 alpha beta DMTA_0 98.29 0 0 alpha 0.00 1 0 beta 0.00 0 1 Starting values for error model parameters: a.1 1 Results: Likelihood computed by importance sampling AIC BIC logLik 734.2 732.7 -360.1 Optimised parameters: est. lower upper DMTA_0 98.3435 96.9033 99.784 alpha 7.2007 2.5889 11.812 beta 112.8745 34.8816 190.867 a.1 2.0459 1.8054 2.286 SD.DMTA_0 1.4795 0.2717 2.687 SD.alpha 0.6396 0.1509 1.128 SD.beta 0.6874 0.1587 1.216 Correlation: DMTA_0 alpha alpha -0.1125 beta -0.1227 0.3632 Random effects: est. lower upper SD.DMTA_0 1.4795 0.2717 2.687 SD.alpha 0.6396 0.1509 1.128 SD.beta 0.6874 0.1587 1.216 Variance model: est. lower upper a.1 2.046 1.805 2.286 Estimated disappearance times: DT50 DT90 DT50back DMTA 11.41 42.53 12.8 saemix version used for fitting: 3.2 mkin version used for pre-fitting: 1.2.6 R version used for fitting: 4.3.2 Date of fit: Thu Nov 16 04:59:28 2023 Date of summary: Thu Nov 16 05:00:43 2023 Equations: d_DMTA/dt = - (alpha/beta) * 1/((time/beta) + 1) * DMTA Data: 155 observations of 1 variable(s) grouped in 6 datasets Model predictions using solution type analytical Fitted in 2.793 s Using 300, 100 iterations and 9 chains Variance model: Two-component variance function Starting values for degradation parameters: DMTA_0 alpha beta 98.772 4.663 92.597 Fixed degradation parameter values: None Starting values for random effects (square root of initial entries in omega): DMTA_0 alpha beta DMTA_0 98.77 0 0 alpha 0.00 1 0 beta 0.00 0 1 Starting values for error model parameters: a.1 b.1 1 1 Results: Likelihood computed by importance sampling AIC BIC logLik 720.7 719.1 -352.4 Optimised parameters: est. lower upper DMTA_0 99.10577 97.33296 100.87859 alpha 5.46260 2.52199 8.40321 beta 81.66080 30.46664 132.85497 a.1 1.50219 1.23601 1.76836 b.1 0.02893 0.02099 0.03687 SD.DMTA_0 1.61887 -0.03636 3.27411 SD.alpha 0.58145 0.17364 0.98925 SD.beta 0.68205 0.21108 1.15303 Correlation: DMTA_0 alpha alpha -0.1321 beta -0.1430 0.2467 Random effects: est. lower upper SD.DMTA_0 1.6189 -0.03636 3.2741 SD.alpha 0.5814 0.17364 0.9892 SD.beta 0.6821 0.21108 1.1530 Variance model: est. lower upper a.1 1.50219 1.23601 1.76836 b.1 0.02893 0.02099 0.03687 Estimated disappearance times: DT50 DT90 DT50back DMTA 11.05 42.81 12.89 saemix version used for fitting: 3.2 mkin version used for pre-fitting: 1.2.6 R version used for fitting: 4.3.2 Date of fit: Thu Nov 16 04:59:27 2023 Date of summary: Thu Nov 16 05:00:43 2023 Equations: d_DMTA/dt = - ((k1 * g * exp(-k1 * time) + k2 * (1 - g) * exp(-k2 * time)) / (g * exp(-k1 * time) + (1 - g) * exp(-k2 * time))) * DMTA Data: 155 observations of 1 variable(s) grouped in 6 datasets Model predictions using solution type analytical Fitted in 1.752 s Using 300, 100 iterations and 9 chains Variance model: Constant variance Starting values for degradation parameters: DMTA_0 k1 k2 g 98.64383 0.09211 0.02999 0.76814 Fixed degradation parameter values: None Starting values for random effects (square root of initial entries in omega): DMTA_0 k1 k2 g DMTA_0 98.64 0 0 0 k1 0.00 1 0 0 k2 0.00 0 1 0 g 0.00 0 0 1 Starting values for error model parameters: a.1 1 Results: Likelihood computed by importance sampling AIC BIC logLik 711.8 710 -346.9 Optimised parameters: est. lower upper DMTA_0 98.092481 96.573899 99.61106 k1 0.062499 0.030336 0.09466 k2 0.009065 -0.005133 0.02326 g 0.948967 0.862080 1.03586 a.1 1.821671 1.604774 2.03857 SD.DMTA_0 1.677785 0.472066 2.88350 SD.k1 0.634962 0.270788 0.99914 SD.k2 1.033498 -0.205994 2.27299 SD.g 1.710046 0.428642 2.99145 Correlation: DMTA_0 k1 k2 k1 0.0246 k2 0.0491 0.0953 g -0.0552 -0.0889 -0.4795 Random effects: est. lower upper SD.DMTA_0 1.678 0.4721 2.8835 SD.k1 0.635 0.2708 0.9991 SD.k2 1.033 -0.2060 2.2730 SD.g 1.710 0.4286 2.9914 Variance model: est. lower upper a.1 1.822 1.605 2.039 Estimated disappearance times: DT50 DT90 DT50back DT50_k1 DT50_k2 DMTA 11.79 42.8 12.88 11.09 76.46 saemix version used for fitting: 3.2 mkin version used for pre-fitting: 1.2.6 R version used for fitting: 4.3.2 Date of fit: Thu Nov 16 04:59:29 2023 Date of summary: Thu Nov 16 05:00:43 2023 Equations: d_DMTA/dt = - ((k1 * g * exp(-k1 * time) + k2 * (1 - g) * exp(-k2 * time)) / (g * exp(-k1 * time) + (1 - g) * exp(-k2 * time))) * DMTA Data: 155 observations of 1 variable(s) grouped in 6 datasets Model predictions using solution type analytical Fitted in 3.186 s Using 300, 100 iterations and 9 chains Variance model: Two-component variance function Starting values for degradation parameters: DMTA_0 k1 k2 g 98.71186 0.08675 0.01374 0.93491 Fixed degradation parameter values: None Starting values for random effects (square root of initial entries in omega): DMTA_0 k1 k2 g DMTA_0 98.71 0 0 0 k1 0.00 1 0 0 k2 0.00 0 1 0 g 0.00 0 0 1 Starting values for error model parameters: a.1 b.1 1 1 Results: Likelihood computed by importance sampling AIC BIC logLik 665.7 663.6 -322.9 Optimised parameters: est. lower upper DMTA_0 98.347470 96.380815 100.31413 k1 0.064524 0.034279 0.09477 k2 0.008304 0.005843 0.01076 g 0.952128 0.909578 0.99468 a.1 1.068907 0.868694 1.26912 b.1 0.029265 0.022262 0.03627 SD.DMTA_0 2.065796 0.428485 3.70311 SD.k1 0.583703 0.251796 0.91561 SD.k2 0.004167 -7.832168 7.84050 SD.g 1.064450 0.397476 1.73142 Correlation: DMTA_0 k1 k2 k1 0.0223 k2 0.0568 0.0394 g -0.0464 -0.0269 -0.2713 Random effects: est. lower upper SD.DMTA_0 2.065796 0.4285 3.7031 SD.k1 0.583703 0.2518 0.9156 SD.k2 0.004167 -7.8322 7.8405 SD.g 1.064450 0.3975 1.7314 Variance model: est. lower upper a.1 1.06891 0.86869 1.26912 b.1 0.02927 0.02226 0.03627 Estimated disappearance times: DT50 DT90 DT50back DT50_k1 DT50_k2 DMTA 11.39 41.36 12.45 10.74 83.48 saemix version used for fitting: 3.2 mkin version used for pre-fitting: 1.2.6 R version used for fitting: 4.3.2 Date of fit: Thu Nov 16 04:59:28 2023 Date of summary: Thu Nov 16 05:00:43 2023 Equations: d_DMTA/dt = - ifelse(time <= tb, k1, k2) * DMTA Data: 155 observations of 1 variable(s) grouped in 6 datasets Model predictions using solution type analytical Fitted in 2.28 s Using 300, 100 iterations and 9 chains Variance model: Constant variance Starting values for degradation parameters: DMTA_0 k1 k2 tb 97.82176 0.06931 0.02997 11.13945 Fixed degradation parameter values: None Starting values for random effects (square root of initial entries in omega): DMTA_0 k1 k2 tb DMTA_0 97.82 0 0 0 k1 0.00 1 0 0 k2 0.00 0 1 0 tb 0.00 0 0 1 Starting values for error model parameters: a.1 1 Results: Likelihood computed by importance sampling AIC BIC logLik 714 712.1 -348 Optimised parameters: est. lower upper DMTA_0 98.16102 96.47747 99.84456 k1 0.07876 0.05261 0.10491 k2 0.02227 0.01706 0.02747 tb 13.99089 -7.40049 35.38228 a.1 1.82305 1.60700 2.03910 SD.DMTA_0 1.88413 0.56204 3.20622 SD.k1 0.34292 0.10482 0.58102 SD.k2 0.19851 0.01718 0.37985 SD.tb 1.68168 0.58064 2.78272 Correlation: DMTA_0 k1 k2 k1 0.0142 k2 0.0001 -0.0025 tb 0.0165 -0.1256 -0.0301 Random effects: est. lower upper SD.DMTA_0 1.8841 0.56204 3.2062 SD.k1 0.3429 0.10482 0.5810 SD.k2 0.1985 0.01718 0.3798 SD.tb 1.6817 0.58064 2.7827 Variance model: est. lower upper a.1 1.823 1.607 2.039 Estimated disappearance times: DT50 DT90 DT50back DT50_k1 DT50_k2 DMTA 8.801 67.91 20.44 8.801 31.13 saemix version used for fitting: 3.2 mkin version used for pre-fitting: 1.2.6 R version used for fitting: 4.3.2 Date of fit: Thu Nov 16 04:59:29 2023 Date of summary: Thu Nov 16 05:00:43 2023 Equations: d_DMTA/dt = - ifelse(time <= tb, k1, k2) * DMTA Data: 155 observations of 1 variable(s) grouped in 6 datasets Model predictions using solution type analytical Fitted in 3.658 s Using 300, 100 iterations and 9 chains Variance model: Two-component variance function Starting values for degradation parameters: DMTA_0 k1 k2 tb 98.45190 0.07525 0.02576 19.19375 Fixed degradation parameter values: None Starting values for random effects (square root of initial entries in omega): DMTA_0 k1 k2 tb DMTA_0 98.45 0 0 0 k1 0.00 1 0 0 k2 0.00 0 1 0 tb 0.00 0 0 1 Starting values for error model parameters: a.1 b.1 1 1 Results: Likelihood computed by importance sampling AIC BIC logLik 667.1 665 -323.6 Optimised parameters: est. lower upper DMTA_0 97.76571 95.81350 99.71791 k1 0.05855 0.03080 0.08630 k2 0.02337 0.01664 0.03010 tb 31.09638 29.38289 32.80987 a.1 1.08835 0.88590 1.29080 b.1 0.02964 0.02257 0.03671 SD.DMTA_0 2.04877 0.42607 3.67147 SD.k1 0.59166 0.25621 0.92711 SD.k2 0.30698 0.09561 0.51835 SD.tb 0.01274 -0.10914 0.13462 Correlation: DMTA_0 k1 k2 k1 0.0160 k2 -0.0070 -0.0024 tb -0.0668 -0.0103 -0.2013 Random effects: est. lower upper SD.DMTA_0 2.04877 0.42607 3.6715 SD.k1 0.59166 0.25621 0.9271 SD.k2 0.30698 0.09561 0.5183 SD.tb 0.01274 -0.10914 0.1346 Variance model: est. lower upper a.1 1.08835 0.88590 1.29080 b.1 0.02964 0.02257 0.03671 Estimated disappearance times: DT50 DT90 DT50back DT50_k1 DT50_k2 DMTA 11.84 51.71 15.57 11.84 29.66"},{"path":"https://pkgdown.jrwb.de/mkin/articles/prebuilt/2022_dmta_parent.html","id":"hierarchical-model-convergence-plots","dir":"Articles > Prebuilt","previous_headings":"Appendix","what":"Hierarchical model convergence plots","title":"Testing hierarchical parent degradation kinetics with residue data on dimethenamid and dimethenamid-P","text":"Convergence plot NLHM SFO fit constant variance Convergence plot NLHM SFO fit two-component error Convergence plot NLHM FOMC fit constant variance Convergence plot NLHM FOMC fit two-component error Convergence plot NLHM DFOP fit constant variance Convergence plot NLHM DFOP fit two-component error Convergence plot NLHM HS fit constant variance Convergence plot NLHM HS fit two-component error","code":""},{"path":"https://pkgdown.jrwb.de/mkin/articles/prebuilt/2022_dmta_parent.html","id":"session-info","dir":"Articles > Prebuilt","previous_headings":"Appendix","what":"Session info","title":"Testing hierarchical parent degradation kinetics with residue data on dimethenamid and dimethenamid-P","text":"","code":"R version 4.3.2 (2023-10-31) Platform: x86_64-pc-linux-gnu (64-bit) Running under: Debian GNU/Linux 12 (bookworm) Matrix products: default BLAS: /usr/lib/x86_64-linux-gnu/blas/libblas.so.3.11.0 LAPACK: /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3.11.0 locale: [1] LC_CTYPE=de_DE.UTF-8 LC_NUMERIC=C [3] LC_TIME=de_DE.UTF-8 LC_COLLATE=de_DE.UTF-8 [5] LC_MONETARY=de_DE.UTF-8 LC_MESSAGES=de_DE.UTF-8 [7] LC_PAPER=de_DE.UTF-8 LC_NAME=C [9] LC_ADDRESS=C LC_TELEPHONE=C [11] LC_MEASUREMENT=de_DE.UTF-8 LC_IDENTIFICATION=C time zone: Europe/Berlin tzcode source: system (glibc) attached base packages: [1] parallel stats graphics grDevices utils datasets methods [8] base other attached packages: [1] saemix_3.2 npde_3.3 knitr_1.42 mkin_1.2.6 loaded via a namespace (and not attached): [1] sass_0.4.6 utf8_1.2.3 generics_0.1.3 stringi_1.7.12 [5] lattice_0.21-8 digest_0.6.31 magrittr_2.0.3 evaluate_0.21 [9] grid_4.3.2 fastmap_1.1.1 rprojroot_2.0.3 jsonlite_1.8.4 [13] DBI_1.1.3 mclust_6.0.0 gridExtra_2.3 purrr_1.0.1 [17] fansi_1.0.4 scales_1.2.1 codetools_0.2-19 textshaping_0.3.6 [21] jquerylib_0.1.4 cli_3.6.1 rlang_1.1.1 munsell_0.5.0 [25] cachem_1.0.8 yaml_2.3.7 tools_4.3.2 memoise_2.0.1 [29] dplyr_1.1.2 colorspace_2.1-0 ggplot2_3.4.2 vctrs_0.6.2 [33] R6_2.5.1 zoo_1.8-12 lifecycle_1.0.3 stringr_1.5.0 [37] fs_1.6.2 MASS_7.3-60 ragg_1.2.5 pkgconfig_2.0.3 [41] desc_1.4.2 pkgdown_2.0.7 bslib_0.4.2 pillar_1.9.0 [45] gtable_0.3.3 glue_1.6.2 systemfonts_1.0.4 highr_0.10 [49] xfun_0.39 tibble_3.2.1 lmtest_0.9-40 tidyselect_1.2.0 [53] htmltools_0.5.5 nlme_3.1-163 rmarkdown_2.21 compiler_4.3.2"},{"path":"https://pkgdown.jrwb.de/mkin/articles/prebuilt/2022_dmta_parent.html","id":"hardware-info","dir":"Articles > Prebuilt","previous_headings":"Appendix","what":"Hardware info","title":"Testing hierarchical parent degradation kinetics with residue data on dimethenamid and dimethenamid-P","text":"","code":"CPU model: AMD Ryzen 9 7950X 16-Core Processor MemTotal: 64927712 kB"},{"path":"https://pkgdown.jrwb.de/mkin/articles/prebuilt/2022_dmta_pathway.html","id":"introduction","dir":"Articles > Prebuilt","previous_headings":"","what":"Introduction","title":"Testing hierarchical pathway kinetics with residue data on dimethenamid and dimethenamid-P","text":"purpose document test demonstrate nonlinear hierarchical models (NLHM) based parent degradation models SFO, FOMC, DFOP HS, parallel formation two metabolites can fitted mkin package. assembled course work package 1.2 Project Number 173340 (Application nonlinear hierarchical models kinetic evaluation chemical degradation data) German Environment Agency carried 2022 2023. mkin package used version 1.2.6, currently development. contains test data, functions used evaluations. saemix package used backend fitting NLHM, also loaded make convergence plot function available. document processed knitr package, also provides kable function used improve display tabular data R markdown documents. parallel processing, parallel package used.","code":"library(mkin) library(knitr) library(saemix) library(parallel) n_cores <- detectCores() # We need to start a new cluster after defining a compiled model that is # saved as a DLL to the user directory, therefore we define a function # This is used again after defining the pathway model start_cluster <- function(n_cores) { if (Sys.info()[\"sysname\"] == \"Windows\") { ret <- makePSOCKcluster(n_cores) } else { ret <- makeForkCluster(n_cores) } return(ret) }"},{"path":"https://pkgdown.jrwb.de/mkin/articles/prebuilt/2022_dmta_pathway.html","id":"data","dir":"Articles > Prebuilt","previous_headings":"","what":"Data","title":"Testing hierarchical pathway kinetics with residue data on dimethenamid and dimethenamid-P","text":"test data available mkin package object class mkindsg (mkin dataset group) identifier dimethenamid_2018. following preprocessing steps done document. data available enantiomer dimethenamid-P (DMTAP) renamed substance name data racemic mixture dimethenamid (DMTA). reason difference degradation behaviour identified EU risk assessment. Unnecessary columns discarded observation times dataset multiplied corresponding normalisation factor also available dataset, order make possible describe datasets single set parameters independent temperature Finally, datasets observed soil (Elliot 1 Elliot 2) combined, resulting dimethenamid (DMTA) data six soils. following commented R code performs preprocessing. following tables show 6 datasets. Dataset Calke Dataset Borstel Dataset Flaach Dataset BBA 2.2 Dataset BBA 2.3 Dataset Elliot","code":"# Apply a function to each of the seven datasets in the mkindsg object to create a list dmta_ds <- lapply(1:7, function(i) { ds_i <- dimethenamid_2018$ds[[i]]$data # Get a dataset ds_i[ds_i$name == \"DMTAP\", \"name\"] <- \"DMTA\" # Rename DMTAP to DMTA ds_i <- subset(ds_i, select = c(\"name\", \"time\", \"value\")) # Select data ds_i$time <- ds_i$time * dimethenamid_2018$f_time_norm[i] # Normalise time ds_i # Return the dataset }) # Use dataset titles as names for the list elements names(dmta_ds) <- sapply(dimethenamid_2018$ds, function(ds) ds$title) # Combine data for Elliot soil to obtain a named list with six elements dmta_ds[[\"Elliot\"]] <- rbind(dmta_ds[[\"Elliot 1\"]], dmta_ds[[\"Elliot 2\"]]) # dmta_ds[[\"Elliot 1\"]] <- NULL dmta_ds[[\"Elliot 2\"]] <- NULL for (ds_name in names(dmta_ds)) { print( kable(mkin_long_to_wide(dmta_ds[[ds_name]]), caption = paste(\"Dataset\", ds_name), booktabs = TRUE, row.names = FALSE)) cat(\"\\n\\\\clearpage\\n\") }"},{"path":"https://pkgdown.jrwb.de/mkin/articles/prebuilt/2022_dmta_pathway.html","id":"separate-evaluations","dir":"Articles > Prebuilt","previous_headings":"","what":"Separate evaluations","title":"Testing hierarchical pathway kinetics with residue data on dimethenamid and dimethenamid-P","text":"first step obtain suitable starting parameters NLHM fits, separate fits several variants pathway model used previously (Ranke et al. 2021), varying kinetic model parent compound. SFORB model often provides faster convergence DFOP model, can sometimes fitted DFOP model results errors, included set parent models tested . separate pathway fits SFO FOMC parent constant variance converged (status OK). fits DFOP SFORB parent converged well. fits HS parent converge default settings. two-component error model, set fits convergence problems slightly different, convergence problems appearing different data sets applying DFOP SFORB model additional convergence problems using FOMC model parent.","code":"if (!dir.exists(\"dmta_dlls\")) dir.create(\"dmta_dlls\") m_sfo_path_1 <- mkinmod( DMTA = mkinsub(\"SFO\", c(\"M23\", \"M27\", \"M31\")), M23 = mkinsub(\"SFO\"), M27 = mkinsub(\"SFO\"), M31 = mkinsub(\"SFO\", \"M27\", sink = FALSE), name = \"m_sfo_path\", dll_dir = \"dmta_dlls\", unload = TRUE, overwrite = TRUE, quiet = TRUE ) m_fomc_path_1 <- mkinmod( DMTA = mkinsub(\"FOMC\", c(\"M23\", \"M27\", \"M31\")), M23 = mkinsub(\"SFO\"), M27 = mkinsub(\"SFO\"), M31 = mkinsub(\"SFO\", \"M27\", sink = FALSE), name = \"m_fomc_path\", dll_dir = \"dmta_dlls\", unload = TRUE, overwrite = TRUE, quiet = TRUE ) m_dfop_path_1 <- mkinmod( DMTA = mkinsub(\"DFOP\", c(\"M23\", \"M27\", \"M31\")), M23 = mkinsub(\"SFO\"), M27 = mkinsub(\"SFO\"), M31 = mkinsub(\"SFO\", \"M27\", sink = FALSE), name = \"m_dfop_path\", dll_dir = \"dmta_dlls\", unload = TRUE, overwrite = TRUE, quiet = TRUE ) m_sforb_path_1 <- mkinmod( DMTA = mkinsub(\"SFORB\", c(\"M23\", \"M27\", \"M31\")), M23 = mkinsub(\"SFO\"), M27 = mkinsub(\"SFO\"), M31 = mkinsub(\"SFO\", \"M27\", sink = FALSE), name = \"m_sforb_path\", dll_dir = \"dmta_dlls\", unload = TRUE, overwrite = TRUE, quiet = TRUE ) m_hs_path_1 <- mkinmod( DMTA = mkinsub(\"HS\", c(\"M23\", \"M27\", \"M31\")), M23 = mkinsub(\"SFO\"), M27 = mkinsub(\"SFO\"), M31 = mkinsub(\"SFO\", \"M27\", sink = FALSE), name = \"m_hs_path\", dll_dir = \"dmta_dlls\", unload = TRUE, overwrite = TRUE, quiet = TRUE ) cl <- start_cluster(n_cores) deg_mods_1 <- list( sfo_path_1 = m_sfo_path_1, fomc_path_1 = m_fomc_path_1, dfop_path_1 = m_dfop_path_1, sforb_path_1 = m_sforb_path_1, hs_path_1 = m_hs_path_1) sep_1_const <- mmkin( deg_mods_1, dmta_ds, error_model = \"const\", quiet = TRUE) status(sep_1_const) |> kable() sep_1_tc <- update(sep_1_const, error_model = \"tc\") status(sep_1_tc) |> kable()"},{"path":"https://pkgdown.jrwb.de/mkin/articles/prebuilt/2022_dmta_pathway.html","id":"hierarchichal-model-fits","dir":"Articles > Prebuilt","previous_headings":"","what":"Hierarchichal model fits","title":"Testing hierarchical pathway kinetics with residue data on dimethenamid and dimethenamid-P","text":"following code fits two sets corresponding hierarchical models data, one assuming constant variance, one assuming two-component error. run time fits around two hours five year old hardware. recent hardware upgrade fits complete less twenty minutes. According status function, fits terminated successfully. goodness--fit models compared, warning obtained, indicating likelihood pathway fit SFORB parent compound constant variance calculated importance sampling (method ‘’). default method AIC BIC comparisons based, variant included model comparison table. Comparing goodness--fit remaining models, HS model model two-component error provides best fit. However, batch experiments performed constant conditions experiments evaluated , reason assume discontinuity, SFORB model preferable mechanistic viewpoint. addition, information criteria AIC BIC similar HS SFORB. Therefore, SFORB model selected refinements.","code":"saem_1 <- mhmkin(list(sep_1_const, sep_1_tc)) status(saem_1) |> kable() anova(saem_1) |> kable(digits = 1)"},{"path":"https://pkgdown.jrwb.de/mkin/articles/prebuilt/2022_dmta_pathway.html","id":"parameter-identifiability-based-on-the-fisher-information-matrix","dir":"Articles > Prebuilt","previous_headings":"Hierarchichal model fits","what":"Parameter identifiability based on the Fisher Information Matrix","title":"Testing hierarchical pathway kinetics with residue data on dimethenamid and dimethenamid-P","text":"Using illparms function, ill-defined statistical model parameters standard deviations degradation parameters population error model parameters can found. using constant variance, ill-defined variance parameters identified illparms function degradation models. using two-component error model, one ill-defined variance parameter variants except variant using DFOP parent compound. selected combination SFORB pathway model two-component error, random effect rate constant reversibly bound DMTA free DMTA (k_DMTA_bound_free) well-defined. Therefore, fit updated without assuming random effect parameter. expected, ill-defined parameters remain. model comparison shows reduced model preferable. convergence plot refined fit shown . parameters, example f_DMTA_ilr_1 f_DMTA_ilr_2, .e. two parameters determining formation fractions parallel formation three metabolites, movement parameters still visible second phase algorithm. However, amplitude movement range amplitude towards end first phase. Therefore, likely increase iterations improve parameter estimates much, proposed fit acceptable. numeric convergence criterion implemented saemix.","code":"illparms(saem_1) |> kable() saem_sforb_path_1_tc_reduced <- update(saem_1[[\"sforb_path_1\", \"tc\"]], no_random_effect = \"log_k_DMTA_bound_free\") illparms(saem_sforb_path_1_tc_reduced) anova(saem_1[[\"sforb_path_1\", \"tc\"]], saem_sforb_path_1_tc_reduced) |> kable(digits = 1) plot(saem_sforb_path_1_tc_reduced$so, plot.type = \"convergence\")"},{"path":"https://pkgdown.jrwb.de/mkin/articles/prebuilt/2022_dmta_pathway.html","id":"alternative-check-of-parameter-identifiability","dir":"Articles > Prebuilt","previous_headings":"Hierarchichal model fits","what":"Alternative check of parameter identifiability","title":"Testing hierarchical pathway kinetics with residue data on dimethenamid and dimethenamid-P","text":"alternative check parameter identifiability (Duchesne et al. 2021), multistart runs performed basis refined fit shown . 32 fits initiated, 17 terminated without error. reason wide variation starting parameters combination parameter variation used SAEM algorithm leads parameter combinations degradation model numerical integration routine cope . variation initial parameters, model fits take two times time original fit. Parameter boxplots multistart runs succeeded However, visual analysis boxplot parameters obtained successful fits confirms results sufficiently independent starting parameters, remaining ill-defined parameters.","code":"saem_sforb_path_1_tc_reduced_multi <- multistart(saem_sforb_path_1_tc_reduced, n = 32, cores = 10) print(saem_sforb_path_1_tc_reduced_multi) <multistart> object with 32 fits: E OK 7 25 OK: Fit terminated successfully E: Error par(mar = c(12.1, 4.1, 2.1, 2.1)) parplot(saem_sforb_path_1_tc_reduced_multi, ylim = c(0.5, 2), las = 2)"},{"path":"https://pkgdown.jrwb.de/mkin/articles/prebuilt/2022_dmta_pathway.html","id":"plots-of-selected-fits","dir":"Articles > Prebuilt","previous_headings":"","what":"Plots of selected fits","title":"Testing hierarchical pathway kinetics with residue data on dimethenamid and dimethenamid-P","text":"SFORB pathway fits full reduced parameter distribution model shown . SFORB pathway fit two-component error SFORB pathway fit two-component error, reduced parameter model Plots remaining fits listings successful fits shown Appendix.","code":"plot(saem_1[[\"sforb_path_1\", \"tc\"]]) plot(saem_sforb_path_1_tc_reduced) stopCluster(cl)"},{"path":"https://pkgdown.jrwb.de/mkin/articles/prebuilt/2022_dmta_pathway.html","id":"conclusions","dir":"Articles > Prebuilt","previous_headings":"","what":"Conclusions","title":"Testing hierarchical pathway kinetics with residue data on dimethenamid and dimethenamid-P","text":"Pathway fits SFO, FOMC, DFOP, SFORB HS models parent compound successfully performed.","code":""},{"path":"https://pkgdown.jrwb.de/mkin/articles/prebuilt/2022_dmta_pathway.html","id":"acknowledgements","dir":"Articles > Prebuilt","previous_headings":"","what":"Acknowledgements","title":"Testing hierarchical pathway kinetics with residue data on dimethenamid and dimethenamid-P","text":"helpful comments Janina Wöltjen German Environment Agency earlier versions document gratefully acknowledged.","code":""},{"path":[]},{"path":[]},{"path":"https://pkgdown.jrwb.de/mkin/articles/prebuilt/2022_dmta_pathway.html","id":"plots-of-hierarchical-fits-not-selected-for-refinement","dir":"Articles > Prebuilt","previous_headings":"Appendix","what":"Plots of hierarchical fits not selected for refinement","title":"Testing hierarchical pathway kinetics with residue data on dimethenamid and dimethenamid-P","text":"SFO pathway fit two-component error FOMC pathway fit two-component error HS pathway fit two-component error","code":"plot(saem_1[[\"sfo_path_1\", \"tc\"]]) plot(saem_1[[\"fomc_path_1\", \"tc\"]]) plot(saem_1[[\"sforb_path_1\", \"tc\"]])"},{"path":[]},{"path":[]},{"path":[]},{"path":"https://pkgdown.jrwb.de/mkin/articles/prebuilt/2022_dmta_pathway.html","id":"session-info","dir":"Articles > Prebuilt","previous_headings":"Appendix","what":"Session info","title":"Testing hierarchical pathway kinetics with residue data on dimethenamid and dimethenamid-P","text":"","code":"R version 4.3.2 (2023-10-31) Platform: x86_64-pc-linux-gnu (64-bit) Running under: Debian GNU/Linux 12 (bookworm) Matrix products: default BLAS: /usr/lib/x86_64-linux-gnu/blas/libblas.so.3.11.0 LAPACK: /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3.11.0 locale: [1] LC_CTYPE=de_DE.UTF-8 LC_NUMERIC=C [3] LC_TIME=de_DE.UTF-8 LC_COLLATE=de_DE.UTF-8 [5] LC_MONETARY=de_DE.UTF-8 LC_MESSAGES=de_DE.UTF-8 [7] LC_PAPER=de_DE.UTF-8 LC_NAME=C [9] LC_ADDRESS=C LC_TELEPHONE=C [11] LC_MEASUREMENT=de_DE.UTF-8 LC_IDENTIFICATION=C time zone: Europe/Berlin tzcode source: system (glibc) attached base packages: [1] parallel stats graphics grDevices utils datasets methods [8] base other attached packages: [1] saemix_3.2 npde_3.3 knitr_1.42 mkin_1.2.6 loaded via a namespace (and not attached): [1] sass_0.4.6 utf8_1.2.3 generics_0.1.3 stringi_1.7.12 [5] lattice_0.21-8 digest_0.6.31 magrittr_2.0.3 evaluate_0.21 [9] grid_4.3.2 fastmap_1.1.1 rprojroot_2.0.3 jsonlite_1.8.4 [13] processx_3.8.1 pkgbuild_1.4.0 deSolve_1.35 DBI_1.1.3 [17] mclust_6.0.0 ps_1.7.5 gridExtra_2.3 purrr_1.0.1 [21] fansi_1.0.4 scales_1.2.1 codetools_0.2-19 textshaping_0.3.6 [25] jquerylib_0.1.4 cli_3.6.1 crayon_1.5.2 rlang_1.1.1 [29] munsell_0.5.0 cachem_1.0.8 yaml_2.3.7 inline_0.3.19 [33] tools_4.3.2 memoise_2.0.1 dplyr_1.1.2 colorspace_2.1-0 [37] ggplot2_3.4.2 vctrs_0.6.2 R6_2.5.1 zoo_1.8-12 [41] lifecycle_1.0.3 stringr_1.5.0 fs_1.6.2 MASS_7.3-60 [45] ragg_1.2.5 callr_3.7.3 pkgconfig_2.0.3 desc_1.4.2 [49] pkgdown_2.0.7 bslib_0.4.2 pillar_1.9.0 gtable_0.3.3 [53] glue_1.6.2 systemfonts_1.0.4 highr_0.10 xfun_0.39 [57] tibble_3.2.1 lmtest_0.9-40 tidyselect_1.2.0 htmltools_0.5.5 [61] nlme_3.1-163 rmarkdown_2.21 compiler_4.3.2 prettyunits_1.1.1"},{"path":"https://pkgdown.jrwb.de/mkin/articles/prebuilt/2022_dmta_pathway.html","id":"hardware-info","dir":"Articles > Prebuilt","previous_headings":"Appendix","what":"Hardware info","title":"Testing hierarchical pathway kinetics with residue data on dimethenamid and dimethenamid-P","text":"","code":"CPU model: AMD Ryzen 9 7950X 16-Core Processor MemTotal: 64927712 kB"},{"path":"https://pkgdown.jrwb.de/mkin/articles/prebuilt/2023_mesotrione_parent.html","id":"introduction","dir":"Articles > Prebuilt","previous_headings":"","what":"Introduction","title":"Testing covariate modelling in hierarchical parent degradation kinetics with residue data on mesotrione","text":"purpose document test demonstrate nonlinear hierarchical models (NLHM) based parent degradation models SFO, FOMC, DFOP HS can fitted mkin package, also considering influence covariates like soil pH different degradation parameters. case studies, SFORB parameterisation biexponential decline shown advantages DFOP parameterisation, SFORB included list tested models well. mkin package used version 1.2.6, contains functions used evaluations. saemix package used backend fitting NLHM, also loaded make convergence plot function available. document processed knitr package, also provides kable function used improve display tabular data R markdown documents. parallel processing, parallel package used.","code":"library(mkin) library(knitr) library(saemix) library(parallel) n_cores <- detectCores() if (Sys.info()[\"sysname\"] == \"Windows\") { cl <- makePSOCKcluster(n_cores) } else { cl <- makeForkCluster(n_cores) }"},{"path":"https://pkgdown.jrwb.de/mkin/articles/prebuilt/2023_mesotrione_parent.html","id":"test-data","dir":"Articles > Prebuilt","previous_headings":"Introduction","what":"Test data","title":"Testing covariate modelling in hierarchical parent degradation kinetics with residue data on mesotrione","text":"following tables show covariate data 18 datasets read spreadsheet file. Covariate data Dataset Richmond Dataset Richmond 2 Dataset ERTC Dataset Toulouse Dataset Picket Piece Dataset 721 Dataset 722 Dataset 723 Dataset 724 Dataset 725 Dataset 727 Dataset 728 Dataset 729 Dataset 730 Dataset 731 Dataset 732 Dataset 741 Dataset 742","code":"data_file <- system.file( \"testdata\", \"mesotrione_soil_efsa_2016.xlsx\", package = \"mkin\") meso_ds <- read_spreadsheet(data_file, parent_only = TRUE) pH <- attr(meso_ds, \"covariates\") kable(pH, caption = \"Covariate data\") for (ds_name in names(meso_ds)) { print( kable(mkin_long_to_wide(meso_ds[[ds_name]]), caption = paste(\"Dataset\", ds_name), booktabs = TRUE, row.names = FALSE)) }"},{"path":"https://pkgdown.jrwb.de/mkin/articles/prebuilt/2023_mesotrione_parent.html","id":"separate-evaluations","dir":"Articles > Prebuilt","previous_headings":"","what":"Separate evaluations","title":"Testing covariate modelling in hierarchical parent degradation kinetics with residue data on mesotrione","text":"order obtain suitable starting parameters NLHM fits, separate fits five models data soil generated using mmkin function mkin package. first step, constant variance assumed. Convergence checked status function. tables , OK indicates convergence C indicates failure converge. separate fits constant variance converged, exception two FOMC fits, one SFORB fit one HS fit. two-component error model, set fits converge larger, convergence problems appearing number non-SFO fits.","code":"deg_mods <- c(\"SFO\", \"FOMC\", \"DFOP\", \"SFORB\", \"HS\") f_sep_const <- mmkin( deg_mods, meso_ds, error_model = \"const\", cluster = cl, quiet = TRUE) status(f_sep_const[, 1:5]) |> kable() status(f_sep_const[, 6:18]) |> kable() f_sep_tc <- update(f_sep_const, error_model = \"tc\") status(f_sep_tc[, 1:5]) |> kable() status(f_sep_tc[, 6:18]) |> kable()"},{"path":"https://pkgdown.jrwb.de/mkin/articles/prebuilt/2023_mesotrione_parent.html","id":"hierarchical-model-fits-without-covariate-effect","dir":"Articles > Prebuilt","previous_headings":"","what":"Hierarchical model fits without covariate effect","title":"Testing covariate modelling in hierarchical parent degradation kinetics with residue data on mesotrione","text":"following code fits hierarchical kinetic models ten combinations five different degradation models two different error models parallel. fits terminate without errors (status OK). model comparisons show fits constant variance consistently preferable corresponding fits two-component error data. confirmed fact parameter b.1 (relative standard deviation fits obtained saemix package), ill-defined fits. obtaining fits well-defined random effects, update set fits, excluding random effects ill-defined according illparms function. updated fits terminate without errors. ill-defined errors remain fits constant variance.","code":"f_saem_1 <- mhmkin(list(f_sep_const, f_sep_tc), cluster = cl) status(f_saem_1) |> kable() anova(f_saem_1) |> kable(digits = 1) illparms(f_saem_1) |> kable() f_saem_2 <- update(f_saem_1, no_random_effect = illparms(f_saem_1)) status(f_saem_2) |> kable() illparms(f_saem_2) |> kable()"},{"path":"https://pkgdown.jrwb.de/mkin/articles/prebuilt/2023_mesotrione_parent.html","id":"hierarchical-model-fits-with-covariate-effect","dir":"Articles > Prebuilt","previous_headings":"","what":"Hierarchical model fits with covariate effect","title":"Testing covariate modelling in hierarchical parent degradation kinetics with residue data on mesotrione","text":"following sections, hierarchical fits including model influence pH selected degradation parameters shown parent models. Constant variance selected error model based fits without covariate effects. Random effects ill-defined fits without pH influence excluded. potential influence soil pH included parameters well-defined random effect, experience shown parameters significant pH effect found.","code":""},{"path":"https://pkgdown.jrwb.de/mkin/articles/prebuilt/2023_mesotrione_parent.html","id":"sfo","dir":"Articles > Prebuilt","previous_headings":"Hierarchical model fits with covariate effect","what":"SFO","title":"Testing covariate modelling in hierarchical parent degradation kinetics with residue data on mesotrione","text":"parameter showing pH influence table beta_pH(log_k_meso). confidence interval include zero, indicating influence soil pH log degradation rate constant significantly greater zero. comparison SFO fit without covariate effect confirms considering soil pH improves model, comparison AIC BIC likelihood ratio test. Endpoints model covariates default calculated median covariate values. quantile can adapted, specific covariate value can given shown .","code":"sfo_pH <- saem(f_sep_const[\"SFO\", ], no_random_effect = \"meso_0\", covariates = pH, covariate_models = list(log_k_meso ~ pH)) summary(sfo_pH)$confint_trans |> kable(digits = 2) anova(f_saem_2[[\"SFO\", \"const\"]], sfo_pH, test = TRUE) Data: 116 observations of 1 variable(s) grouped in 18 datasets npar AIC BIC Lik Chisq Df Pr(>Chisq) f_saem_2[[\"SFO\", \"const\"]] 4 797.56 801.12 -394.78 sfo_pH 5 783.09 787.54 -386.54 16.473 1 4.934e-05 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 plot(sfo_pH) endpoints(sfo_pH) $covariates pH 50% 5.75 $distimes DT50 DT90 meso 18.52069 61.52441 endpoints(sfo_pH, covariate_quantile = 0.9) $covariates pH 90% 7.13 $distimes DT50 DT90 meso 8.237019 27.36278 endpoints(sfo_pH, covariates = c(pH = 7.0)) $covariates pH User 7 $distimes DT50 DT90 meso 8.89035 29.5331"},{"path":"https://pkgdown.jrwb.de/mkin/articles/prebuilt/2023_mesotrione_parent.html","id":"fomc","dir":"Articles > Prebuilt","previous_headings":"Hierarchical model fits with covariate effect","what":"FOMC","title":"Testing covariate modelling in hierarchical parent degradation kinetics with residue data on mesotrione","text":"case SFO, confidence interval slope parameter (beta_pH(log_alpha)) quantifying influence soil pH include zero, model comparison clearly indicates model covariate influence preferable. However, random effect alpha well-defined inclusion covariate effect (confidence interval SD.log_alpha includes zero). Therefore, model updated without random effect, ill-defined parameters remain. Model comparison indicates including pH dependence significantly improves fit, reduced model covariate influence results preferable FOMC fit.","code":"fomc_pH <- saem(f_sep_const[\"FOMC\", ], no_random_effect = \"meso_0\", covariates = pH, covariate_models = list(log_alpha ~ pH)) summary(fomc_pH)$confint_trans |> kable(digits = 2) illparms(fomc_pH) [1] \"sd(log_alpha)\" fomc_pH_2 <- update(fomc_pH, no_random_effect = c(\"meso_0\", \"log_alpha\")) illparms(fomc_pH_2) anova(f_saem_2[[\"FOMC\", \"const\"]], fomc_pH, fomc_pH_2, test = TRUE) Data: 116 observations of 1 variable(s) grouped in 18 datasets npar AIC BIC Lik Chisq Df Pr(>Chisq) f_saem_2[[\"FOMC\", \"const\"]] 5 783.25 787.71 -386.63 fomc_pH_2 6 767.49 772.83 -377.75 17.762 1 2.503e-05 *** fomc_pH 7 770.07 776.30 -378.04 0.000 1 1 --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 summary(fomc_pH_2)$confint_trans |> kable(digits = 2) plot(fomc_pH_2) endpoints(fomc_pH_2) $covariates pH 50% 5.75 $distimes DT50 DT90 DT50back meso 17.30248 82.91343 24.95943 endpoints(fomc_pH_2, covariates = c(pH = 7)) $covariates pH User 7 $distimes DT50 DT90 DT50back meso 6.986239 27.02927 8.136621"},{"path":"https://pkgdown.jrwb.de/mkin/articles/prebuilt/2023_mesotrione_parent.html","id":"dfop","dir":"Articles > Prebuilt","previous_headings":"Hierarchical model fits with covariate effect","what":"DFOP","title":"Testing covariate modelling in hierarchical parent degradation kinetics with residue data on mesotrione","text":"DFOP fits without covariate effects, random effects two degradation parameters (k2 g) identifiable. fit pH dependent degradation parameters obtained excluding random effects refined DFOP fit without covariate influence, including covariate models two identifiable parameters k2 g. corresponding parameters influence soil pH beta_pH(log_k2) influence soil pH k2, beta_pH(g_qlogis) influence g. Confidence intervals neither include zero, indicating significant difference zero. However, random effect g now ill-defined. fit updated without ill-defined random effect. Now, slope parameter pH effect g ill-defined. Therefore, another attempt made without corresponding covariate model. random effect g ill-defined, fit repeated without . ill-defined parameters remain, model comparison suggests previous model dfop_pH_2 two pH dependent parameters preferable, based information criteria well based likelihood ratio test. focussing parameter identifiability using test confidence interval includes zero, dfop_pH_4 still preferred model. However, kept mind parameter confidence intervals constructed using simple linearisation likelihood. confidence interval random effect g marginally includes zero, suggested acceptable, dfop_pH_2 can considered preferable model.","code":"summary(f_saem_2[[\"DFOP\", \"const\"]])$confint_trans |> kable(digits = 2) dfop_pH <- saem(f_sep_const[\"DFOP\", ], no_random_effect = c(\"meso_0\", \"log_k1\"), covariates = pH, covariate_models = list(log_k2 ~ pH, g_qlogis ~ pH)) summary(dfop_pH)$confint_trans |> kable(digits = 2) illparms(dfop_pH) [1] \"sd(g_qlogis)\" dfop_pH_2 <- update(dfop_pH, no_random_effect = c(\"meso_0\", \"log_k1\", \"g_qlogis\")) illparms(dfop_pH_2) [1] \"beta_pH(g_qlogis)\" dfop_pH_3 <- saem(f_sep_const[\"DFOP\", ], no_random_effect = c(\"meso_0\", \"log_k1\"), covariates = pH, covariate_models = list(log_k2 ~ pH)) illparms(dfop_pH_3) [1] \"sd(g_qlogis)\" dfop_pH_4 <- update(dfop_pH_3, no_random_effect = c(\"meso_0\", \"log_k1\", \"g_qlogis\")) illparms(dfop_pH_4) anova(f_saem_2[[\"DFOP\", \"const\"]], dfop_pH, dfop_pH_2, dfop_pH_3, dfop_pH_4) Data: 116 observations of 1 variable(s) grouped in 18 datasets npar AIC BIC Lik f_saem_2[[\"DFOP\", \"const\"]] 7 782.94 789.18 -384.47 dfop_pH_4 7 767.35 773.58 -376.68 dfop_pH_2 8 765.14 772.26 -374.57 dfop_pH_3 8 769.00 776.12 -376.50 dfop_pH 9 769.10 777.11 -375.55 anova(dfop_pH_2, dfop_pH_4, test = TRUE) Data: 116 observations of 1 variable(s) grouped in 18 datasets npar AIC BIC Lik Chisq Df Pr(>Chisq) dfop_pH_4 7 767.35 773.58 -376.68 dfop_pH_2 8 765.14 772.26 -374.57 4.2153 1 0.04006 * --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 plot(dfop_pH_2) endpoints(dfop_pH_2) $covariates pH 50% 5.75 $distimes DT50 DT90 DT50back DT50_k1 DT50_k2 meso 18.36876 73.51841 22.13125 4.191901 23.98672 endpoints(dfop_pH_2, covariates = c(pH = 7)) $covariates pH User 7 $distimes DT50 DT90 DT50back DT50_k1 DT50_k2 meso 8.346428 28.34437 8.532507 4.191901 8.753618"},{"path":"https://pkgdown.jrwb.de/mkin/articles/prebuilt/2023_mesotrione_parent.html","id":"sforb","dir":"Articles > Prebuilt","previous_headings":"Hierarchical model fits with covariate effect","what":"SFORB","title":"Testing covariate modelling in hierarchical parent degradation kinetics with residue data on mesotrione","text":"confidence interval beta_pH(log_k_meso_bound_free) includes zero, indicating influence soil pH k_meso_bound_free reliably quantified. Also, confidence interval random effect parameter (SD.log_k_meso_bound_free) includes zero. Using illparms function, ill-defined parameters can found conveniently. remove ill-defined parameters, second variant SFORB model pH influence fitted. ill-defined parameters remain. model comparison SFORB fits includes refined model without covariate effect, versions SFORB fit covariate effect. first model including pH influence preferable based information criteria likelihood ratio test. However, fully identifiable, second model selected.","code":"sforb_pH <- saem(f_sep_const[\"SFORB\", ], no_random_effect = c(\"meso_free_0\", \"log_k_meso_free_bound\"), covariates = pH, covariate_models = list(log_k_meso_free ~ pH, log_k_meso_bound_free ~ pH)) summary(sforb_pH)$confint_trans |> kable(digits = 2) illparms(sforb_pH) [1] \"sd(log_k_meso_bound_free)\" \"beta_pH(log_k_meso_bound_free)\" sforb_pH_2 <- update(sforb_pH, no_random_effect = c(\"meso_free_0\", \"log_k_meso_free_bound\", \"log_k_meso_bound_free\"), covariate_models = list(log_k_meso_free ~ pH)) illparms(sforb_pH_2) anova(f_saem_2[[\"SFORB\", \"const\"]], sforb_pH, sforb_pH_2, test = TRUE) Data: 116 observations of 1 variable(s) grouped in 18 datasets npar AIC BIC Lik Chisq Df Pr(>Chisq) f_saem_2[[\"SFORB\", \"const\"]] 7 783.40 789.63 -384.70 sforb_pH_2 7 770.94 777.17 -378.47 12.4616 0 sforb_pH 9 768.81 776.83 -375.41 6.1258 2 0.04675 * --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 summary(sforb_pH_2)$confint_trans |> kable(digits = 2) plot(sforb_pH_2) endpoints(sforb_pH_2) $covariates pH 50% 5.75 $ff meso_free 1 $SFORB meso_b1 meso_b2 meso_g 0.09735824 0.02631699 0.31602120 $distimes DT50 DT90 DT50back DT50_meso_b1 DT50_meso_b2 meso 16.86549 73.15824 22.02282 7.119554 26.33839 endpoints(sforb_pH_2, covariates = c(pH = 7)) $covariates pH User 7 $ff meso_free 1 $SFORB meso_b1 meso_b2 meso_g 0.13315233 0.03795988 0.61186191 $distimes DT50 DT90 DT50back DT50_meso_b1 DT50_meso_b2 meso 7.932495 36.93311 11.11797 5.205671 18.26"},{"path":"https://pkgdown.jrwb.de/mkin/articles/prebuilt/2023_mesotrione_parent.html","id":"hs","dir":"Articles > Prebuilt","previous_headings":"Hierarchical model fits with covariate effect","what":"HS","title":"Testing covariate modelling in hierarchical parent degradation kinetics with residue data on mesotrione","text":"According output illparms function, random effect break time tb reliably quantified, neither can influence soil pH tb. fit repeated without corresponding covariate model, ill-defined parameters remain. Model comparison confirms model preferable fit without covariate influence, also first version covariate influence.","code":"hs_pH <- saem(f_sep_const[\"HS\", ], no_random_effect = c(\"meso_0\"), covariates = pH, covariate_models = list(log_k1 ~ pH, log_k2 ~ pH, log_tb ~ pH)) summary(hs_pH)$confint_trans |> kable(digits = 2) illparms(hs_pH) [1] \"sd(log_tb)\" \"beta_pH(log_tb)\" hs_pH_2 <- update(hs_pH, covariate_models = list(log_k1 ~ pH, log_k2 ~ pH)) illparms(hs_pH_2) anova(f_saem_2[[\"HS\", \"const\"]], hs_pH, hs_pH_2, test = TRUE) Data: 116 observations of 1 variable(s) grouped in 18 datasets npar AIC BIC Lik Chisq Df Pr(>Chisq) f_saem_2[[\"HS\", \"const\"]] 8 780.08 787.20 -382.04 hs_pH_2 10 766.47 775.37 -373.23 17.606 2 0.0001503 *** hs_pH 11 769.80 779.59 -373.90 0.000 1 1.0000000 --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 summary(hs_pH_2)$confint_trans |> kable(digits = 2) plot(hs_pH_2) endpoints(hs_pH_2) $covariates pH 50% 5.75 $distimes DT50 DT90 DT50back DT50_k1 DT50_k2 meso 14.68725 82.45287 24.82079 14.68725 29.29299 endpoints(hs_pH_2, covariates = c(pH = 7)) $covariates pH User 7 $distimes DT50 DT90 DT50back DT50_k1 DT50_k2 meso 8.298536 38.85371 11.69613 8.298536 15.71561"},{"path":"https://pkgdown.jrwb.de/mkin/articles/prebuilt/2023_mesotrione_parent.html","id":"comparison-across-parent-models","dir":"Articles > Prebuilt","previous_headings":"Hierarchical model fits with covariate effect","what":"Comparison across parent models","title":"Testing covariate modelling in hierarchical parent degradation kinetics with residue data on mesotrione","text":"model reduction models pH influence, compared . DFOP model pH influence k2 g random effect k2 finally selected best fit. endpoints resulting model listed . Please refer Appendix detailed listing.","code":"anova(sfo_pH, fomc_pH_2, dfop_pH_2, dfop_pH_4, sforb_pH_2, hs_pH_2) Data: 116 observations of 1 variable(s) grouped in 18 datasets npar AIC BIC Lik sfo_pH 5 783.09 787.54 -386.54 fomc_pH_2 6 767.49 772.83 -377.75 dfop_pH_4 7 767.35 773.58 -376.68 sforb_pH_2 7 770.94 777.17 -378.47 dfop_pH_2 8 765.14 772.26 -374.57 hs_pH_2 10 766.47 775.37 -373.23 endpoints(dfop_pH_2) $covariates pH 50% 5.75 $distimes DT50 DT90 DT50back DT50_k1 DT50_k2 meso 18.36876 73.51841 22.13125 4.191901 23.98672 endpoints(dfop_pH_2, covariates = c(pH = 7)) $covariates pH User 7 $distimes DT50 DT90 DT50back DT50_k1 DT50_k2 meso 8.346428 28.34437 8.532507 4.191901 8.753618"},{"path":"https://pkgdown.jrwb.de/mkin/articles/prebuilt/2023_mesotrione_parent.html","id":"conclusions","dir":"Articles > Prebuilt","previous_headings":"","what":"Conclusions","title":"Testing covariate modelling in hierarchical parent degradation kinetics with residue data on mesotrione","text":"evaluations demonstrate covariate effects can included types parent degradation models. models can refined make fully identifiable.","code":""},{"path":[]},{"path":[]},{"path":[]},{"path":[]},{"path":"https://pkgdown.jrwb.de/mkin/articles/prebuilt/2023_mesotrione_parent.html","id":"session-info","dir":"Articles > Prebuilt","previous_headings":"Appendix","what":"Session info","title":"Testing covariate modelling in hierarchical parent degradation kinetics with residue data on mesotrione","text":"","code":"R version 4.3.2 (2023-10-31) Platform: x86_64-pc-linux-gnu (64-bit) Running under: Debian GNU/Linux 12 (bookworm) Matrix products: default BLAS: /usr/lib/x86_64-linux-gnu/blas/libblas.so.3.11.0 LAPACK: /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3.11.0 locale: [1] LC_CTYPE=de_DE.UTF-8 LC_NUMERIC=C [3] LC_TIME=de_DE.UTF-8 LC_COLLATE=de_DE.UTF-8 [5] LC_MONETARY=de_DE.UTF-8 LC_MESSAGES=de_DE.UTF-8 [7] LC_PAPER=de_DE.UTF-8 LC_NAME=C [9] LC_ADDRESS=C LC_TELEPHONE=C [11] LC_MEASUREMENT=de_DE.UTF-8 LC_IDENTIFICATION=C time zone: Europe/Berlin tzcode source: system (glibc) attached base packages: [1] parallel stats graphics grDevices utils datasets methods [8] base other attached packages: [1] saemix_3.2 npde_3.3 knitr_1.42 mkin_1.2.6 loaded via a namespace (and not attached): [1] sass_0.4.6 utf8_1.2.3 generics_0.1.3 stringi_1.7.12 [5] lattice_0.21-8 digest_0.6.31 magrittr_2.0.3 evaluate_0.21 [9] grid_4.3.2 fastmap_1.1.1 rprojroot_2.0.3 jsonlite_1.8.4 [13] DBI_1.1.3 mclust_6.0.0 gridExtra_2.3 purrr_1.0.1 [17] fansi_1.0.4 scales_1.2.1 textshaping_0.3.6 jquerylib_0.1.4 [21] cli_3.6.1 rlang_1.1.1 munsell_0.5.0 cachem_1.0.8 [25] yaml_2.3.7 tools_4.3.2 memoise_2.0.1 dplyr_1.1.2 [29] colorspace_2.1-0 ggplot2_3.4.2 vctrs_0.6.2 R6_2.5.1 [33] zoo_1.8-12 lifecycle_1.0.3 stringr_1.5.0 fs_1.6.2 [37] MASS_7.3-60 ragg_1.2.5 pkgconfig_2.0.3 desc_1.4.2 [41] pkgdown_2.0.7 bslib_0.4.2 pillar_1.9.0 gtable_0.3.3 [45] glue_1.6.2 systemfonts_1.0.4 xfun_0.39 tibble_3.2.1 [49] lmtest_0.9-40 tidyselect_1.2.0 htmltools_0.5.5 nlme_3.1-163 [53] rmarkdown_2.21 compiler_4.3.2"},{"path":"https://pkgdown.jrwb.de/mkin/articles/prebuilt/2023_mesotrione_parent.html","id":"hardware-info","dir":"Articles > Prebuilt","previous_headings":"Appendix","what":"Hardware info","title":"Testing covariate modelling in hierarchical parent degradation kinetics with residue data on mesotrione","text":"","code":"CPU model: AMD Ryzen 9 7950X 16-Core Processor MemTotal: 64928100 kB"},{"path":"https://pkgdown.jrwb.de/mkin/articles/web_only/FOCUS_Z.html","id":"the-data","dir":"Articles > Web_only","previous_headings":"","what":"The data","title":"Example evaluation of FOCUS dataset Z","text":"following code defines example dataset Appendix 7 FOCUS kinetics report (FOCUS Work Group Degradation Kinetics 2014, 354).","code":"library(mkin, quietly = TRUE) LOD = 0.5 FOCUS_2006_Z = data.frame( t = c(0, 0.04, 0.125, 0.29, 0.54, 1, 2, 3, 4, 7, 10, 14, 21, 42, 61, 96, 124), Z0 = c(100, 81.7, 70.4, 51.1, 41.2, 6.6, 4.6, 3.9, 4.6, 4.3, 6.8, 2.9, 3.5, 5.3, 4.4, 1.2, 0.7), Z1 = c(0, 18.3, 29.6, 46.3, 55.1, 65.7, 39.1, 36, 15.3, 5.6, 1.1, 1.6, 0.6, 0.5 * LOD, NA, NA, NA), Z2 = c(0, NA, 0.5 * LOD, 2.6, 3.8, 15.3, 37.2, 31.7, 35.6, 14.5, 0.8, 2.1, 1.9, 0.5 * LOD, NA, NA, NA), Z3 = c(0, NA, NA, NA, NA, 0.5 * LOD, 9.2, 13.1, 22.3, 28.4, 32.5, 25.2, 17.2, 4.8, 4.5, 2.8, 4.4)) FOCUS_2006_Z_mkin <- mkin_wide_to_long(FOCUS_2006_Z)"},{"path":"https://pkgdown.jrwb.de/mkin/articles/web_only/FOCUS_Z.html","id":"parent-and-one-metabolite","dir":"Articles > Web_only","previous_headings":"","what":"Parent and one metabolite","title":"Example evaluation of FOCUS dataset Z","text":"next step set models used kinetic analysis. simultaneous fit parent first metabolite usually straightforward, Step 1 (SFO parent ) skipped . start model 2a, formation decline metabolite Z1 pathway parent directly sink included (default mkin). obvious parameter summary (component summary), kinetic rate constant parent compound Z sink small t-test parameter suggests significantly different zero. suggests, agreement analysis FOCUS kinetics report, simplify model removing pathway sink. similar result can obtained formation fractions used model formulation: , ilr transformed formation fraction fitted model takes large value, backtransformed formation fraction parent Z Z1 practically unity. , covariance matrix used calculation confidence intervals returned model overparameterised. simplified model obtained removing pathway sink. following, use parameterisation formation fractions order able compare results FOCUS guidance, makes easier use parameters obtained previous fit adding metabolite. one transformation product Z0 pathway sink, formation fraction internally fixed unity.","code":"Z.2a <- mkinmod(Z0 = mkinsub(\"SFO\", \"Z1\"), Z1 = mkinsub(\"SFO\")) ## Temporary DLL for differentials generated and loaded m.Z.2a <- mkinfit(Z.2a, FOCUS_2006_Z_mkin, quiet = TRUE) ## Warning in mkinfit(Z.2a, FOCUS_2006_Z_mkin, quiet = TRUE): Observations with ## value of zero were removed from the data plot_sep(m.Z.2a) summary(m.Z.2a, data = FALSE)$bpar ## Estimate se_notrans t value Pr(>t) Lower Upper ## Z0_0 97.01488 3.301084 29.3888 3.2971e-21 91.66556 102.3642 ## k_Z0 2.23601 0.207078 10.7979 3.3309e-11 1.95303 2.5600 ## k_Z1 0.48212 0.063265 7.6207 2.8154e-08 0.40341 0.5762 ## f_Z0_to_Z1 1.00000 0.094764 10.5525 5.3560e-11 0.00000 1.0000 ## sigma 4.80411 0.635638 7.5579 3.2592e-08 3.52677 6.0815 Z.2a.ff <- mkinmod(Z0 = mkinsub(\"SFO\", \"Z1\"), Z1 = mkinsub(\"SFO\"), use_of_ff = \"max\") ## Temporary DLL for differentials generated and loaded m.Z.2a.ff <- mkinfit(Z.2a.ff, FOCUS_2006_Z_mkin, quiet = TRUE) ## Warning in mkinfit(Z.2a.ff, FOCUS_2006_Z_mkin, quiet = TRUE): Observations with ## value of zero were removed from the data plot_sep(m.Z.2a.ff) summary(m.Z.2a.ff, data = FALSE)$bpar ## Estimate se_notrans t value Pr(>t) Lower Upper ## Z0_0 97.01488 3.301084 29.3888 3.2971e-21 91.66556 102.3642 ## k_Z0 2.23601 0.207078 10.7979 3.3309e-11 1.95303 2.5600 ## k_Z1 0.48212 0.063265 7.6207 2.8154e-08 0.40341 0.5762 ## f_Z0_to_Z1 1.00000 0.094764 10.5525 5.3560e-11 0.00000 1.0000 ## sigma 4.80411 0.635638 7.5579 3.2592e-08 3.52677 6.0815 Z.3 <- mkinmod(Z0 = mkinsub(\"SFO\", \"Z1\", sink = FALSE), Z1 = mkinsub(\"SFO\"), use_of_ff = \"max\") ## Temporary DLL for differentials generated and loaded m.Z.3 <- mkinfit(Z.3, FOCUS_2006_Z_mkin, quiet = TRUE) ## Warning in mkinfit(Z.3, FOCUS_2006_Z_mkin, quiet = TRUE): Observations with ## value of zero were removed from the data plot_sep(m.Z.3) summary(m.Z.3, data = FALSE)$bpar ## Estimate se_notrans t value Pr(>t) Lower Upper ## Z0_0 97.01488 2.597342 37.352 2.0106e-24 91.67597 102.3538 ## k_Z0 2.23601 0.146904 15.221 9.1477e-15 1.95354 2.5593 ## k_Z1 0.48212 0.041727 11.554 4.8268e-12 0.40355 0.5760 ## sigma 4.80411 0.620208 7.746 1.6110e-08 3.52925 6.0790"},{"path":"https://pkgdown.jrwb.de/mkin/articles/web_only/FOCUS_Z.html","id":"metabolites-z2-and-z3","dir":"Articles > Web_only","previous_headings":"","what":"Metabolites Z2 and Z3","title":"Example evaluation of FOCUS dataset Z","text":"suggested FOCUS report, pathway sink removed metabolite Z1 well next step. step appears questionable basis results, followed purpose comparison. Also, FOCUS report, assumed additional empirical evidence Z1 quickly exclusively hydrolyses Z2. Finally, metabolite Z3 added model. use optimised differential equation parameter values previous fit order accelerate optimization. fit corresponds final result chosen Appendix 7 FOCUS report. Confidence intervals returned mkin based internally transformed parameters, however.","code":"Z.5 <- mkinmod(Z0 = mkinsub(\"SFO\", \"Z1\", sink = FALSE), Z1 = mkinsub(\"SFO\", \"Z2\", sink = FALSE), Z2 = mkinsub(\"SFO\"), use_of_ff = \"max\") ## Temporary DLL for differentials generated and loaded m.Z.5 <- mkinfit(Z.5, FOCUS_2006_Z_mkin, quiet = TRUE) ## Warning in mkinfit(Z.5, FOCUS_2006_Z_mkin, quiet = TRUE): Observations with ## value of zero were removed from the data plot_sep(m.Z.5) Z.FOCUS <- mkinmod(Z0 = mkinsub(\"SFO\", \"Z1\", sink = FALSE), Z1 = mkinsub(\"SFO\", \"Z2\", sink = FALSE), Z2 = mkinsub(\"SFO\", \"Z3\"), Z3 = mkinsub(\"SFO\"), use_of_ff = \"max\") ## Temporary DLL for differentials generated and loaded m.Z.FOCUS <- mkinfit(Z.FOCUS, FOCUS_2006_Z_mkin, parms.ini = m.Z.5$bparms.ode, quiet = TRUE) ## Warning in mkinfit(Z.FOCUS, FOCUS_2006_Z_mkin, parms.ini = m.Z.5$bparms.ode, : ## Observations with value of zero were removed from the data ## Warning in mkinfit(Z.FOCUS, FOCUS_2006_Z_mkin, parms.ini = m.Z.5$bparms.ode, : Optimisation did not converge: ## false convergence (8) plot_sep(m.Z.FOCUS) summary(m.Z.FOCUS, data = FALSE)$bpar ## Estimate se_notrans t value Pr(>t) Lower Upper ## Z0_0 96.842440 1.994291 48.5598 4.0226e-42 92.830421 100.854459 ## k_Z0 2.215425 0.118457 18.7023 1.0404e-23 1.989490 2.467019 ## k_Z1 0.478307 0.028257 16.9272 6.2332e-22 0.424709 0.538669 ## k_Z2 0.451642 0.042139 10.7178 1.6304e-14 0.374348 0.544894 ## k_Z3 0.058692 0.015245 3.8499 1.7803e-04 0.034804 0.098975 ## f_Z2_to_Z3 0.471483 0.058348 8.0806 9.6585e-11 0.357720 0.588287 ## sigma 3.984431 0.383402 10.3923 4.5576e-14 3.213126 4.755737 endpoints(m.Z.FOCUS) ## $ff ## Z2_Z3 Z2_sink ## 0.47148 0.52852 ## ## $distimes ## DT50 DT90 ## Z0 0.31287 1.0393 ## Z1 1.44917 4.8140 ## Z2 1.53473 5.0983 ## Z3 11.80991 39.2317"},{"path":"https://pkgdown.jrwb.de/mkin/articles/web_only/FOCUS_Z.html","id":"using-the-sforb-model","dir":"Articles > Web_only","previous_headings":"","what":"Using the SFORB model","title":"Example evaluation of FOCUS dataset Z","text":"FOCUS report states, certain tailing time course metabolite Z3. Also, time course parent compound fitted well using SFO model, residues certain low level remain. Therefore, additional model offered , using single first-order reversible binding (SFORB) model metabolite Z3. expected, \\(\\chi^2\\) error level lower metabolite Z3 using model graphical fit Z3 improved. However, covariance matrix returned. Therefore, stepwise model building performed starting stage parent two metabolites, starting assumption model fit parent compound can improved using SFORB model. results much better representation behaviour parent compound Z0. Finally, Z3 added well. models appear overparameterised (covariance matrix returned) sink Z1 left models. error level fit, especially metabolite Z3, can improved SFORB model chosen metabolite, model capable representing tailing metabolite decline phase. summary view backtransformed parameters shows get confidence intervals due overparameterisation. optimized excessively small, seems reasonable fix zero. expected, residual plots Z0 Z3 random case SFO model shown . conclusion, model proposed best-fit model dataset Appendix 7 FOCUS report. graphical representation confidence intervals can finally obtained. endpoints obtained model clear degradation rate Z3 towards end experiment low DT50_Z3_b2 (second Eigenvalue system two differential equations representing SFORB system Z3, corresponding slower rate constant DFOP model) reported infinity. However, appears feature data.","code":"Z.mkin.1 <- mkinmod(Z0 = mkinsub(\"SFO\", \"Z1\", sink = FALSE), Z1 = mkinsub(\"SFO\", \"Z2\", sink = FALSE), Z2 = mkinsub(\"SFO\", \"Z3\"), Z3 = mkinsub(\"SFORB\")) ## Temporary DLL for differentials generated and loaded m.Z.mkin.1 <- mkinfit(Z.mkin.1, FOCUS_2006_Z_mkin, quiet = TRUE) ## Warning in mkinfit(Z.mkin.1, FOCUS_2006_Z_mkin, quiet = TRUE): Observations ## with value of zero were removed from the data plot_sep(m.Z.mkin.1) summary(m.Z.mkin.1, data = FALSE)$cov.unscaled ## NULL Z.mkin.3 <- mkinmod(Z0 = mkinsub(\"SFORB\", \"Z1\", sink = FALSE), Z1 = mkinsub(\"SFO\", \"Z2\", sink = FALSE), Z2 = mkinsub(\"SFO\")) ## Temporary DLL for differentials generated and loaded m.Z.mkin.3 <- mkinfit(Z.mkin.3, FOCUS_2006_Z_mkin, quiet = TRUE) ## Warning in mkinfit(Z.mkin.3, FOCUS_2006_Z_mkin, quiet = TRUE): Observations ## with value of zero were removed from the data plot_sep(m.Z.mkin.3) Z.mkin.4 <- mkinmod(Z0 = mkinsub(\"SFORB\", \"Z1\", sink = FALSE), Z1 = mkinsub(\"SFO\", \"Z2\", sink = FALSE), Z2 = mkinsub(\"SFO\", \"Z3\"), Z3 = mkinsub(\"SFO\")) ## Temporary DLL for differentials generated and loaded m.Z.mkin.4 <- mkinfit(Z.mkin.4, FOCUS_2006_Z_mkin, parms.ini = m.Z.mkin.3$bparms.ode, quiet = TRUE) ## Warning in mkinfit(Z.mkin.4, FOCUS_2006_Z_mkin, parms.ini = ## m.Z.mkin.3$bparms.ode, : Observations with value of zero were removed from the ## data plot_sep(m.Z.mkin.4) Z.mkin.5 <- mkinmod(Z0 = mkinsub(\"SFORB\", \"Z1\", sink = FALSE), Z1 = mkinsub(\"SFO\", \"Z2\", sink = FALSE), Z2 = mkinsub(\"SFO\", \"Z3\"), Z3 = mkinsub(\"SFORB\")) ## Temporary DLL for differentials generated and loaded m.Z.mkin.5 <- mkinfit(Z.mkin.5, FOCUS_2006_Z_mkin, parms.ini = m.Z.mkin.4$bparms.ode[1:4], quiet = TRUE) ## Warning in mkinfit(Z.mkin.5, FOCUS_2006_Z_mkin, parms.ini = ## m.Z.mkin.4$bparms.ode[1:4], : Observations with value of zero were removed from ## the data plot_sep(m.Z.mkin.5) m.Z.mkin.5a <- mkinfit(Z.mkin.5, FOCUS_2006_Z_mkin, parms.ini = c(m.Z.mkin.5$bparms.ode[1:7], k_Z3_bound_free = 0), fixed_parms = \"k_Z3_bound_free\", quiet = TRUE) ## Warning in mkinfit(Z.mkin.5, FOCUS_2006_Z_mkin, parms.ini = ## c(m.Z.mkin.5$bparms.ode[1:7], : Observations with value of zero were removed ## from the data plot_sep(m.Z.mkin.5a) mkinparplot(m.Z.mkin.5a) endpoints(m.Z.mkin.5a) ## $ff ## Z0_free Z2_Z3 Z2_sink Z3_free ## 1.00000 0.53656 0.46344 1.00000 ## ## $SFORB ## Z0_b1 Z0_b2 Z0_g Z3_b1 Z3_b2 Z3_g ## 2.4471342 0.0075124 0.9519866 0.0800071 0.0000000 0.9347816 ## ## $distimes ## DT50 DT90 DT50back DT50_Z0_b1 DT50_Z0_b2 DT50_Z3_b1 DT50_Z3_b2 ## Z0 0.3043 1.1848 0.35666 0.28325 92.267 NA NA ## Z1 1.5148 5.0320 NA NA NA NA NA ## Z2 1.6414 5.4526 NA NA NA NA NA ## Z3 NA NA NA NA NA 8.6636 Inf"},{"path":[]},{"path":"https://pkgdown.jrwb.de/mkin/articles/web_only/NAFTA_examples.html","id":"introduction","dir":"Articles > Web_only","previous_headings":"","what":"Introduction","title":"Evaluation of example datasets from Attachment 1 to the US EPA SOP for the NAFTA guidance","text":"document, example evaluations provided Attachment 1 SOP US EPA using NAFTA guidance (US EPA 2015) repeated using mkin. original evaluations reported attachment performed using PestDF version 0.8.4. Note PestDF 0.8.13 version distributed US EPA website today (2019-02-26). datasets now distributed mkin package.","code":""},{"path":"https://pkgdown.jrwb.de/mkin/articles/web_only/NAFTA_examples.html","id":"examples-where-dfop-did-not-converge-with-pestdf-0-8-4","dir":"Articles > Web_only","previous_headings":"","what":"Examples where DFOP did not converge with PestDF 0.8.4","title":"Evaluation of example datasets from Attachment 1 to the US EPA SOP for the NAFTA guidance","text":"attachment 1, reported DFOP model converge datasets PestDF 0.8.4 used. four datasets, DFOP model can fitted mkin (see ). negative half-life given PestDF 0.8.4 fits appears result bug. results two models (SFO IORE) .","code":""},{"path":"https://pkgdown.jrwb.de/mkin/articles/web_only/NAFTA_examples.html","id":"example-on-page-5-upper-panel","dir":"Articles > Web_only","previous_headings":"Examples where DFOP did not converge with PestDF 0.8.4","what":"Example on page 5, upper panel","title":"Evaluation of example datasets from Attachment 1 to the US EPA SOP for the NAFTA guidance","text":"","code":"p5a <- nafta(NAFTA_SOP_Attachment[[\"p5a\"]]) ## The SFO model is rejected as S_SFO is equal or higher than the critical value S_c ## The half-life obtained from the IORE model may be used plot(p5a) print(p5a) ## Sums of squares: ## SFO IORE DFOP ## 465.21753 56.27506 32.06401 ## ## Critical sum of squares for checking the SFO model: ## [1] 64.4304 ## ## Parameters: ## $SFO ## Estimate Pr(>t) Lower Upper ## parent_0 95.8401 4.67e-21 92.245 99.4357 ## k_parent 0.0102 3.92e-12 0.009 0.0117 ## sigma 4.8230 3.81e-06 3.214 6.4318 ## ## $IORE ## Estimate Pr(>t) Lower Upper ## parent_0 1.01e+02 NA 9.91e+01 1.02e+02 ## k__iore_parent 1.54e-05 NA 4.08e-06 5.84e-05 ## N_parent 2.57e+00 NA 2.25e+00 2.89e+00 ## sigma 1.68e+00 NA 1.12e+00 2.24e+00 ## ## $DFOP ## Estimate Pr(>t) Lower Upper ## parent_0 9.99e+01 1.41e-26 98.8116 101.0810 ## k1 2.67e-02 5.05e-06 0.0243 0.0295 ## k2 3.41e-12 5.00e-01 0.0000 Inf ## g 6.47e-01 3.67e-06 0.6248 0.6677 ## sigma 1.27e+00 8.91e-06 0.8395 1.6929 ## ## ## DTx values: ## DT50 DT90 DT50_rep ## SFO 67.7 2.25e+02 6.77e+01 ## IORE 58.2 1.07e+03 3.22e+02 ## DFOP 55.5 3.70e+11 2.03e+11 ## ## Representative half-life: ## [1] 321.51"},{"path":"https://pkgdown.jrwb.de/mkin/articles/web_only/NAFTA_examples.html","id":"example-on-page-5-lower-panel","dir":"Articles > Web_only","previous_headings":"Examples where DFOP did not converge with PestDF 0.8.4","what":"Example on page 5, lower panel","title":"Evaluation of example datasets from Attachment 1 to the US EPA SOP for the NAFTA guidance","text":"","code":"p5b <- nafta(NAFTA_SOP_Attachment[[\"p5b\"]]) ## The SFO model is rejected as S_SFO is equal or higher than the critical value S_c ## The half-life obtained from the IORE model may be used plot(p5b) print(p5b) ## Sums of squares: ## SFO IORE DFOP ## 94.81123 10.10936 7.55871 ## ## Critical sum of squares for checking the SFO model: ## [1] 11.77879 ## ## Parameters: ## $SFO ## Estimate Pr(>t) Lower Upper ## parent_0 96.497 2.32e-24 94.85271 98.14155 ## k_parent 0.008 3.42e-14 0.00737 0.00869 ## sigma 2.295 1.22e-05 1.47976 3.11036 ## ## $IORE ## Estimate Pr(>t) Lower Upper ## parent_0 9.85e+01 1.17e-28 9.79e+01 9.92e+01 ## k__iore_parent 1.53e-04 6.50e-03 7.21e-05 3.26e-04 ## N_parent 1.94e+00 5.88e-13 1.76e+00 2.12e+00 ## sigma 7.49e-01 1.63e-05 4.82e-01 1.02e+00 ## ## $DFOP ## Estimate Pr(>t) Lower Upper ## parent_0 9.84e+01 1.24e-27 97.8078 98.9187 ## k1 1.55e-02 4.10e-04 0.0143 0.0167 ## k2 9.07e-12 5.00e-01 0.0000 Inf ## g 6.89e-01 2.92e-03 0.6626 0.7142 ## sigma 6.48e-01 2.38e-05 0.4147 0.8813 ## ## ## DTx values: ## DT50 DT90 DT50_rep ## SFO 86.6 2.88e+02 8.66e+01 ## IORE 85.5 7.17e+02 2.16e+02 ## DFOP 83.6 1.25e+11 7.64e+10 ## ## Representative half-life: ## [1] 215.87"},{"path":"https://pkgdown.jrwb.de/mkin/articles/web_only/NAFTA_examples.html","id":"example-on-page-6","dir":"Articles > Web_only","previous_headings":"Examples where DFOP did not converge with PestDF 0.8.4","what":"Example on page 6","title":"Evaluation of example datasets from Attachment 1 to the US EPA SOP for the NAFTA guidance","text":"","code":"p6 <- nafta(NAFTA_SOP_Attachment[[\"p6\"]]) ## The SFO model is rejected as S_SFO is equal or higher than the critical value S_c ## The half-life obtained from the IORE model may be used plot(p6) print(p6) ## Sums of squares: ## SFO IORE DFOP ## 188.45361 51.00699 42.46931 ## ## Critical sum of squares for checking the SFO model: ## [1] 58.39888 ## ## Parameters: ## $SFO ## Estimate Pr(>t) Lower Upper ## parent_0 94.7759 7.29e-24 92.3478 97.2039 ## k_parent 0.0179 8.02e-16 0.0166 0.0194 ## sigma 3.0696 3.81e-06 2.0456 4.0936 ## ## $IORE ## Estimate Pr(>t) Lower Upper ## parent_0 97.12446 2.63e-26 95.62461 98.62431 ## k__iore_parent 0.00252 1.95e-03 0.00134 0.00472 ## N_parent 1.49587 4.07e-13 1.33896 1.65279 ## sigma 1.59698 5.05e-06 1.06169 2.13227 ## ## $DFOP ## Estimate Pr(>t) Lower Upper ## parent_0 9.66e+01 1.57e-25 95.3476 97.8979 ## k1 2.55e-02 7.33e-06 0.0233 0.0278 ## k2 3.84e-11 5.00e-01 0.0000 Inf ## g 8.61e-01 7.55e-06 0.8314 0.8867 ## sigma 1.46e+00 6.93e-06 0.9661 1.9483 ## ## ## DTx values: ## DT50 DT90 DT50_rep ## SFO 38.6 1.28e+02 3.86e+01 ## IORE 34.0 1.77e+02 5.32e+01 ## DFOP 34.1 8.50e+09 1.80e+10 ## ## Representative half-life: ## [1] 53.17"},{"path":"https://pkgdown.jrwb.de/mkin/articles/web_only/NAFTA_examples.html","id":"example-on-page-7","dir":"Articles > Web_only","previous_headings":"Examples where DFOP did not converge with PestDF 0.8.4","what":"Example on page 7","title":"Evaluation of example datasets from Attachment 1 to the US EPA SOP for the NAFTA guidance","text":"","code":"p7 <- nafta(NAFTA_SOP_Attachment[[\"p7\"]]) ## The SFO model is rejected as S_SFO is equal or higher than the critical value S_c ## The half-life obtained from the IORE model may be used plot(p7) print(p7) ## Sums of squares: ## SFO IORE DFOP ## 3661.661 3195.030 3174.145 ## ## Critical sum of squares for checking the SFO model: ## [1] 3334.194 ## ## Parameters: ## $SFO ## Estimate Pr(>t) Lower Upper ## parent_0 96.41796 4.80e-53 93.32245 99.51347 ## k_parent 0.00735 7.64e-21 0.00641 0.00843 ## sigma 7.94557 1.83e-15 6.46713 9.42401 ## ## $IORE ## Estimate Pr(>t) Lower Upper ## parent_0 9.92e+01 NA 9.55e+01 1.03e+02 ## k__iore_parent 1.60e-05 NA 1.45e-07 1.77e-03 ## N_parent 2.45e+00 NA 1.35e+00 3.54e+00 ## sigma 7.42e+00 NA 6.04e+00 8.80e+00 ## ## $DFOP ## Estimate Pr(>t) Lower Upper ## parent_0 9.89e+01 9.44e-49 95.4640 102.2573 ## k1 1.81e-02 1.75e-01 0.0116 0.0281 ## k2 3.62e-10 5.00e-01 0.0000 Inf ## g 6.06e-01 2.19e-01 0.4826 0.7178 ## sigma 7.40e+00 2.97e-15 6.0201 8.7754 ## ## ## DTx values: ## DT50 DT90 DT50_rep ## SFO 94.3 3.13e+02 9.43e+01 ## IORE 96.7 1.51e+03 4.55e+02 ## DFOP 96.4 3.79e+09 1.92e+09 ## ## Representative half-life: ## [1] 454.55"},{"path":[]},{"path":"https://pkgdown.jrwb.de/mkin/articles/web_only/NAFTA_examples.html","id":"example-on-page-8","dir":"Articles > Web_only","previous_headings":"Examples where the representative half-life deviates from the observed DT50","what":"Example on page 8","title":"Evaluation of example datasets from Attachment 1 to the US EPA SOP for the NAFTA guidance","text":"dataset, IORE fit converge default starting values used mkin IORE model used. Therefore, lower value rate constant used .","code":"p8 <- nafta(NAFTA_SOP_Attachment[[\"p8\"]], parms.ini = c(k__iore_parent = 1e-3)) ## The SFO model is rejected as S_SFO is equal or higher than the critical value S_c ## The half-life obtained from the IORE model may be used plot(p8) print(p8) ## Sums of squares: ## SFO IORE DFOP ## 1996.9408 444.9237 547.5616 ## ## Critical sum of squares for checking the SFO model: ## [1] 477.4924 ## ## Parameters: ## $SFO ## Estimate Pr(>t) Lower Upper ## parent_0 88.16549 6.53e-29 83.37344 92.95754 ## k_parent 0.00803 1.67e-13 0.00674 0.00957 ## sigma 7.44786 4.17e-10 5.66209 9.23363 ## ## $IORE ## Estimate Pr(>t) Lower Upper ## parent_0 9.77e+01 7.03e-35 9.44e+01 1.01e+02 ## k__iore_parent 6.14e-05 3.20e-02 2.12e-05 1.78e-04 ## N_parent 2.27e+00 4.23e-18 2.00e+00 2.54e+00 ## sigma 3.52e+00 5.36e-10 2.67e+00 4.36e+00 ## ## $DFOP ## Estimate Pr(>t) Lower Upper ## parent_0 95.70619 8.99e-32 91.87941 99.53298 ## k1 0.02500 5.25e-04 0.01422 0.04394 ## k2 0.00273 6.84e-03 0.00125 0.00597 ## g 0.58835 2.84e-06 0.36595 0.77970 ## sigma 3.90001 6.94e-10 2.96260 4.83741 ## ## ## DTx values: ## DT50 DT90 DT50_rep ## SFO 86.3 287 86.3 ## IORE 53.4 668 201.0 ## DFOP 55.6 517 253.0 ## ## Representative half-life: ## [1] 201.03"},{"path":[]},{"path":"https://pkgdown.jrwb.de/mkin/articles/web_only/NAFTA_examples.html","id":"example-on-page-9-upper-panel","dir":"Articles > Web_only","previous_headings":"Examples where SFO was not selected for an abiotic study","what":"Example on page 9, upper panel","title":"Evaluation of example datasets from Attachment 1 to the US EPA SOP for the NAFTA guidance","text":"example, residuals SFO indicate lack fit model, even abiotic experiment, data suggest simple exponential decline.","code":"p9a <- nafta(NAFTA_SOP_Attachment[[\"p9a\"]]) ## The SFO model is rejected as S_SFO is equal or higher than the critical value S_c ## The half-life obtained from the IORE model may be used plot(p9a) print(p9a) ## Sums of squares: ## SFO IORE DFOP ## 839.35238 88.57064 9.93363 ## ## Critical sum of squares for checking the SFO model: ## [1] 105.5678 ## ## Parameters: ## $SFO ## Estimate Pr(>t) Lower Upper ## parent_0 88.1933 3.06e-12 79.9447 96.4419 ## k_parent 0.0409 2.07e-07 0.0324 0.0516 ## sigma 7.2429 3.92e-05 4.4768 10.0090 ## ## $IORE ## Estimate Pr(>t) Lower Upper ## parent_0 9.89e+01 1.12e-16 9.54e+01 1.02e+02 ## k__iore_parent 1.93e-05 1.13e-01 3.49e-06 1.06e-04 ## N_parent 2.91e+00 1.45e-09 2.50e+00 3.32e+00 ## sigma 2.35e+00 5.31e-05 1.45e+00 3.26e+00 ## ## $DFOP ## Estimate Pr(>t) Lower Upper ## parent_0 9.85e+01 2.54e-20 97.390 99.672 ## k1 1.38e-01 3.52e-05 0.131 0.146 ## k2 9.02e-13 5.00e-01 0.000 Inf ## g 6.52e-01 8.13e-06 0.642 0.661 ## sigma 7.88e-01 6.13e-02 0.481 1.095 ## ## ## DTx values: ## DT50 DT90 DT50_rep ## SFO 16.9 5.63e+01 1.69e+01 ## IORE 11.6 3.37e+02 1.01e+02 ## DFOP 10.5 1.38e+12 7.68e+11 ## ## Representative half-life: ## [1] 101.43"},{"path":"https://pkgdown.jrwb.de/mkin/articles/web_only/NAFTA_examples.html","id":"example-on-page-9-lower-panel","dir":"Articles > Web_only","previous_headings":"Examples where SFO was not selected for an abiotic study","what":"Example on page 9, lower panel","title":"Evaluation of example datasets from Attachment 1 to the US EPA SOP for the NAFTA guidance","text":", mkin gives longer slow DT50 DFOP model (17.8 days) PestDF (13.5 days). Presumably, related fact PestDF gives negative value proportion fast degradation 0 1, inclusive. parameter called f PestDF g mkin. mkin, restricted interval 0 1.","code":"p9b <- nafta(NAFTA_SOP_Attachment[[\"p9b\"]]) ## The SFO model is rejected as S_SFO is equal or higher than the critical value S_c ## The half-life obtained from the IORE model may be used plot(p9b) print(p9b) ## Sums of squares: ## SFO IORE DFOP ## 35.64867 23.22334 35.64867 ## ## Critical sum of squares for checking the SFO model: ## [1] 28.54188 ## ## Parameters: ## $SFO ## Estimate Pr(>t) Lower Upper ## parent_0 94.7123 2.15e-19 93.178 96.2464 ## k_parent 0.0389 4.47e-14 0.037 0.0408 ## sigma 1.5957 1.28e-04 0.932 2.2595 ## ## $IORE ## Estimate Pr(>t) Lower Upper ## parent_0 93.863 2.32e-18 92.4565 95.269 ## k__iore_parent 0.127 1.85e-02 0.0504 0.321 ## N_parent 0.711 1.88e-05 0.4843 0.937 ## sigma 1.288 1.76e-04 0.7456 1.830 ## ## $DFOP ## Estimate Pr(>t) Lower Upper ## parent_0 94.7123 1.61e-16 93.1355 96.2891 ## k1 0.0389 1.08e-04 0.0266 0.0569 ## k2 0.0389 2.24e-04 0.0255 0.0592 ## g 0.5256 5.00e-01 0.0000 1.0000 ## sigma 1.5957 2.50e-04 0.9135 2.2779 ## ## ## DTx values: ## DT50 DT90 DT50_rep ## SFO 17.8 59.2 17.8 ## IORE 18.4 49.2 14.8 ## DFOP 17.8 59.2 17.8 ## ## Representative half-life: ## [1] 14.8"},{"path":"https://pkgdown.jrwb.de/mkin/articles/web_only/NAFTA_examples.html","id":"example-on-page-10","dir":"Articles > Web_only","previous_headings":"Examples where SFO was not selected for an abiotic study","what":"Example on page 10","title":"Evaluation of example datasets from Attachment 1 to the US EPA SOP for the NAFTA guidance","text":", value N given IORE model, data suggests faster decline towards end experiment, appears physically rather unlikely case photolysis study. seems PestDF constrain N values zero, thus slight difference IORE model parameters PestDF mkin.","code":"p10 <- nafta(NAFTA_SOP_Attachment[[\"p10\"]]) ## Warning in sqrt(diag(covar_notrans)): NaNs produced ## The SFO model is rejected as S_SFO is equal or higher than the critical value S_c ## The half-life obtained from the IORE model may be used plot(p10) print(p10) ## Sums of squares: ## SFO IORE DFOP ## 899.4089 336.4348 899.4089 ## ## Critical sum of squares for checking the SFO model: ## [1] 413.4841 ## ## Parameters: ## $SFO ## Estimate Pr(>t) Lower Upper ## parent_0 101.7315 6.42e-11 91.9259 111.5371 ## k_parent 0.0495 1.70e-07 0.0404 0.0607 ## sigma 8.0152 1.28e-04 4.6813 11.3491 ## ## $IORE ## Estimate Pr(>t) Lower Upper ## parent_0 96.86 3.32e-12 90.848 102.863 ## k__iore_parent 2.96 7.91e-02 0.687 12.761 ## N_parent 0.00 5.00e-01 -0.372 0.372 ## sigma 4.90 1.77e-04 2.837 6.968 ## ## $DFOP ## Estimate Pr(>t) Lower Upper ## parent_0 101.7315 1.41e-09 91.6534 111.810 ## k1 0.0495 3.04e-03 0.0188 0.131 ## k2 0.0495 4.92e-04 0.0197 0.124 ## g 0.4487 NaN 0.0000 1.000 ## sigma 8.0152 2.50e-04 4.5886 11.442 ## ## ## DTx values: ## DT50 DT90 DT50_rep ## SFO 14.0 46.5 14.00 ## IORE 16.4 29.4 8.86 ## DFOP 14.0 46.5 14.00 ## ## Representative half-life: ## [1] 8.86"},{"path":[]},{"path":"https://pkgdown.jrwb.de/mkin/articles/web_only/NAFTA_examples.html","id":"example-on-page-11","dir":"Articles > Web_only","previous_headings":"The DT50 was not observed during the study","what":"Example on page 11","title":"Evaluation of example datasets from Attachment 1 to the US EPA SOP for the NAFTA guidance","text":"case, DFOP fit reported PestDF resulted negative value slower rate constant, possible mkin. results agreement.","code":"p11 <- nafta(NAFTA_SOP_Attachment[[\"p11\"]]) ## The SFO model is rejected as S_SFO is equal or higher than the critical value S_c ## The half-life obtained from the IORE model may be used plot(p11) print(p11) ## Sums of squares: ## SFO IORE DFOP ## 579.6805 204.7932 144.7783 ## ## Critical sum of squares for checking the SFO model: ## [1] 251.6944 ## ## Parameters: ## $SFO ## Estimate Pr(>t) Lower Upper ## parent_0 96.15820 4.83e-13 90.24934 1.02e+02 ## k_parent 0.00321 4.71e-05 0.00222 4.64e-03 ## sigma 6.43473 1.28e-04 3.75822 9.11e+00 ## ## $IORE ## Estimate Pr(>t) Lower Upper ## parent_0 1.05e+02 NA 9.90e+01 1.10e+02 ## k__iore_parent 3.11e-17 NA 1.35e-20 7.18e-14 ## N_parent 8.36e+00 NA 6.62e+00 1.01e+01 ## sigma 3.82e+00 NA 2.21e+00 5.44e+00 ## ## $DFOP ## Estimate Pr(>t) Lower Upper ## parent_0 1.05e+02 9.47e-13 99.9990 109.1224 ## k1 4.41e-02 5.95e-03 0.0296 0.0658 ## k2 9.94e-13 5.00e-01 0.0000 Inf ## g 3.22e-01 1.45e-03 0.2814 0.3650 ## sigma 3.22e+00 3.52e-04 1.8410 4.5906 ## ## ## DTx values: ## DT50 DT90 DT50_rep ## SFO 2.16e+02 7.18e+02 2.16e+02 ## IORE 9.73e+02 1.37e+08 4.11e+07 ## DFOP 3.07e+11 1.93e+12 6.98e+11 ## ## Representative half-life: ## [1] 41148169"},{"path":"https://pkgdown.jrwb.de/mkin/articles/web_only/NAFTA_examples.html","id":"n-is-less-than-1-and-the-dfop-rate-constants-are-like-the-sfo-rate-constant","dir":"Articles > Web_only","previous_headings":"","what":"N is less than 1 and the DFOP rate constants are like the SFO rate constant","title":"Evaluation of example datasets from Attachment 1 to the US EPA SOP for the NAFTA guidance","text":"following three examples, results obtained mkin reported PestDF. case page 10, N values 1 deemed unrealistic appear result overparameterisation.","code":""},{"path":"https://pkgdown.jrwb.de/mkin/articles/web_only/NAFTA_examples.html","id":"example-on-page-12-upper-panel","dir":"Articles > Web_only","previous_headings":"N is less than 1 and the DFOP rate constants are like the SFO rate constant","what":"Example on page 12, upper panel","title":"Evaluation of example datasets from Attachment 1 to the US EPA SOP for the NAFTA guidance","text":"","code":"p12a <- nafta(NAFTA_SOP_Attachment[[\"p12a\"]]) ## Warning in summary.mkinfit(x): Could not calculate correlation; no covariance ## matrix ## Warning in sqrt(diag(covar_notrans)): NaNs produced ## The SFO model is rejected as S_SFO is equal or higher than the critical value S_c ## The half-life obtained from the IORE model may be used plot(p12a) print(p12a) ## Sums of squares: ## SFO IORE DFOP ## 695.4440 220.0685 695.4440 ## ## Critical sum of squares for checking the SFO model: ## [1] 270.4679 ## ## Parameters: ## $SFO ## Estimate Pr(>t) Lower Upper ## parent_0 100.521 8.75e-12 92.461 108.581 ## k_parent 0.124 3.61e-08 0.104 0.148 ## sigma 7.048 1.28e-04 4.116 9.980 ## ## $IORE ## Estimate Pr(>t) Lower Upper ## parent_0 96.823 NA NA NA ## k__iore_parent 2.436 NA NA NA ## N_parent 0.263 NA NA NA ## sigma 3.965 NA NA NA ## ## $DFOP ## Estimate Pr(>t) Lower Upper ## parent_0 100.521 2.74e-10 92.2366 108.805 ## k1 0.124 2.53e-05 0.0908 0.170 ## k2 0.124 2.52e-02 0.0456 0.339 ## g 0.793 NaN 0.0000 1.000 ## sigma 7.048 2.50e-04 4.0349 10.061 ## ## ## DTx values: ## DT50 DT90 DT50_rep ## SFO 5.58 18.5 5.58 ## IORE 6.49 13.2 3.99 ## DFOP 5.58 18.5 5.58 ## ## Representative half-life: ## [1] 3.99"},{"path":"https://pkgdown.jrwb.de/mkin/articles/web_only/NAFTA_examples.html","id":"example-on-page-12-lower-panel","dir":"Articles > Web_only","previous_headings":"N is less than 1 and the DFOP rate constants are like the SFO rate constant","what":"Example on page 12, lower panel","title":"Evaluation of example datasets from Attachment 1 to the US EPA SOP for the NAFTA guidance","text":"","code":"p12b <- nafta(NAFTA_SOP_Attachment[[\"p12b\"]]) ## Warning in sqrt(diag(covar)): NaNs produced ## Warning in qt(alpha/2, rdf): NaNs produced ## Warning in qt(1 - alpha/2, rdf): NaNs produced ## Warning in pt(abs(tval), rdf, lower.tail = FALSE): NaNs produced ## Warning in sqrt(1/diag(V)): NaNs produced ## Warning in cov2cor(ans$covar): diag(.) had 0 or NA entries; non-finite result ## is doubtful ## The SFO model is rejected as S_SFO is equal or higher than the critical value S_c ## The half-life obtained from the IORE model may be used plot(p12b) print(p12b) ## Sums of squares: ## SFO IORE DFOP ## 58.90242 19.06353 58.90242 ## ## Critical sum of squares for checking the SFO model: ## [1] 51.51756 ## ## Parameters: ## $SFO ## Estimate Pr(>t) Lower Upper ## parent_0 97.6840 0.00039 85.9388 109.4292 ## k_parent 0.0589 0.00261 0.0431 0.0805 ## sigma 3.4323 0.04356 -1.2377 8.1023 ## ## $IORE ## Estimate Pr(>t) Lower Upper ## parent_0 95.523 0.0055 74.539157 116.51 ## k__iore_parent 0.333 0.1433 0.000717 154.57 ## N_parent 0.568 0.0677 -0.989464 2.13 ## sigma 1.953 0.0975 -5.893100 9.80 ## ## $DFOP ## Estimate Pr(>t) Lower Upper ## parent_0 97.6840 NaN NaN NaN ## k1 0.0589 NaN NA NA ## k2 0.0589 NaN NA NA ## g 0.6473 NaN NA NA ## sigma 3.4323 NaN NaN NaN ## ## ## DTx values: ## DT50 DT90 DT50_rep ## SFO 11.8 39.1 11.80 ## IORE 12.9 31.4 9.46 ## DFOP 11.8 39.1 11.80 ## ## Representative half-life: ## [1] 9.46"},{"path":"https://pkgdown.jrwb.de/mkin/articles/web_only/NAFTA_examples.html","id":"example-on-page-13","dir":"Articles > Web_only","previous_headings":"N is less than 1 and the DFOP rate constants are like the SFO rate constant","what":"Example on page 13","title":"Evaluation of example datasets from Attachment 1 to the US EPA SOP for the NAFTA guidance","text":"","code":"p13 <- nafta(NAFTA_SOP_Attachment[[\"p13\"]]) ## The SFO model is rejected as S_SFO is equal or higher than the critical value S_c ## The half-life obtained from the IORE model may be used plot(p13) print(p13) ## Sums of squares: ## SFO IORE DFOP ## 174.5971 142.3951 174.5971 ## ## Critical sum of squares for checking the SFO model: ## [1] 172.131 ## ## Parameters: ## $SFO ## Estimate Pr(>t) Lower Upper ## parent_0 92.73500 5.99e-17 89.61936 95.85065 ## k_parent 0.00258 2.42e-09 0.00223 0.00299 ## sigma 3.41172 7.07e-05 2.05455 4.76888 ## ## $IORE ## Estimate Pr(>t) Lower Upper ## parent_0 91.6016 6.34e-16 88.53086 94.672 ## k__iore_parent 0.0396 2.36e-01 0.00207 0.759 ## N_parent 0.3541 1.46e-01 -0.35153 1.060 ## sigma 3.0811 9.64e-05 1.84296 4.319 ## ## $DFOP ## Estimate Pr(>t) Lower Upper ## parent_0 92.73500 NA 8.95e+01 95.92118 ## k1 0.00258 NA 4.18e-04 0.01592 ## k2 0.00258 NA 1.75e-03 0.00381 ## g 0.16452 NA 0.00e+00 1.00000 ## sigma 3.41172 NA 2.02e+00 4.79960 ## ## ## DTx values: ## DT50 DT90 DT50_rep ## SFO 269 892 269 ## IORE 261 560 169 ## DFOP 269 892 269 ## ## Representative half-life: ## [1] 168.51"},{"path":"https://pkgdown.jrwb.de/mkin/articles/web_only/NAFTA_examples.html","id":"dt50-not-observed-in-the-study-and-dfop-problems-in-pestdf","dir":"Articles > Web_only","previous_headings":"","what":"DT50 not observed in the study and DFOP problems in PestDF","title":"Evaluation of example datasets from Attachment 1 to the US EPA SOP for the NAFTA guidance","text":"slower rate constant reported PestDF negative, physically realistic, possible mkin. fits give results mkin PestDF.","code":"p14 <- nafta(NAFTA_SOP_Attachment[[\"p14\"]]) ## Warning in sqrt(diag(covar)): NaNs produced ## Warning in sqrt(1/diag(V)): NaNs produced ## Warning in cov2cor(ans$covar): diag(.) had 0 or NA entries; non-finite result ## is doubtful ## The SFO model is rejected as S_SFO is equal or higher than the critical value S_c ## The half-life obtained from the IORE model may be used plot(p14) print(p14) ## Sums of squares: ## SFO IORE DFOP ## 48.43249 28.67746 27.26248 ## ## Critical sum of squares for checking the SFO model: ## [1] 32.83337 ## ## Parameters: ## $SFO ## Estimate Pr(>t) Lower Upper ## parent_0 99.47124 2.06e-30 98.42254 1.01e+02 ## k_parent 0.00279 3.75e-15 0.00256 3.04e-03 ## sigma 1.55616 3.81e-06 1.03704 2.08e+00 ## ## $IORE ## Estimate Pr(>t) Lower Upper ## parent_0 1.00e+02 NA NaN NaN ## k__iore_parent 9.44e-08 NA NaN NaN ## N_parent 3.31e+00 NA NaN NaN ## sigma 1.20e+00 NA 0.796 1.6 ## ## $DFOP ## Estimate Pr(>t) Lower Upper ## parent_0 1.00e+02 2.96e-28 99.40280 101.2768 ## k1 9.53e-03 1.20e-01 0.00638 0.0143 ## k2 5.21e-12 5.00e-01 0.00000 Inf ## g 3.98e-01 2.19e-01 0.30481 0.4998 ## sigma 1.17e+00 7.68e-06 0.77406 1.5610 ## ## ## DTx values: ## DT50 DT90 DT50_rep ## SFO 2.48e+02 8.25e+02 2.48e+02 ## IORE 4.34e+02 2.22e+04 6.70e+03 ## DFOP 3.55e+10 3.44e+11 1.33e+11 ## ## Representative half-life: ## [1] 6697.44"},{"path":"https://pkgdown.jrwb.de/mkin/articles/web_only/NAFTA_examples.html","id":"n-is-less-than-1-and-dfop-fraction-parameter-is-below-zero","dir":"Articles > Web_only","previous_headings":"","what":"N is less than 1 and DFOP fraction parameter is below zero","title":"Evaluation of example datasets from Attachment 1 to the US EPA SOP for the NAFTA guidance","text":"mkin, IORE fit affected (deemed unrealistic), fraction parameter DFOP model restricted interval 0 1 mkin. SFO fits give results mkin PestDF.","code":"p15a <- nafta(NAFTA_SOP_Attachment[[\"p15a\"]]) ## Warning in sqrt(diag(covar)): NaNs produced ## Warning in sqrt(1/diag(V)): NaNs produced ## Warning in cov2cor(ans$covar): diag(.) had 0 or NA entries; non-finite result ## is doubtful ## The SFO model is rejected as S_SFO is equal or higher than the critical value S_c ## The half-life obtained from the IORE model may be used plot(p15a) print(p15a) ## Sums of squares: ## SFO IORE DFOP ## 245.5248 135.0132 245.5248 ## ## Critical sum of squares for checking the SFO model: ## [1] 165.9335 ## ## Parameters: ## $SFO ## Estimate Pr(>t) Lower Upper ## parent_0 97.96751 2.00e-15 94.32049 101.615 ## k_parent 0.00952 4.93e-09 0.00824 0.011 ## sigma 4.18778 1.28e-04 2.44588 5.930 ## ## $IORE ## Estimate Pr(>t) Lower Upper ## parent_0 95.874 2.94e-15 92.937 98.811 ## k__iore_parent 0.629 2.11e-01 0.044 8.982 ## N_parent 0.000 5.00e-01 -0.642 0.642 ## sigma 3.105 1.78e-04 1.795 4.416 ## ## $DFOP ## Estimate Pr(>t) Lower Upper ## parent_0 97.96751 2.85e-13 94.21913 101.7159 ## k1 0.00952 6.28e-02 0.00260 0.0349 ## k2 0.00952 1.27e-04 0.00652 0.0139 ## g 0.21241 5.00e-01 NA NA ## sigma 4.18778 2.50e-04 2.39747 5.9781 ## ## ## DTx values: ## DT50 DT90 DT50_rep ## SFO 72.8 242 72.8 ## IORE 76.3 137 41.3 ## DFOP 72.8 242 72.8 ## ## Representative half-life: ## [1] 41.33 p15b <- nafta(NAFTA_SOP_Attachment[[\"p15b\"]]) ## Warning in summary.mkinfit(x): Could not calculate correlation; no covariance ## matrix ## The SFO model is rejected as S_SFO is equal or higher than the critical value S_c ## The half-life obtained from the IORE model may be used plot(p15b) print(p15b) ## Sums of squares: ## SFO IORE DFOP ## 106.91629 68.55574 106.91629 ## ## Critical sum of squares for checking the SFO model: ## [1] 84.25618 ## ## Parameters: ## $SFO ## Estimate Pr(>t) Lower Upper ## parent_0 1.01e+02 3.06e-17 98.31594 1.03e+02 ## k_parent 4.86e-03 2.48e-10 0.00435 5.42e-03 ## sigma 2.76e+00 1.28e-04 1.61402 3.91e+00 ## ## $IORE ## Estimate Pr(>t) Lower Upper ## parent_0 99.83 1.81e-16 97.51348 102.14 ## k__iore_parent 0.38 3.22e-01 0.00352 41.05 ## N_parent 0.00 5.00e-01 -1.07696 1.08 ## sigma 2.21 2.57e-04 1.23245 3.19 ## ## $DFOP ## Estimate Pr(>t) Lower Upper ## parent_0 1.01e+02 NA NA NA ## k1 4.86e-03 NA NA NA ## k2 4.86e-03 NA NA NA ## g 1.88e-01 NA NA NA ## sigma 2.76e+00 NA NA NA ## ## ## DTx values: ## DT50 DT90 DT50_rep ## SFO 143 474 143.0 ## IORE 131 236 71.2 ## DFOP 143 474 143.0 ## ## Representative half-life: ## [1] 71.18"},{"path":"https://pkgdown.jrwb.de/mkin/articles/web_only/NAFTA_examples.html","id":"the-dfop-fraction-parameter-is-greater-than-1","dir":"Articles > Web_only","previous_headings":"","what":"The DFOP fraction parameter is greater than 1","title":"Evaluation of example datasets from Attachment 1 to the US EPA SOP for the NAFTA guidance","text":"PestDF, DFOP fit seems stuck local minimum, mkin finds solution much lower \\(\\chi^2\\) error level. half-life slower rate constant DFOP model larger IORE derived half-life, NAFTA recommendation obtained mkin use DFOP representative half-life 8.9 days.","code":"p16 <- nafta(NAFTA_SOP_Attachment[[\"p16\"]]) ## The SFO model is rejected as S_SFO is equal or higher than the critical value S_c ## The representative half-life of the IORE model is longer than the one corresponding ## to the terminal degradation rate found with the DFOP model. ## The representative half-life obtained from the DFOP model may be used plot(p16) print(p16) ## Sums of squares: ## SFO IORE DFOP ## 3831.804 2062.008 1550.980 ## ## Critical sum of squares for checking the SFO model: ## [1] 2247.348 ## ## Parameters: ## $SFO ## Estimate Pr(>t) Lower Upper ## parent_0 71.953 2.33e-13 60.509 83.40 ## k_parent 0.159 4.86e-05 0.102 0.25 ## sigma 11.302 1.25e-08 8.308 14.30 ## ## $IORE ## Estimate Pr(>t) Lower Upper ## parent_0 8.74e+01 2.48e-16 7.72e+01 97.52972 ## k__iore_parent 4.55e-04 2.16e-01 3.48e-05 0.00595 ## N_parent 2.70e+00 1.21e-08 1.99e+00 3.40046 ## sigma 8.29e+00 1.61e-08 6.09e+00 10.49062 ## ## $DFOP ## Estimate Pr(>t) Lower Upper ## parent_0 88.5333 7.40e-18 79.9836 97.083 ## k1 18.8461 5.00e-01 0.0000 Inf ## k2 0.0776 1.41e-05 0.0518 0.116 ## g 0.4733 1.41e-09 0.3674 0.582 ## sigma 7.1902 2.11e-08 5.2785 9.102 ## ## ## DTx values: ## DT50 DT90 DT50_rep ## SFO 4.35 14.4 4.35 ## IORE 1.48 32.1 9.67 ## DFOP 0.67 21.4 8.93 ## ## Representative half-life: ## [1] 8.93"},{"path":"https://pkgdown.jrwb.de/mkin/articles/web_only/NAFTA_examples.html","id":"conclusions","dir":"Articles > Web_only","previous_headings":"","what":"Conclusions","title":"Evaluation of example datasets from Attachment 1 to the US EPA SOP for the NAFTA guidance","text":"results obtained mkin deviate results obtained PestDF either cases one interpretive rules apply, .e. IORE parameter N less one DFOP k values obtained PestDF equal SFO k values, cases DFOP model converge, often lead negative rate constants returned PestDF. Therefore, mkin appears suitable kinetic evaluations according NAFTA guidance.","code":""},{"path":[]},{"path":"https://pkgdown.jrwb.de/mkin/articles/web_only/benchmarks.html","id":"test-cases","dir":"Articles > Web_only","previous_headings":"","what":"Test cases","title":"Benchmark timings for mkin","text":"Parent : One metabolite: Two metabolites, synthetic data:","code":"FOCUS_C <- FOCUS_2006_C FOCUS_D <- subset(FOCUS_2006_D, value != 0) parent_datasets <- list(FOCUS_C, FOCUS_D) t1 <- system.time(mmkin_bench(c(\"SFO\", \"FOMC\", \"DFOP\", \"HS\"), parent_datasets))[[\"elapsed\"]] t2 <- system.time(mmkin_bench(c(\"SFO\", \"FOMC\", \"DFOP\", \"HS\"), parent_datasets, error_model = \"tc\"))[[\"elapsed\"]] SFO_SFO <- mkinmod( parent = mkinsub(\"SFO\", \"m1\"), m1 = mkinsub(\"SFO\")) FOMC_SFO <- mkinmod( parent = mkinsub(\"FOMC\", \"m1\"), m1 = mkinsub(\"SFO\")) DFOP_SFO <- mkinmod( parent = mkinsub(\"FOMC\", \"m1\"), # erroneously used FOMC twice, not fixed for consistency m1 = mkinsub(\"SFO\")) t3 <- system.time(mmkin_bench(list(SFO_SFO, FOMC_SFO, DFOP_SFO), list(FOCUS_D)))[[\"elapsed\"]] t4 <- system.time(mmkin_bench(list(SFO_SFO, FOMC_SFO, DFOP_SFO), list(FOCUS_D), error_model = \"tc\"))[[\"elapsed\"]] t5 <- system.time(mmkin_bench(list(SFO_SFO, FOMC_SFO, DFOP_SFO), list(FOCUS_D), error_model = \"obs\"))[[\"elapsed\"]] m_synth_SFO_lin <- mkinmod(parent = mkinsub(\"SFO\", \"M1\"), M1 = mkinsub(\"SFO\", \"M2\"), M2 = mkinsub(\"SFO\"), use_of_ff = \"max\", quiet = TRUE) m_synth_DFOP_par <- mkinmod(parent = mkinsub(\"DFOP\", c(\"M1\", \"M2\")), M1 = mkinsub(\"SFO\"), M2 = mkinsub(\"SFO\"), use_of_ff = \"max\", quiet = TRUE) SFO_lin_a <- synthetic_data_for_UBA_2014[[1]]$data DFOP_par_c <- synthetic_data_for_UBA_2014[[12]]$data t6 <- system.time(mmkin_bench(list(m_synth_SFO_lin), list(SFO_lin_a)))[[\"elapsed\"]] t7 <- system.time(mmkin_bench(list(m_synth_DFOP_par), list(DFOP_par_c)))[[\"elapsed\"]] t8 <- system.time(mmkin_bench(list(m_synth_SFO_lin), list(SFO_lin_a), error_model = \"tc\"))[[\"elapsed\"]] t9 <- system.time(mmkin_bench(list(m_synth_DFOP_par), list(DFOP_par_c), error_model = \"tc\"))[[\"elapsed\"]] t10 <- system.time(mmkin_bench(list(m_synth_SFO_lin), list(SFO_lin_a), error_model = \"obs\"))[[\"elapsed\"]] t11 <- system.time(mmkin_bench(list(m_synth_DFOP_par), list(DFOP_par_c), error_model = \"obs\"))[[\"elapsed\"]]"},{"path":"https://pkgdown.jrwb.de/mkin/articles/web_only/benchmarks.html","id":"results","dir":"Articles > Web_only","previous_headings":"","what":"Results","title":"Benchmark timings for mkin","text":"Benchmarks available error models shown. intended improving mkin, comparing CPUs operating systems. trademarks belong respective owners.","code":""},{"path":"https://pkgdown.jrwb.de/mkin/articles/web_only/benchmarks.html","id":"parent-only","dir":"Articles > Web_only","previous_headings":"Results","what":"Parent only","title":"Benchmark timings for mkin","text":"Constant variance (t1) two-component error model (t2) four models fitted two datasets, .e. eight fits test.","code":""},{"path":"https://pkgdown.jrwb.de/mkin/articles/web_only/benchmarks.html","id":"one-metabolite","dir":"Articles > Web_only","previous_headings":"Results","what":"One metabolite","title":"Benchmark timings for mkin","text":"Constant variance (t3), two-component error model (t4), variance variable (t5) three models fitted one dataset, .e. three fits test.","code":""},{"path":"https://pkgdown.jrwb.de/mkin/articles/web_only/benchmarks.html","id":"two-metabolites","dir":"Articles > Web_only","previous_headings":"Results","what":"Two metabolites","title":"Benchmark timings for mkin","text":"Constant variance (t6 t7), two-component error model (t8 t9), variance variable (t10 t11) one model fitted one dataset, .e. one fit test.","code":""},{"path":"https://pkgdown.jrwb.de/mkin/articles/web_only/compiled_models.html","id":"how-to-benefit-from-compiled-models","dir":"Articles > Web_only","previous_headings":"","what":"How to benefit from compiled models","title":"Performance benefit by using compiled model definitions in mkin","text":"using mkin version equal greater 0.9-36 C compiler available, see message model compiled autogenerated C code defining model using mkinmod. Starting version 0.9.49.9, mkinmod() function checks presence compiler using previous versions, used Sys.(\"gcc\") check. Linux, need essential build tools like make gcc clang installed. Debian based linux distributions, pulled installing build-essential package. MacOS, use personally, reports compiler available default. Windows, need install Rtools path bin directory PATH variable. need modify PATH variable installing Rtools. Instead, recommend put line .Rprofile startup file. just text file R code executed R session starts. named .Rprofile located home directory, generally Documents folder. can check location home directory used R issuing","code":"pkgbuild::has_compiler() Sys.setenv(PATH = paste(\"C:/Rtools/bin\", Sys.getenv(\"PATH\"), sep=\";\")) Sys.getenv(\"HOME\")"},{"path":"https://pkgdown.jrwb.de/mkin/articles/web_only/compiled_models.html","id":"comparison-with-other-solution-methods","dir":"Articles > Web_only","previous_headings":"","what":"Comparison with other solution methods","title":"Performance benefit by using compiled model definitions in mkin","text":"First, build simple degradation model parent compound one metabolite, remove zero values dataset. can compare performance Eigenvalue based solution compiled version R implementation differential equations using benchmark package. output code, warnings zero removed FOCUS D dataset suppressed. Since mkin version 0.9.49.11, analytical solution also implemented, included tests . see using compiled model factor 10 faster using deSolve without compiled code.","code":"library(\"mkin\", quietly = TRUE) SFO_SFO <- mkinmod( parent = mkinsub(\"SFO\", \"m1\"), m1 = mkinsub(\"SFO\")) ## Temporary DLL for differentials generated and loaded FOCUS_D <- subset(FOCUS_2006_D, value != 0) if (require(rbenchmark)) { b.1 <- benchmark( \"deSolve, not compiled\" = mkinfit(SFO_SFO, FOCUS_D, solution_type = \"deSolve\", use_compiled = FALSE, quiet = TRUE), \"Eigenvalue based\" = mkinfit(SFO_SFO, FOCUS_D, solution_type = \"eigen\", quiet = TRUE), \"deSolve, compiled\" = mkinfit(SFO_SFO, FOCUS_D, solution_type = \"deSolve\", quiet = TRUE), \"analytical\" = mkinfit(SFO_SFO, FOCUS_D, solution_type = \"analytical\", use_compiled = FALSE, quiet = TRUE), replications = 1, order = \"relative\", columns = c(\"test\", \"replications\", \"relative\", \"elapsed\")) print(b.1) } else { print(\"R package rbenchmark is not available\") } ## test replications relative elapsed ## 4 analytical 1 1.000 0.109 ## 3 deSolve, compiled 1 1.284 0.140 ## 2 Eigenvalue based 1 1.670 0.182 ## 1 deSolve, not compiled 1 21.927 2.390"},{"path":"https://pkgdown.jrwb.de/mkin/articles/web_only/compiled_models.html","id":"model-without-analytical-solution","dir":"Articles > Web_only","previous_headings":"","what":"Model without analytical solution","title":"Performance benefit by using compiled model definitions in mkin","text":"evaluation also taken example section mkinfit. analytical solution available system, now Eigenvalue based solution possible, deSolve using without compiled code available. get performance benefit factor 24 using version differential equation model compiled C code! vignette built mkin 1.2.6 ","code":"if (require(rbenchmark)) { FOMC_SFO <- mkinmod( parent = mkinsub(\"FOMC\", \"m1\"), m1 = mkinsub( \"SFO\")) b.2 <- benchmark( \"deSolve, not compiled\" = mkinfit(FOMC_SFO, FOCUS_D, use_compiled = FALSE, quiet = TRUE), \"deSolve, compiled\" = mkinfit(FOMC_SFO, FOCUS_D, quiet = TRUE), replications = 1, order = \"relative\", columns = c(\"test\", \"replications\", \"relative\", \"elapsed\")) print(b.2) factor_FOMC_SFO <- round(b.2[\"1\", \"relative\"]) } else { factor_FOMC_SFO <- NA print(\"R package benchmark is not available\") } ## Temporary DLL for differentials generated and loaded ## test replications relative elapsed ## 2 deSolve, compiled 1 1.000 0.181 ## 1 deSolve, not compiled 1 23.646 4.280 ## R version 4.3.2 (2023-10-31) ## Platform: x86_64-pc-linux-gnu (64-bit) ## Running under: Debian GNU/Linux 12 (bookworm) ## CPU model: AMD Ryzen 9 7950X 16-Core Processor"},{"path":"https://pkgdown.jrwb.de/mkin/articles/web_only/dimethenamid_2018.html","id":"introduction","dir":"Articles > Web_only","previous_headings":"","what":"Introduction","title":"Example evaluations of the dimethenamid data from 2018","text":"first analysis data analysed presented recent journal article nonlinear mixed-effects models degradation kinetics (Ranke et al. 2021). analysis based nlme package development version saemix package unpublished time. Meanwhile, version 3.0 saemix package available CRAN repository. Also, turned error handling Borstel data mkin package time, leading duplication data points soil. dataset mkin package corrected, interface saemix mkin package updated use released version. vignette intended present date analysis data, using corrected dataset released versions mkin saemix.","code":""},{"path":"https://pkgdown.jrwb.de/mkin/articles/web_only/dimethenamid_2018.html","id":"data","dir":"Articles > Web_only","previous_headings":"","what":"Data","title":"Example evaluations of the dimethenamid data from 2018","text":"Residue data forming basis endpoints derived conclusion peer review pesticide risk assessment dimethenamid-P published European Food Safety Authority (EFSA) 2018 (EFSA 2018) transcribed risk assessment report (Rapporteur Member State Germany, Co-Rapporteur Member State Bulgaria 2018) can downloaded Open EFSA repository https://open.efsa.europa.eu/study-inventory/EFSA-Q-2014-00716. data available mkin package. following code (hidden default, please use button right show ) treats data available racemic mixture dimethenamid (DMTA) enantiomer dimethenamid-P (DMTAP) way, difference degradation behaviour identified EU risk assessment. observation times dataset multiplied corresponding normalisation factor also available dataset, order make possible describe datasets single set parameters. Also, datasets observed soil merged, resulting dimethenamid (DMTA) data six soils.","code":"library(mkin, quietly = TRUE) dmta_ds <- lapply(1:7, function(i) { ds_i <- dimethenamid_2018$ds[[i]]$data ds_i[ds_i$name == \"DMTAP\", \"name\"] <- \"DMTA\" ds_i$time <- ds_i$time * dimethenamid_2018$f_time_norm[i] ds_i }) names(dmta_ds) <- sapply(dimethenamid_2018$ds, function(ds) ds$title) dmta_ds[[\"Elliot\"]] <- rbind(dmta_ds[[\"Elliot 1\"]], dmta_ds[[\"Elliot 2\"]]) dmta_ds[[\"Elliot 1\"]] <- NULL dmta_ds[[\"Elliot 2\"]] <- NULL"},{"path":"https://pkgdown.jrwb.de/mkin/articles/web_only/dimethenamid_2018.html","id":"parent-degradation","dir":"Articles > Web_only","previous_headings":"","what":"Parent degradation","title":"Example evaluations of the dimethenamid data from 2018","text":"evaluate observed degradation parent compound using simple exponential decline (SFO) biexponential decline (DFOP), using constant variance (const) two-component variance (tc) error models.","code":""},{"path":"https://pkgdown.jrwb.de/mkin/articles/web_only/dimethenamid_2018.html","id":"separate-evaluations","dir":"Articles > Web_only","previous_headings":"Parent degradation","what":"Separate evaluations","title":"Example evaluations of the dimethenamid data from 2018","text":"first step, get visual impression fit different models, separate evaluations soil using mmkin function mkin package: plot individual SFO fits shown suggests least datasets degradation slows towards later time points, scatter residuals error smaller smaller values (panel right): Using biexponential decline (DFOP) results slightly random scatter residuals: population curve (bold line) plot results taking mean individual transformed parameters, .e. log k1 log k2, well logit g parameter DFOP model). , procedure result parameters represent degradation well, datasets fitted value k2 extremely close zero, leading log k2 value dominates average. alleviated rate constants pass t-test significant difference zero (untransformed scale) considered averaging: visually much satisfactory, average procedure introduce bias, results individual fits enter population curve weight. nonlinear mixed-effects models can help treating datasets equally fitting parameter distribution model together degradation model error model (see ). remaining trend residuals higher higher predicted residues reduced using two-component error model: However, note case using error model, fits Flaach BBA 2.3 datasets appear ill-defined, indicated fact converge:","code":"f_parent_mkin_const <- mmkin(c(\"SFO\", \"DFOP\"), dmta_ds, error_model = \"const\", quiet = TRUE) f_parent_mkin_tc <- mmkin(c(\"SFO\", \"DFOP\"), dmta_ds, error_model = \"tc\", quiet = TRUE) plot(mixed(f_parent_mkin_const[\"SFO\", ])) plot(mixed(f_parent_mkin_const[\"DFOP\", ])) plot(mixed(f_parent_mkin_const[\"DFOP\", ]), test_log_parms = TRUE) plot(mixed(f_parent_mkin_tc[\"DFOP\", ]), test_log_parms = TRUE) print(f_parent_mkin_tc[\"DFOP\", ]) <mmkin> object Status of individual fits: dataset model Calke Borstel Flaach BBA 2.2 BBA 2.3 Elliot DFOP OK OK OK OK C OK C: Optimisation did not converge: iteration limit reached without convergence (10) OK: No warnings"},{"path":"https://pkgdown.jrwb.de/mkin/articles/web_only/dimethenamid_2018.html","id":"nonlinear-mixed-effects-models","dir":"Articles > Web_only","previous_headings":"Parent degradation","what":"Nonlinear mixed-effects models","title":"Example evaluations of the dimethenamid data from 2018","text":"Instead taking model selection decision individual fits, fit nonlinear mixed-effects models (using different fitting algorithms implemented different packages) model selection using available data time. order make sure decisions unduly influenced type algorithm used, implementation details use wrong control parameters, compare model selection results obtained different R packages, different algorithms checking control parameters.","code":""},{"path":"https://pkgdown.jrwb.de/mkin/articles/web_only/dimethenamid_2018.html","id":"nlme","dir":"Articles > Web_only","previous_headings":"Parent degradation > Nonlinear mixed-effects models","what":"nlme","title":"Example evaluations of the dimethenamid data from 2018","text":"nlme package first R extension providing facilities fit nonlinear mixed-effects models. like model selection four combinations degradation models error models based AIC. However, fitting DFOP model constant variance using default control parameters results error, signalling maximum number 50 iterations reached, potentially indicating overparameterisation. Nevertheless, algorithm converges two-component error model used combination DFOP model. can explained fact smaller residues observed later sampling times get weight using two-component error model counteract tendency algorithm try parameter combinations unsuitable fitting data. Note certain degree overparameterisation also indicated warning obtained fitting DFOP two-component error model (‘false convergence’ ‘LME step’ iteration 3). However, warning occur later iterations, specifically last 5 iterations, can ignore warning. model comparison function nlme package can directly applied fits showing much lower AIC DFOP model fitted two-component error model. Also, likelihood ratio test indicates difference significant p-value 0.0001. addition fits, attempts also made include correlations random effects using log Cholesky parameterisation matrix specifying . code used attempts can made visible . SFO variants converge fast, additional parameters introduced lead convergence warnings DFOP model. model comparison clearly show adding correlations random effects improve fits. selected model (DFOP two-component error) fitted data assuming correlations random effects shown .","code":"library(nlme) f_parent_nlme_sfo_const <- nlme(f_parent_mkin_const[\"SFO\", ]) # f_parent_nlme_dfop_const <- nlme(f_parent_mkin_const[\"DFOP\", ]) f_parent_nlme_sfo_tc <- nlme(f_parent_mkin_tc[\"SFO\", ]) f_parent_nlme_dfop_tc <- nlme(f_parent_mkin_tc[\"DFOP\", ]) anova( f_parent_nlme_sfo_const, f_parent_nlme_sfo_tc, f_parent_nlme_dfop_tc ) Model df AIC BIC logLik Test L.Ratio p-value f_parent_nlme_sfo_const 1 5 796.60 811.82 -393.30 f_parent_nlme_sfo_tc 2 6 798.60 816.86 -393.30 1 vs 2 0.00 0.998 f_parent_nlme_dfop_tc 3 10 671.91 702.34 -325.95 2 vs 3 134.69 <.0001 f_parent_nlme_sfo_const_logchol <- nlme(f_parent_mkin_const[\"SFO\", ], random = nlme::pdLogChol(list(DMTA_0 ~ 1, log_k_DMTA ~ 1))) anova(f_parent_nlme_sfo_const, f_parent_nlme_sfo_const_logchol) f_parent_nlme_sfo_tc_logchol <- nlme(f_parent_mkin_tc[\"SFO\", ], random = nlme::pdLogChol(list(DMTA_0 ~ 1, log_k_DMTA ~ 1))) anova(f_parent_nlme_sfo_tc, f_parent_nlme_sfo_tc_logchol) f_parent_nlme_dfop_tc_logchol <- nlme(f_parent_mkin_const[\"DFOP\", ], random = nlme::pdLogChol(list(DMTA_0 ~ 1, log_k1 ~ 1, log_k2 ~ 1, g_qlogis ~ 1))) anova(f_parent_nlme_dfop_tc, f_parent_nlme_dfop_tc_logchol) plot(f_parent_nlme_dfop_tc)"},{"path":"https://pkgdown.jrwb.de/mkin/articles/web_only/dimethenamid_2018.html","id":"saemix","dir":"Articles > Web_only","previous_headings":"Parent degradation > Nonlinear mixed-effects models","what":"saemix","title":"Example evaluations of the dimethenamid data from 2018","text":"saemix package provided first Open Source implementation Stochastic Approximation Expectation Maximisation (SAEM) algorithm. SAEM fits degradation models can conveniently performed using interface saemix package available current development versions mkin package. corresponding SAEM fits four combinations degradation error models fitted . convergence criterion implemented saemix package, convergence plots need manually checked every fit. define control settings work well parent data fits shown vignette. convergence plot SFO model using constant variance shown . Obviously selected number iterations sufficient reach convergence. can also said SFO fit using two-component error model. fitting DFOP model constant variance (see ), parameter convergence unambiguous. parameters converge credible values, variance k2 (omega2.k2) converges small value. printout saem.mmkin model shows estimated standard deviation k2 across population soils (SD.k2) ill-defined, indicating overparameterisation model. DFOP model fitted two-component error model, also observe estimated variance k2 becomes small, ill-defined, illustrated excessive confidence interval SD.k2. Doubling number iterations first phase algorithm leads slightly lower likelihood, therefore slightly higher AIC BIC values. even iterations, algorithm stops error message. related variance k2 approximating zero submitted bug saemix package, algorithm converge case. alternative way fit DFOP combination two-component error model use model formulation transformed parameters used per default mkin. using option, convergence slower, eventually algorithm stops well error message. four combinations (SFO/const, SFO/tc, DFOP/const DFOP/tc) version increased iterations can compared using model comparison function saemix package: order check influence likelihood calculation algorithms implemented saemix, likelihood Gaussian quadrature added best fit, AIC values obtained three methods compared. AIC values based importance sampling Gaussian quadrature similar. Using linearisation known less accurate, still gives similar value. order illustrate comparison three method depends degree convergence obtained fit, comparison shown fit using defaults number iterations number MCMC chains. using OpenBlas linear algebra, large difference values obtained Gaussian quadrature, larger number iterations makes lot difference. using LAPACK version coming Debian Bullseye, AIC based Gaussian quadrature almost one obtained methods, also using defaults fit.","code":"library(saemix) saemix_control <- saemixControl(nbiter.saemix = c(800, 300), nb.chains = 15, print = FALSE, save = FALSE, save.graphs = FALSE, displayProgress = FALSE) saemix_control_moreiter <- saemixControl(nbiter.saemix = c(1600, 300), nb.chains = 15, print = FALSE, save = FALSE, save.graphs = FALSE, displayProgress = FALSE) saemix_control_10k <- saemixControl(nbiter.saemix = c(10000, 300), nb.chains = 15, print = FALSE, save = FALSE, save.graphs = FALSE, displayProgress = FALSE) f_parent_saemix_sfo_const <- mkin::saem(f_parent_mkin_const[\"SFO\", ], quiet = TRUE, control = saemix_control, transformations = \"saemix\") plot(f_parent_saemix_sfo_const$so, plot.type = \"convergence\") f_parent_saemix_sfo_tc <- mkin::saem(f_parent_mkin_tc[\"SFO\", ], quiet = TRUE, control = saemix_control, transformations = \"saemix\") plot(f_parent_saemix_sfo_tc$so, plot.type = \"convergence\") f_parent_saemix_dfop_const <- mkin::saem(f_parent_mkin_const[\"DFOP\", ], quiet = TRUE, control = saemix_control, transformations = \"saemix\") plot(f_parent_saemix_dfop_const$so, plot.type = \"convergence\") print(f_parent_saemix_dfop_const) Kinetic nonlinear mixed-effects model fit by SAEM Structural model: d_DMTA/dt = - ((k1 * g * exp(-k1 * time) + k2 * (1 - g) * exp(-k2 * time)) / (g * exp(-k1 * time) + (1 - g) * exp(-k2 * time))) * DMTA Data: 155 observations of 1 variable(s) grouped in 6 datasets Likelihood computed by importance sampling AIC BIC logLik 706 704 -344 Fitted parameters: estimate lower upper DMTA_0 97.99583 96.50079 99.4909 k1 0.06377 0.03432 0.0932 k2 0.00848 0.00444 0.0125 g 0.95701 0.91313 1.0009 a.1 1.82141 1.60516 2.0377 SD.DMTA_0 1.64787 0.45729 2.8384 SD.k1 0.57439 0.24731 0.9015 SD.k2 0.03296 -2.50524 2.5712 SD.g 1.10266 0.32354 1.8818 f_parent_saemix_dfop_tc <- mkin::saem(f_parent_mkin_tc[\"DFOP\", ], quiet = TRUE, control = saemix_control, transformations = \"saemix\") f_parent_saemix_dfop_tc_moreiter <- mkin::saem(f_parent_mkin_tc[\"DFOP\", ], quiet = TRUE, control = saemix_control_moreiter, transformations = \"saemix\") plot(f_parent_saemix_dfop_tc$so, plot.type = \"convergence\") print(f_parent_saemix_dfop_tc) Kinetic nonlinear mixed-effects model fit by SAEM Structural model: d_DMTA/dt = - ((k1 * g * exp(-k1 * time) + k2 * (1 - g) * exp(-k2 * time)) / (g * exp(-k1 * time) + (1 - g) * exp(-k2 * time))) * DMTA Data: 155 observations of 1 variable(s) grouped in 6 datasets Likelihood computed by importance sampling AIC BIC logLik 666 664 -323 Fitted parameters: estimate lower upper DMTA_0 98.24165 96.29190 100.1914 k1 0.06421 0.03352 0.0949 k2 0.00866 0.00617 0.0111 g 0.95340 0.91218 0.9946 a.1 1.06463 0.86503 1.2642 b.1 0.02964 0.02259 0.0367 SD.DMTA_0 2.03611 0.40416 3.6681 SD.k1 0.59534 0.25692 0.9338 SD.k2 0.00042 -73.01372 73.0146 SD.g 1.04234 0.37189 1.7128 AIC_parent_saemix <- saemix::compare.saemix( f_parent_saemix_sfo_const$so, f_parent_saemix_sfo_tc$so, f_parent_saemix_dfop_const$so, f_parent_saemix_dfop_tc$so, f_parent_saemix_dfop_tc_moreiter$so) Likelihoods calculated by importance sampling rownames(AIC_parent_saemix) <- c( \"SFO const\", \"SFO tc\", \"DFOP const\", \"DFOP tc\", \"DFOP tc more iterations\") print(AIC_parent_saemix) AIC BIC SFO const 796.38 795.34 SFO tc 798.38 797.13 DFOP const 705.75 703.88 DFOP tc 665.67 663.59 DFOP tc more iterations 665.85 663.76 f_parent_saemix_dfop_tc$so <- saemix::llgq.saemix(f_parent_saemix_dfop_tc$so) AIC_parent_saemix_methods <- c( is = AIC(f_parent_saemix_dfop_tc$so, method = \"is\"), gq = AIC(f_parent_saemix_dfop_tc$so, method = \"gq\"), lin = AIC(f_parent_saemix_dfop_tc$so, method = \"lin\") ) print(AIC_parent_saemix_methods) is gq lin 665.67 665.74 665.13 f_parent_saemix_dfop_tc_defaults <- mkin::saem(f_parent_mkin_tc[\"DFOP\", ]) f_parent_saemix_dfop_tc_defaults$so <- saemix::llgq.saemix(f_parent_saemix_dfop_tc_defaults$so) AIC_parent_saemix_methods_defaults <- c( is = AIC(f_parent_saemix_dfop_tc_defaults$so, method = \"is\"), gq = AIC(f_parent_saemix_dfop_tc_defaults$so, method = \"gq\"), lin = AIC(f_parent_saemix_dfop_tc_defaults$so, method = \"lin\") ) print(AIC_parent_saemix_methods_defaults) is gq lin 670.09 669.37 671.29"},{"path":"https://pkgdown.jrwb.de/mkin/articles/web_only/dimethenamid_2018.html","id":"comparison","dir":"Articles > Web_only","previous_headings":"Parent degradation","what":"Comparison","title":"Example evaluations of the dimethenamid data from 2018","text":"following table gives AIC values obtained backend packages using control parameters (800 iterations burn-, 300 iterations second phase, 15 chains).","code":"AIC_all <- data.frame( check.names = FALSE, \"Degradation model\" = c(\"SFO\", \"SFO\", \"DFOP\", \"DFOP\"), \"Error model\" = c(\"const\", \"tc\", \"const\", \"tc\"), nlme = c(AIC(f_parent_nlme_sfo_const), AIC(f_parent_nlme_sfo_tc), NA, AIC(f_parent_nlme_dfop_tc)), saemix_lin = sapply(list(f_parent_saemix_sfo_const$so, f_parent_saemix_sfo_tc$so, f_parent_saemix_dfop_const$so, f_parent_saemix_dfop_tc$so), AIC, method = \"lin\"), saemix_is = sapply(list(f_parent_saemix_sfo_const$so, f_parent_saemix_sfo_tc$so, f_parent_saemix_dfop_const$so, f_parent_saemix_dfop_tc$so), AIC, method = \"is\") ) kable(AIC_all)"},{"path":"https://pkgdown.jrwb.de/mkin/articles/web_only/dimethenamid_2018.html","id":"conclusion","dir":"Articles > Web_only","previous_headings":"","what":"Conclusion","title":"Example evaluations of the dimethenamid data from 2018","text":"detailed analysis dimethenamid dataset confirmed DFOP model provides appropriate description decline parent compound data. hand, closer inspection results revealed variability k2 parameter across population soils ill-defined. coincides observation parameter robustly quantified soils. Regarding regulatory use data, claimed improved characterisation mean parameter values across population obtained using nonlinear mixed-effects models presented . However, attempts quantify variability slower rate constant biphasic decline dimethenamid indicate data sufficient characterise variability satisfactory precision.","code":""},{"path":"https://pkgdown.jrwb.de/mkin/articles/web_only/dimethenamid_2018.html","id":"session-info","dir":"Articles > Web_only","previous_headings":"","what":"Session Info","title":"Example evaluations of the dimethenamid data from 2018","text":"","code":"sessionInfo() R version 4.3.2 (2023-10-31) Platform: x86_64-pc-linux-gnu (64-bit) Running under: Debian GNU/Linux 12 (bookworm) Matrix products: default BLAS: /usr/lib/x86_64-linux-gnu/blas/libblas.so.3.11.0 LAPACK: /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3.11.0 locale: [1] LC_CTYPE=de_DE.UTF-8 LC_NUMERIC=C [3] LC_TIME=C LC_COLLATE=de_DE.UTF-8 [5] LC_MONETARY=de_DE.UTF-8 LC_MESSAGES=de_DE.UTF-8 [7] LC_PAPER=de_DE.UTF-8 LC_NAME=C [9] LC_ADDRESS=C LC_TELEPHONE=C [11] LC_MEASUREMENT=de_DE.UTF-8 LC_IDENTIFICATION=C time zone: Europe/Berlin tzcode source: system (glibc) attached base packages: [1] stats graphics grDevices utils datasets methods base other attached packages: [1] saemix_3.2 npde_3.3 nlme_3.1-163 mkin_1.2.6 knitr_1.42 loaded via a namespace (and not attached): [1] sass_0.4.6 utf8_1.2.3 generics_0.1.3 stringi_1.7.12 [5] lattice_0.21-8 digest_0.6.31 magrittr_2.0.3 evaluate_0.21 [9] grid_4.3.2 fastmap_1.1.1 rprojroot_2.0.3 jsonlite_1.8.4 [13] DBI_1.1.3 mclust_6.0.0 gridExtra_2.3 purrr_1.0.1 [17] fansi_1.0.4 scales_1.2.1 codetools_0.2-19 textshaping_0.3.6 [21] jquerylib_0.1.4 cli_3.6.1 rlang_1.1.1 munsell_0.5.0 [25] cachem_1.0.8 yaml_2.3.7 tools_4.3.2 parallel_4.3.2 [29] memoise_2.0.1 dplyr_1.1.2 colorspace_2.1-0 ggplot2_3.4.2 [33] vctrs_0.6.2 R6_2.5.1 zoo_1.8-12 lifecycle_1.0.3 [37] stringr_1.5.0 fs_1.6.2 MASS_7.3-60 ragg_1.2.5 [41] pkgconfig_2.0.3 desc_1.4.2 pkgdown_2.0.7 bslib_0.4.2 [45] pillar_1.9.0 gtable_0.3.3 glue_1.6.2 systemfonts_1.0.4 [49] highr_0.10 xfun_0.39 tibble_3.2.1 lmtest_0.9-40 [53] tidyselect_1.2.0 htmltools_0.5.5 rmarkdown_2.21 compiler_4.3.2"},{"path":[]},{"path":"https://pkgdown.jrwb.de/mkin/articles/web_only/saem_benchmarks.html","id":"test-data","dir":"Articles > Web_only","previous_headings":"","what":"Test data","title":"Benchmark timings for saem.mmkin","text":"Please refer vignette dimethenamid_2018 explanation following preprocessing.","code":"dmta_ds <- lapply(1:7, function(i) { ds_i <- dimethenamid_2018$ds[[i]]$data ds_i[ds_i$name == \"DMTAP\", \"name\"] <- \"DMTA\" ds_i$time <- ds_i$time * dimethenamid_2018$f_time_norm[i] ds_i }) names(dmta_ds) <- sapply(dimethenamid_2018$ds, function(ds) ds$title) dmta_ds[[\"Elliot\"]] <- rbind(dmta_ds[[\"Elliot 1\"]], dmta_ds[[\"Elliot 2\"]]) dmta_ds[[\"Elliot 1\"]] <- NULL dmta_ds[[\"Elliot 2\"]] <- NULL"},{"path":[]},{"path":"https://pkgdown.jrwb.de/mkin/articles/web_only/saem_benchmarks.html","id":"parent-only","dir":"Articles > Web_only","previous_headings":"Test cases","what":"Parent only","title":"Benchmark timings for saem.mmkin","text":"model comparison suggests use SFORB model two-component error. comparison, keep DFOP model two-component error, competes SFORB biphasic curves. two models, random effects transformed parameters k2 k_DMTA_bound_free quantified.","code":"parent_mods <- c(\"SFO\", \"DFOP\", \"SFORB\", \"HS\") parent_sep_const <- mmkin(parent_mods, dmta_ds, quiet = TRUE, cores = n_cores) parent_sep_tc <- update(parent_sep_const, error_model = \"tc\") t1 <- system.time(sfo_const <- saem(parent_sep_const[\"SFO\", ]))[[\"elapsed\"]] t2 <- system.time(dfop_const <- saem(parent_sep_const[\"DFOP\", ]))[[\"elapsed\"]] t3 <- system.time(sforb_const <- saem(parent_sep_const[\"SFORB\", ]))[[\"elapsed\"]] t4 <- system.time(hs_const <- saem(parent_sep_const[\"HS\", ]))[[\"elapsed\"]] t5 <- system.time(sfo_tc <- saem(parent_sep_tc[\"SFO\", ]))[[\"elapsed\"]] t6 <- system.time(dfop_tc <- saem(parent_sep_tc[\"DFOP\", ]))[[\"elapsed\"]] t7 <- system.time(sforb_tc <- saem(parent_sep_tc[\"SFORB\", ]))[[\"elapsed\"]] t8 <- system.time(hs_tc <- saem(parent_sep_tc[\"HS\", ]))[[\"elapsed\"]] anova( sfo_const, dfop_const, sforb_const, hs_const, sfo_tc, dfop_tc, sforb_tc, hs_tc) |> kable(, digits = 1) illparms(dfop_tc) ## [1] \"sd(log_k2)\" illparms(sforb_tc) ## [1] \"sd(log_k_DMTA_bound_free)\""},{"path":"https://pkgdown.jrwb.de/mkin/articles/web_only/saem_benchmarks.html","id":"one-metabolite","dir":"Articles > Web_only","previous_headings":"Test cases","what":"One metabolite","title":"Benchmark timings for saem.mmkin","text":"remove parameters found ill-defined parent fits.","code":"one_met_mods <- list( DFOP_SFO = mkinmod( DMTA = mkinsub(\"DFOP\", \"M23\"), M23 = mkinsub(\"SFO\")), SFORB_SFO = mkinmod( DMTA = mkinsub(\"SFORB\", \"M23\"), M23 = mkinsub(\"SFO\"))) one_met_sep_const <- mmkin(one_met_mods, dmta_ds, error_model = \"const\", cores = n_cores, quiet = TRUE) one_met_sep_tc <- mmkin(one_met_mods, dmta_ds, error_model = \"tc\", cores = n_cores, quiet = TRUE) t9 <- system.time(dfop_sfo_tc <- saem(one_met_sep_tc[\"DFOP_SFO\", ], no_random_effect = \"log_k2\"))[[\"elapsed\"]] t10 <- system.time(sforb_sfo_tc <- saem(one_met_sep_tc[\"SFORB_SFO\", ], no_random_effect = \"log_k_DMTA_bound_free\"))[[\"elapsed\"]]"},{"path":"https://pkgdown.jrwb.de/mkin/articles/web_only/saem_benchmarks.html","id":"three-metabolites","dir":"Articles > Web_only","previous_headings":"Test cases","what":"Three metabolites","title":"Benchmark timings for saem.mmkin","text":"case three metabolites, keep SFORB model order limit time compiling vignette, fitting parallel may disturb benchmark. , include random effects ill-defined previous fits subsets degradation model.","code":"illparms(sforb_sfo_tc) three_met_mods <- list( SFORB_SFO3_plus = mkinmod( DMTA = mkinsub(\"SFORB\", c(\"M23\", \"M27\", \"M31\")), M23 = mkinsub(\"SFO\"), M27 = mkinsub(\"SFO\"), M31 = mkinsub(\"SFO\", \"M27\", sink = FALSE))) three_met_sep_tc <- mmkin(three_met_mods, dmta_ds, error_model = \"tc\", cores = n_cores, quiet = TRUE) t11 <- system.time(sforb_sfo3_plus_const <- saem(three_met_sep_tc[\"SFORB_SFO3_plus\", ], no_random_effect = \"log_k_DMTA_bound_free\"))[[\"elapsed\"]]"},{"path":"https://pkgdown.jrwb.de/mkin/articles/web_only/saem_benchmarks.html","id":"results","dir":"Articles > Web_only","previous_headings":"","what":"Results","title":"Benchmark timings for saem.mmkin","text":"Benchmarks available error models shown. intended improving mkin, comparing CPUs operating systems. trademarks belong respective owners.","code":""},{"path":"https://pkgdown.jrwb.de/mkin/articles/web_only/saem_benchmarks.html","id":"parent-only-1","dir":"Articles > Web_only","previous_headings":"Results","what":"Parent only","title":"Benchmark timings for saem.mmkin","text":"Constant variance SFO, DFOP, SFORB HS. Two-component error fits SFO, DFOP, SFORB HS.","code":""},{"path":"https://pkgdown.jrwb.de/mkin/articles/web_only/saem_benchmarks.html","id":"one-metabolite-1","dir":"Articles > Web_only","previous_headings":"Results","what":"One metabolite","title":"Benchmark timings for saem.mmkin","text":"Two-component error DFOP-SFO SFORB-SFO.","code":""},{"path":"https://pkgdown.jrwb.de/mkin/articles/web_only/saem_benchmarks.html","id":"three-metabolites-1","dir":"Articles > Web_only","previous_headings":"Results","what":"Three metabolites","title":"Benchmark timings for saem.mmkin","text":"Two-component error SFORB-SFO3-plus","code":""},{"path":"https://pkgdown.jrwb.de/mkin/authors.html","id":null,"dir":"","previous_headings":"","what":"Authors","title":"Authors and Citation","text":"Johannes Ranke. Author, maintainer, copyright holder. Katrin Lindenberger. Contributor. contributed mkinresplot() René Lehmann. Contributor. ilr() invilr() Eurofins Regulatory AG. Copyright holder. copyright contributions JR 2012-2014","code":""},{"path":"https://pkgdown.jrwb.de/mkin/authors.html","id":"citation","dir":"","previous_headings":"","what":"Citation","title":"Authors and Citation","text":"Ranke J (2023). mkin: Kinetic Evaluation Chemical Degradation Data. R package version 1.2.6, https://pkgdown.jrwb.de/mkin/.","code":"@Manual{, title = {mkin: Kinetic Evaluation of Chemical Degradation Data}, author = {Johannes Ranke}, year = {2023}, note = {R package version 1.2.6}, url = {https://pkgdown.jrwb.de/mkin/}, }"},{"path":"https://pkgdown.jrwb.de/mkin/index.html","id":"mkin","dir":"","previous_headings":"","what":"Kinetic Evaluation of Chemical Degradation Data","title":"Kinetic Evaluation of Chemical Degradation Data","text":"R package mkin provides calculation routines analysis chemical degradation data, including multicompartment kinetics needed modelling formation decline transformation products, several degradation compartments involved. provides stable functionality kinetic evaluations according FOCUS guidance (see details). addition, provides functionality hierarchical kinetics based nonlinear mixed-effects models.","code":""},{"path":"https://pkgdown.jrwb.de/mkin/index.html","id":"installation","dir":"","previous_headings":"","what":"Installation","title":"Kinetic Evaluation of Chemical Degradation Data","text":"can install latest released version CRAN within R:","code":"install.packages(\"mkin\")"},{"path":"https://pkgdown.jrwb.de/mkin/index.html","id":"background","dir":"","previous_headings":"","what":"Background","title":"Kinetic Evaluation of Chemical Degradation Data","text":"regulatory evaluation chemical substances like plant protection products (pesticides), biocides chemicals, degradation data play important role. evaluation pesticide degradation experiments, detailed guidance various helpful tools developed detailed ‘Credits historical remarks’ . package aims provide one stop solution degradation kinetics, addressing modellers willing , even prefer work R.","code":""},{"path":"https://pkgdown.jrwb.de/mkin/index.html","id":"basic-usage","dir":"","previous_headings":"","what":"Basic usage","title":"Kinetic Evaluation of Chemical Degradation Data","text":"start, look code examples provided plot.mkinfit plot.mmkin, package vignettes FOCUS L FOCUS D.","code":""},{"path":"https://pkgdown.jrwb.de/mkin/index.html","id":"documentation","dir":"","previous_headings":"","what":"Documentation","title":"Kinetic Evaluation of Chemical Degradation Data","text":"HTML documentation latest version released CRAN available jrwb.de github. Documentation development version found ‘dev’ subdirectory. articles section documentation, can also find demonstrations application nonlinear hierarchical models, also known nonlinear mixed-effects models, complex data, including transformation products covariates.","code":""},{"path":[]},{"path":"https://pkgdown.jrwb.de/mkin/index.html","id":"general","dir":"","previous_headings":"Features","what":"General","title":"Kinetic Evaluation of Chemical Degradation Data","text":"Highly flexible model specification using mkinmod, including equilibrium reactions using single first-order reversible binding (SFORB) model, automatically create two state variables observed variable. Model solution (forward modelling) function mkinpredict performed either using analytical solution case parent degradation simple models involving single transformation product, , eigenvalue based solution simple first-order (SFO) SFORB kinetics used model, using numeric solver deSolve package (default lsoda). usual one-sided t-test significant difference zero shown based estimators untransformed parameters. Summary plotting functions. summary mkinfit object fact full report give enough information able approximately reproduce fit tools. chi-squared error level defined FOCUS kinetics guidance (see ) calculated observed variable. ‘variance variable’ error model often fitted using Iteratively Reweighted Least Squares (IRLS) can specified error_model = \"obs\".","code":""},{"path":"https://pkgdown.jrwb.de/mkin/index.html","id":"unique-in-mkin","dir":"","previous_headings":"Features","what":"Unique in mkin","title":"Kinetic Evaluation of Chemical Degradation Data","text":"Three different error models can selected using argument error_model mkinfit function. two-component error model similar one proposed Rocke Lorenzato can selected using argument error_model = \"tc\". Model comparisons using Akaike Information Criterion (AIC) supported can also used non-constant variance. cases FOCUS chi-squared error level meaningful. default, kinetic rate constants kinetic formation fractions transformed internally using transform_odeparms estimators can reasonably expected follow normal distribution. parameter estimates backtransformed match model definition, confidence intervals calculated standard errors also backtransformed correct scale, include meaningless values like negative rate constants formation fractions adding 1, occur single experiment single defined radiolabel position. metabolite decline phase described well SFO kinetics, SFORB kinetics can used metabolite. Mathematically, SFORB model equivalent DFOP model. However, SFORB model advantage mechanistic interpretation model parameters. Nonlinear mixed-effects models (hierarchical models) can created fits degradation model different datasets compound using nlme.mmkin saem.mmkin methods. Note convergence nlme fits depends quality data. Convergence better simple models data many groups (e.g. soils). saem method uses saemix package backend. Analytical solutions suitable use package implemented parent models important models including one metabolite (SFO-SFO DFOP-SFO). Fitting models saem.mmkin, makes use compiled ODE models mkin provides, longer run times (couple minutes hour).","code":""},{"path":"https://pkgdown.jrwb.de/mkin/index.html","id":"performance","dir":"","previous_headings":"Features","what":"Performance","title":"Kinetic Evaluation of Chemical Degradation Data","text":"Parallel fitting several models several datasets supported, see example plot.mmkin. C compiler installed, kinetic models compiled automatically generated C code, see vignette compiled_models. autogeneration C code inspired ccSolve package. Thanks Karline Soetaert work . Even compiler installed, many degradation models still give good performance, current versions mkin also analytical solutions models one metabolite, SFO SFORB used parent compound, Eigenvalue based solutions degradation model available.","code":""},{"path":"https://pkgdown.jrwb.de/mkin/index.html","id":"gui","dir":"","previous_headings":"","what":"GUI","title":"Kinetic Evaluation of Chemical Degradation Data","text":"graphical user interface may useful. Please refer documentation page installation instructions manual. supports evaluations using (generalised) nonlinear regression, simultaneous fits using nonlinear mixed-effects models.","code":""},{"path":"https://pkgdown.jrwb.de/mkin/index.html","id":"news","dir":"","previous_headings":"","what":"News","title":"Kinetic Evaluation of Chemical Degradation Data","text":"list changes latest CRAN release one github branch, e.g. main branch.","code":""},{"path":"https://pkgdown.jrwb.de/mkin/index.html","id":"credits-and-historical-remarks","dir":"","previous_headings":"","what":"Credits and historical remarks","title":"Kinetic Evaluation of Chemical Degradation Data","text":"mkin possible without underlying software stack consisting , among others, R package deSolve. previous version, mkin also using functionality FME package. Please refer package page CRAN full list imported suggested R packages. Also, Debian Linux, vim editor Nvim-R plugin invaluable development. mkin written without introduced regulatory fate modelling pesticides Adrian Gurney time Harlan Laboratories Ltd (formerly RCC Ltd). mkin greatly profits largely follows work done FOCUS Degradation Kinetics Workgroup, detailed guidance document 2006, slightly updated 2011 2014. Also, inspired first version KinGUI developed BayerCropScience, based MatLab runtime environment. companion package kinfit (now deprecated) started 2008 first published CRAN 01 May 2010. first mkin code published 11 May 2010 first CRAN version 18 May 2010. 2011, Bayer Crop Science started distribute R based successor KinGUI named KinGUII whose R code based mkin, added, among refinements, closed source graphical user interface (GUI), iteratively reweighted least squares (IRLS) optimisation variance observed variables, Markov Chain Monte Carlo (MCMC) simulation functionality, similar available e.g. FME package. Somewhat parallel, Syngenta sponsored development mkin KinGUII based GUI application called CAKE, also adds IRLS MCMC, limited model formulation, puts weight usability. CAKE available download CAKE website, can also find zip archive R scripts derived mkin, published GPL license. Finally, KineticEval, contains development scripts used KinGUII. Thanks René Lehmann, formerly working Umweltbundesamt, nice cooperation parameter transformations, especially isometric log-ratio transformation now used formation fractions case two transformation targets. Many inspirations improvements mkin resulted kinetic evaluations degradation data clients working Harlan Laboratories Eurofins Regulatory AG, now independent consultant. Funding received Umweltbundesamt course projects Project Number 27452 (Testing validation modelling software alternative ModelMaker 4.0, 2014-2015) Project Number 56703 (Optimization gmkin routine use Umweltbundesamt, 2015) Project Number 92570 (Update Project Number 27452, 2017-2018) Project Number 112407 (Testing feasibility using error model according Rocke Lorenzato realistic parameter estimates kinetic evaluation degradation data, 2018-2019) Project Number 120667 (Development objective criteria evaluation visual fit kinetic evaluation degradation data, 2019-2020) Project Number 146839 (Checking feasibility using mixed-effects models derivation kinetic modelling parameters degradation studies, 2020-2021) Project Number 173340 (Application nonlinear hierarchical models kinetic evaluation chemical degradation data) Thanks everyone involved collaboration support! Thanks due also Emmanuelle Comets, maintainer saemix package, interest support using SAEM algorithm implementation saemix evaluation chemical degradation data. Regarding application nonlinear mixed-effects models degradation data, von Götz et al (1999) already proposed use technique context environmental risk assessments pesticides. However, work apparently followed , independently arrive idea missed cite previous work topic first publications.","code":""},{"path":[]},{"path":"https://pkgdown.jrwb.de/mkin/index.html","id":"development","dir":"","previous_headings":"","what":"Development","title":"Kinetic Evaluation of Chemical Degradation Data","text":"Contributions welcome!","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/AIC.mmkin.html","id":null,"dir":"Reference","previous_headings":"","what":"Calculate the AIC for a column of an mmkin object — AIC.mmkin","title":"Calculate the AIC for a column of an mmkin object — AIC.mmkin","text":"Provides convenient way compare different kinetic models fitted dataset.","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/AIC.mmkin.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Calculate the AIC for a column of an mmkin object — AIC.mmkin","text":"","code":"# S3 method for mmkin AIC(object, ..., k = 2) # S3 method for mmkin BIC(object, ...)"},{"path":"https://pkgdown.jrwb.de/mkin/reference/AIC.mmkin.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Calculate the AIC for a column of an mmkin object — AIC.mmkin","text":"object object class mmkin, containing one column. ... compatibility generic method k generic method","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/AIC.mmkin.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Calculate the AIC for a column of an mmkin object — AIC.mmkin","text":"generic method (numeric value single fits, dataframe several fits column).","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/AIC.mmkin.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Calculate the AIC for a column of an mmkin object — AIC.mmkin","text":"Johannes Ranke","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/AIC.mmkin.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Calculate the AIC for a column of an mmkin object — AIC.mmkin","text":"","code":"# skip, as it takes > 10 s on winbuilder f <- mmkin(c(\"SFO\", \"FOMC\", \"DFOP\"), list(\"FOCUS A\" = FOCUS_2006_A, \"FOCUS C\" = FOCUS_2006_C), cores = 1, quiet = TRUE) #> Warning: Optimisation did not converge: #> false convergence (8) # We get a warning because the FOMC model does not converge for the # FOCUS A dataset, as it is well described by SFO AIC(f[\"SFO\", \"FOCUS A\"]) # We get a single number for a single fit #> [1] 55.28197 AIC(f[[\"SFO\", \"FOCUS A\"]]) # or when extracting an mkinfit object #> [1] 55.28197 # For FOCUS A, the models fit almost equally well, so the higher the number # of parameters, the higher (worse) the AIC AIC(f[, \"FOCUS A\"]) #> df AIC #> SFO 3 55.28197 #> FOMC 4 57.28198 #> DFOP 5 59.28197 AIC(f[, \"FOCUS A\"], k = 0) # If we do not penalize additional parameters, we get nearly the same #> df AIC #> SFO 3 49.28197 #> FOMC 4 49.28198 #> DFOP 5 49.28197 BIC(f[, \"FOCUS A\"]) # Comparing the BIC gives a very similar picture #> df BIC #> SFO 3 55.52030 #> FOMC 4 57.59974 #> DFOP 5 59.67918 # For FOCUS C, the more complex models fit better AIC(f[, \"FOCUS C\"]) #> df AIC #> SFO 3 59.29336 #> FOMC 4 44.68652 #> DFOP 5 29.02372 BIC(f[, \"FOCUS C\"]) #> df BIC #> SFO 3 59.88504 #> FOMC 4 45.47542 #> DFOP 5 30.00984"},{"path":"https://pkgdown.jrwb.de/mkin/reference/CAKE_export.html","id":null,"dir":"Reference","previous_headings":"","what":"Export a list of datasets format to a CAKE study file — CAKE_export","title":"Export a list of datasets format to a CAKE study file — CAKE_export","text":"addition datasets, pathways degradation model can specified well.","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/CAKE_export.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Export a list of datasets format to a CAKE study file — CAKE_export","text":"","code":"CAKE_export( ds, map = c(parent = \"Parent\"), links = NA, filename = \"CAKE_export.csf\", path = \".\", overwrite = FALSE, study = \"Degradinol aerobic soil degradation\", description = \"\", time_unit = \"days\", res_unit = \"% AR\", comment = \"\", date = Sys.Date(), optimiser = \"IRLS\" )"},{"path":"https://pkgdown.jrwb.de/mkin/reference/CAKE_export.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Export a list of datasets format to a CAKE study file — CAKE_export","text":"ds named list datasets long format compatible mkinfit. map character vector CAKE compartment names (Parent, A1, ...), named names used list datasets. links optional character vector target compartments, named names source compartments. order make easier, names used datasets supplied. filename write result. end .csf order compatible CAKE. path optional path output file. overwrite TRUE, existing files overwritten. study name study. description optional description. time_unit time unit residue data. res_unit unit used residues. comment optional comment. date date file creation. optimiser Can OLS IRLS.","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/CAKE_export.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Export a list of datasets format to a CAKE study file — CAKE_export","text":"function called side effect.","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/CAKE_export.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Export a list of datasets format to a CAKE study file — CAKE_export","text":"Johannes Ranke","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/D24_2014.html","id":null,"dir":"Reference","previous_headings":"","what":"Aerobic soil degradation data on 2,4-D from the EU assessment in 2014 — D24_2014","title":"Aerobic soil degradation data on 2,4-D from the EU assessment in 2014 — D24_2014","text":"five datasets extracted active substance evaluation dossier published EFSA. Kinetic evaluations shown datasets intended illustrate advance kinetic modelling. fact data results shown imply license use context pesticide registrations, use data may constrained data protection regulations.","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/D24_2014.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Aerobic soil degradation data on 2,4-D from the EU assessment in 2014 — D24_2014","text":"","code":"D24_2014"},{"path":"https://pkgdown.jrwb.de/mkin/reference/D24_2014.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Aerobic soil degradation data on 2,4-D from the EU assessment in 2014 — D24_2014","text":"mkindsg object grouping five datasets","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/D24_2014.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"Aerobic soil degradation data on 2,4-D from the EU assessment in 2014 — D24_2014","text":"Hellenic Ministry Rural Development Agriculture (2014) Final addendum Renewal Assessment Report - public version - 2,4-D Volume 3 Annex B.8 Fate behaviour environment https://open.efsa.europa.eu/study-inventory/EFSA-Q-2013-00811","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/D24_2014.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Aerobic soil degradation data on 2,4-D from the EU assessment in 2014 — D24_2014","text":"Data first dataset p. 685. Data four datasets used preprocessed versions given kinetics section (p. 761ff.), exception residues smaller 1 DCP soil Site I2, values given p. 694 used. R code used create data object installed package 'dataset_generation' directory. code, page numbers given specific pieces information comments.","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/D24_2014.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Aerobic soil degradation data on 2,4-D from the EU assessment in 2014 — D24_2014","text":"","code":"print(D24_2014) #> <mkindsg> holding 5 mkinds objects #> Title $title: Aerobic soil degradation data on 2,4-D from the EU assessment in 2014 #> Occurrence of observed compounds $observed_n: #> D24 DCP DCA #> 5 4 4 #> Time normalisation factors $f_time_norm: #> [1] 1.6062378 0.7118732 0.7156063 0.7156063 0.8977124 #> Meta information $meta: #> study usda_soil_type study_moisture_ref_type #> Mississippi Cohen 1991 Silt loam <NA> #> Fayette Liu and Adelfinskaya 2011 Silt loam pF1 #> RefSol 03-G Liu and Adelfinskaya 2011 Loam pF1 #> Site E1 Liu and Adelfinskaya 2011 Loam pF1 #> Site I2 Liu and Adelfinskaya 2011 Loamy sand pF1 #> rel_moisture temperature #> Mississippi NA 25 #> Fayette 0.5 20 #> RefSol 03-G 0.5 20 #> Site E1 0.5 20 #> Site I2 0.5 20 # \\dontrun{ print(D24_2014$ds[[1]], data = TRUE) #> <mkinds> with $title: Mississippi #> Observed compounds $observed: D24 #> Sampling times $sampling_times: #> 0, 2, 4, 7, 15, 24, 35, 56, 71, 114, 183, 273, 365 #> With a maximum of 1 replicates #> time D24 #> 1 0 96.8 #> 2 2 81.0 #> 3 4 81.7 #> 4 7 88.2 #> 5 15 66.3 #> 6 24 72.9 #> 7 35 62.6 #> 8 56 54.6 #> 9 71 35.2 #> 10 114 18.0 #> 11 183 11.3 #> 12 273 9.9 #> 13 365 6.3 m_D24 = mkinmod(D24 = mkinsub(\"SFO\", to = \"DCP\"), DCP = mkinsub(\"SFO\", to = \"DCA\"), DCA = mkinsub(\"SFO\")) #> Temporary DLL for differentials generated and loaded print(m_D24) #> <mkinmod> model generated with #> Use of formation fractions $use_of_ff: max #> Specification $spec: #> $D24 #> $type: SFO; $to: DCP; $sink: TRUE #> $DCP #> $type: SFO; $to: DCA; $sink: TRUE #> $DCA #> $type: SFO; $sink: TRUE #> Coefficient matrix $coefmat available #> Compiled model $cf available #> Differential equations: #> d_D24/dt = - k_D24 * D24 #> d_DCP/dt = + f_D24_to_DCP * k_D24 * D24 - k_DCP * DCP #> d_DCA/dt = + f_DCP_to_DCA * k_DCP * DCP - k_DCA * DCA m_D24_2 = mkinmod(D24 = mkinsub(\"DFOP\", to = \"DCP\"), DCP = mkinsub(\"SFO\", to = \"DCA\"), DCA = mkinsub(\"SFO\")) #> Temporary DLL for differentials generated and loaded print(m_D24_2) #> <mkinmod> model generated with #> Use of formation fractions $use_of_ff: max #> Specification $spec: #> $D24 #> $type: DFOP; $to: DCP; $sink: TRUE #> $DCP #> $type: SFO; $to: DCA; $sink: TRUE #> $DCA #> $type: SFO; $sink: TRUE #> Compiled model $cf available #> Differential equations: #> d_D24/dt = - ((k1 * g * exp(-k1 * time) + k2 * (1 - g) * exp(-k2 * #> time)) / (g * exp(-k1 * time) + (1 - g) * exp(-k2 * time))) #> * D24 #> d_DCP/dt = + f_D24_to_DCP * ((k1 * g * exp(-k1 * time) + k2 * (1 - g) * #> exp(-k2 * time)) / (g * exp(-k1 * time) + (1 - g) * exp(-k2 #> * time))) * D24 - k_DCP * DCP #> d_DCA/dt = + f_DCP_to_DCA * k_DCP * DCP - k_DCA * DCA # }"},{"path":"https://pkgdown.jrwb.de/mkin/reference/DFOP.solution.html","id":null,"dir":"Reference","previous_headings":"","what":"Double First-Order in Parallel kinetics — DFOP.solution","title":"Double First-Order in Parallel kinetics — DFOP.solution","text":"Function describing decline defined starting value using sum two exponential decline functions.","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/DFOP.solution.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Double First-Order in Parallel kinetics — DFOP.solution","text":"","code":"DFOP.solution(t, parent_0, k1, k2, g)"},{"path":"https://pkgdown.jrwb.de/mkin/reference/DFOP.solution.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Double First-Order in Parallel kinetics — DFOP.solution","text":"t Time. parent_0 Starting value response variable time zero. k1 First kinetic constant. k2 Second kinetic constant. g Fraction starting value declining according first kinetic constant.","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/DFOP.solution.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Double First-Order in Parallel kinetics — DFOP.solution","text":"value response variable time t.","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/DFOP.solution.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Double First-Order in Parallel kinetics — DFOP.solution","text":"FOCUS (2006) “Guidance Document Estimating Persistence Degradation Kinetics Environmental Fate Studies Pesticides EU Registration” Report FOCUS Work Group Degradation Kinetics, EC Document Reference Sanco/10058/2005 version 2.0, 434 pp, http://esdac.jrc.ec.europa.eu/projects/degradation-kinetics FOCUS (2014) “Generic guidance Estimating Persistence Degradation Kinetics Environmental Fate Studies Pesticides EU Registration” Report FOCUS Work Group Degradation Kinetics, Version 1.1, 18 December 2014 http://esdac.jrc.ec.europa.eu/projects/degradation-kinetics","code":""},{"path":[]},{"path":"https://pkgdown.jrwb.de/mkin/reference/DFOP.solution.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Double First-Order in Parallel kinetics — DFOP.solution","text":"","code":"plot(function(x) DFOP.solution(x, 100, 5, 0.5, 0.3), 0, 4, ylim = c(0,100))"},{"path":"https://pkgdown.jrwb.de/mkin/reference/Extract.mmkin.html","id":null,"dir":"Reference","previous_headings":"","what":"Subsetting method for mmkin objects — [.mmkin","title":"Subsetting method for mmkin objects — [.mmkin","text":"Subsetting method mmkin objects","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/Extract.mmkin.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Subsetting method for mmkin objects — [.mmkin","text":"","code":"# S3 method for mmkin [(x, i, j, ..., drop = FALSE)"},{"path":"https://pkgdown.jrwb.de/mkin/reference/Extract.mmkin.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Subsetting method for mmkin objects — [.mmkin","text":"x mmkin object Row index selecting fits specific models j Column index selecting fits specific datasets ... used, satisfy generic method definition drop FALSE, method always returns mmkin object, otherwise either list mkinfit objects single mkinfit object.","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/Extract.mmkin.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Subsetting method for mmkin objects — [.mmkin","text":"object class mmkin.","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/Extract.mmkin.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Subsetting method for mmkin objects — [.mmkin","text":"Johannes Ranke","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/Extract.mmkin.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Subsetting method for mmkin objects — [.mmkin","text":"","code":"# Only use one core, to pass R CMD check --as-cran fits <- mmkin(c(\"SFO\", \"FOMC\"), list(B = FOCUS_2006_B, C = FOCUS_2006_C), cores = 1, quiet = TRUE) fits[\"FOMC\", ] #> <mmkin> object #> Status of individual fits: #> #> dataset #> model B C #> FOMC OK OK #> #> OK: No warnings fits[, \"B\"] #> <mmkin> object #> Status of individual fits: #> #> dataset #> model B #> SFO OK #> FOMC OK #> #> OK: No warnings fits[\"SFO\", \"B\"] #> <mmkin> object #> Status of individual fits: #> #> dataset #> model B #> SFO OK #> #> OK: No warnings head( # This extracts an mkinfit object with lots of components fits[[\"FOMC\", \"B\"]] ) #> $par #> parent_0 log_alpha log_beta sigma #> 99.666192 2.549850 5.050587 1.890202 #> #> $objective #> [1] 28.58291 #> #> $convergence #> [1] 0 #> #> $iterations #> [1] 21 #> #> $evaluations #> function gradient #> 25 78 #> #> $message #> [1] \"both X-convergence and relative convergence (5)\" #>"},{"path":"https://pkgdown.jrwb.de/mkin/reference/FOCUS_2006_DFOP_ref_A_to_B.html","id":null,"dir":"Reference","previous_headings":"","what":"Results of fitting the DFOP model to Datasets A to B of FOCUS (2006) — FOCUS_2006_DFOP_ref_A_to_B","title":"Results of fitting the DFOP model to Datasets A to B of FOCUS (2006) — FOCUS_2006_DFOP_ref_A_to_B","text":"table fitted parameters resulting DT50 DT90 values generated different software packages. Taken directly FOCUS (2006). results fitting data Topfit software removed, initial concentration parent compound fixed value 100 fit.","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/FOCUS_2006_DFOP_ref_A_to_B.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Results of fitting the DFOP model to Datasets A to B of FOCUS (2006) — FOCUS_2006_DFOP_ref_A_to_B","text":"","code":"FOCUS_2006_DFOP_ref_A_to_B"},{"path":"https://pkgdown.jrwb.de/mkin/reference/FOCUS_2006_DFOP_ref_A_to_B.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Results of fitting the DFOP model to Datasets A to B of FOCUS (2006) — FOCUS_2006_DFOP_ref_A_to_B","text":"data frame containing following variables. package factor giving name software package M0 fitted initial concentration parent compound f fitted f parameter k1 fitted k1 parameter k2 fitted k2 parameter DT50 resulting half-life parent compound DT90 resulting DT90 parent compound dataset FOCUS dataset used","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/FOCUS_2006_DFOP_ref_A_to_B.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"Results of fitting the DFOP model to Datasets A to B of FOCUS (2006) — FOCUS_2006_DFOP_ref_A_to_B","text":"FOCUS (2006) “Guidance Document Estimating Persistence Degradation Kinetics Environmental Fate Studies Pesticides EU Registration” Report FOCUS Work Group Degradation Kinetics, EC Document Reference Sanco/10058/2005 version 2.0, 434 pp, http://esdac.jrc.ec.europa.eu/projects/degradation-kinetics","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/FOCUS_2006_DFOP_ref_A_to_B.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Results of fitting the DFOP model to Datasets A to B of FOCUS (2006) — FOCUS_2006_DFOP_ref_A_to_B","text":"","code":"data(FOCUS_2006_DFOP_ref_A_to_B)"},{"path":"https://pkgdown.jrwb.de/mkin/reference/FOCUS_2006_FOMC_ref_A_to_F.html","id":null,"dir":"Reference","previous_headings":"","what":"Results of fitting the FOMC model to Datasets A to F of FOCUS (2006) — FOCUS_2006_FOMC_ref_A_to_F","title":"Results of fitting the FOMC model to Datasets A to F of FOCUS (2006) — FOCUS_2006_FOMC_ref_A_to_F","text":"table fitted parameters resulting DT50 DT90 values generated different software packages. Taken directly FOCUS (2006). results fitting data Topfit software removed, initial concentration parent compound fixed value 100 fit.","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/FOCUS_2006_FOMC_ref_A_to_F.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Results of fitting the FOMC model to Datasets A to F of FOCUS (2006) — FOCUS_2006_FOMC_ref_A_to_F","text":"","code":"FOCUS_2006_FOMC_ref_A_to_F"},{"path":"https://pkgdown.jrwb.de/mkin/reference/FOCUS_2006_FOMC_ref_A_to_F.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Results of fitting the FOMC model to Datasets A to F of FOCUS (2006) — FOCUS_2006_FOMC_ref_A_to_F","text":"data frame containing following variables. package factor giving name software package M0 fitted initial concentration parent compound alpha fitted alpha parameter beta fitted beta parameter DT50 resulting half-life parent compound DT90 resulting DT90 parent compound dataset FOCUS dataset used","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/FOCUS_2006_FOMC_ref_A_to_F.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"Results of fitting the FOMC model to Datasets A to F of FOCUS (2006) — FOCUS_2006_FOMC_ref_A_to_F","text":"FOCUS (2006) “Guidance Document Estimating Persistence Degradation Kinetics Environmental Fate Studies Pesticides EU Registration” Report FOCUS Work Group Degradation Kinetics, EC Document Reference Sanco/10058/2005 version 2.0, 434 pp, http://esdac.jrc.ec.europa.eu/projects/degradation-kinetics","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/FOCUS_2006_FOMC_ref_A_to_F.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Results of fitting the FOMC model to Datasets A to F of FOCUS (2006) — FOCUS_2006_FOMC_ref_A_to_F","text":"","code":"data(FOCUS_2006_FOMC_ref_A_to_F)"},{"path":"https://pkgdown.jrwb.de/mkin/reference/FOCUS_2006_HS_ref_A_to_F.html","id":null,"dir":"Reference","previous_headings":"","what":"Results of fitting the HS model to Datasets A to F of FOCUS (2006) — FOCUS_2006_HS_ref_A_to_F","title":"Results of fitting the HS model to Datasets A to F of FOCUS (2006) — FOCUS_2006_HS_ref_A_to_F","text":"table fitted parameters resulting DT50 DT90 values generated different software packages. Taken directly FOCUS (2006). results fitting data Topfit software removed, initial concentration parent compound fixed value 100 fit.","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/FOCUS_2006_HS_ref_A_to_F.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Results of fitting the HS model to Datasets A to F of FOCUS (2006) — FOCUS_2006_HS_ref_A_to_F","text":"","code":"FOCUS_2006_HS_ref_A_to_F"},{"path":"https://pkgdown.jrwb.de/mkin/reference/FOCUS_2006_HS_ref_A_to_F.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Results of fitting the HS model to Datasets A to F of FOCUS (2006) — FOCUS_2006_HS_ref_A_to_F","text":"data frame containing following variables. package factor giving name software package M0 fitted initial concentration parent compound tb fitted tb parameter k1 fitted k1 parameter k2 fitted k2 parameter DT50 resulting half-life parent compound DT90 resulting DT90 parent compound dataset FOCUS dataset used","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/FOCUS_2006_HS_ref_A_to_F.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"Results of fitting the HS model to Datasets A to F of FOCUS (2006) — FOCUS_2006_HS_ref_A_to_F","text":"FOCUS (2006) “Guidance Document Estimating Persistence Degradation Kinetics Environmental Fate Studies Pesticides EU Registration” Report FOCUS Work Group Degradation Kinetics, EC Document Reference Sanco/10058/2005 version 2.0, 434 pp, http://esdac.jrc.ec.europa.eu/projects/degradation-kinetics","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/FOCUS_2006_HS_ref_A_to_F.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Results of fitting the HS model to Datasets A to F of FOCUS (2006) — FOCUS_2006_HS_ref_A_to_F","text":"","code":"data(FOCUS_2006_HS_ref_A_to_F)"},{"path":"https://pkgdown.jrwb.de/mkin/reference/FOCUS_2006_SFO_ref_A_to_F.html","id":null,"dir":"Reference","previous_headings":"","what":"Results of fitting the SFO model to Datasets A to F of FOCUS (2006) — FOCUS_2006_SFO_ref_A_to_F","title":"Results of fitting the SFO model to Datasets A to F of FOCUS (2006) — FOCUS_2006_SFO_ref_A_to_F","text":"table fitted parameters resulting DT50 DT90 values generated different software packages. Taken directly FOCUS (2006). results fitting data Topfit software removed, initial concentration parent compound fixed value 100 fit.","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/FOCUS_2006_SFO_ref_A_to_F.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Results of fitting the SFO model to Datasets A to F of FOCUS (2006) — FOCUS_2006_SFO_ref_A_to_F","text":"","code":"FOCUS_2006_SFO_ref_A_to_F"},{"path":"https://pkgdown.jrwb.de/mkin/reference/FOCUS_2006_SFO_ref_A_to_F.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Results of fitting the SFO model to Datasets A to F of FOCUS (2006) — FOCUS_2006_SFO_ref_A_to_F","text":"data frame containing following variables. package factor giving name software package M0 fitted initial concentration parent compound k fitted first-order degradation rate constant DT50 resulting half-life parent compound DT90 resulting DT90 parent compound dataset FOCUS dataset used","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/FOCUS_2006_SFO_ref_A_to_F.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"Results of fitting the SFO model to Datasets A to F of FOCUS (2006) — FOCUS_2006_SFO_ref_A_to_F","text":"FOCUS (2006) “Guidance Document Estimating Persistence Degradation Kinetics Environmental Fate Studies Pesticides EU Registration” Report FOCUS Work Group Degradation Kinetics, EC Document Reference Sanco/10058/2005 version 2.0, 434 pp, http://esdac.jrc.ec.europa.eu/projects/degradation-kinetics","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/FOCUS_2006_SFO_ref_A_to_F.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Results of fitting the SFO model to Datasets A to F of FOCUS (2006) — FOCUS_2006_SFO_ref_A_to_F","text":"","code":"data(FOCUS_2006_SFO_ref_A_to_F)"},{"path":"https://pkgdown.jrwb.de/mkin/reference/FOCUS_2006_datasets.html","id":null,"dir":"Reference","previous_headings":"","what":"Datasets A to F from the FOCUS Kinetics report from 2006 — FOCUS_2006_datasets","title":"Datasets A to F from the FOCUS Kinetics report from 2006 — FOCUS_2006_datasets","text":"Data taken FOCUS (2006), p. 258.","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/FOCUS_2006_datasets.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Datasets A to F from the FOCUS Kinetics report from 2006 — FOCUS_2006_datasets","text":"","code":"FOCUS_2006_A FOCUS_2006_B FOCUS_2006_C FOCUS_2006_D FOCUS_2006_E FOCUS_2006_F"},{"path":"https://pkgdown.jrwb.de/mkin/reference/FOCUS_2006_datasets.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Datasets A to F from the FOCUS Kinetics report from 2006 — FOCUS_2006_datasets","text":"6 datasets observations following variables. name factor containing name observed variable time numeric vector containing time points value numeric vector containing concentrations percent applied radioactivity","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/FOCUS_2006_datasets.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"Datasets A to F from the FOCUS Kinetics report from 2006 — FOCUS_2006_datasets","text":"FOCUS (2006) “Guidance Document Estimating Persistence Degradation Kinetics Environmental Fate Studies Pesticides EU Registration” Report FOCUS Work Group Degradation Kinetics, EC Document Reference Sanco/10058/2005 version 2.0, 434 pp, http://esdac.jrc.ec.europa.eu/projects/degradation-kinetics","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/FOCUS_2006_datasets.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Datasets A to F from the FOCUS Kinetics report from 2006 — FOCUS_2006_datasets","text":"","code":"FOCUS_2006_C #> name time value #> 1 parent 0 85.1 #> 2 parent 1 57.9 #> 3 parent 3 29.9 #> 4 parent 7 14.6 #> 5 parent 14 9.7 #> 6 parent 28 6.6 #> 7 parent 63 4.0 #> 8 parent 91 3.9 #> 9 parent 119 0.6"},{"path":"https://pkgdown.jrwb.de/mkin/reference/FOMC.solution.html","id":null,"dir":"Reference","previous_headings":"","what":"First-Order Multi-Compartment kinetics — FOMC.solution","title":"First-Order Multi-Compartment kinetics — FOMC.solution","text":"Function describing exponential decline defined starting value, decreasing rate constant.","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/FOMC.solution.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"First-Order Multi-Compartment kinetics — FOMC.solution","text":"","code":"FOMC.solution(t, parent_0, alpha, beta)"},{"path":"https://pkgdown.jrwb.de/mkin/reference/FOMC.solution.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"First-Order Multi-Compartment kinetics — FOMC.solution","text":"t Time. parent_0 Starting value response variable time zero. alpha Shape parameter determined coefficient variation rate constant values. beta Location parameter.","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/FOMC.solution.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"First-Order Multi-Compartment kinetics — FOMC.solution","text":"value response variable time t.","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/FOMC.solution.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"First-Order Multi-Compartment kinetics — FOMC.solution","text":"form given differs slightly original reference Gustafson Holden (1990). parameter beta corresponds 1/beta original equation.","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/FOMC.solution.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"First-Order Multi-Compartment kinetics — FOMC.solution","text":"solution FOMC kinetic model reduces SFO.solution large values alpha beta \\(k = \\frac{\\beta}{\\alpha}\\).","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/FOMC.solution.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"First-Order Multi-Compartment kinetics — FOMC.solution","text":"FOCUS (2006) “Guidance Document Estimating Persistence Degradation Kinetics Environmental Fate Studies Pesticides EU Registration” Report FOCUS Work Group Degradation Kinetics, EC Document Reference Sanco/10058/2005 version 2.0, 434 pp, http://esdac.jrc.ec.europa.eu/projects/degradation-kinetics FOCUS (2014) “Generic guidance Estimating Persistence Degradation Kinetics Environmental Fate Studies Pesticides EU Registration” Report FOCUS Work Group Degradation Kinetics, Version 1.1, 18 December 2014 http://esdac.jrc.ec.europa.eu/projects/degradation-kinetics Gustafson DI Holden LR (1990) Nonlinear pesticide dissipation soil: new model based spatial variability. Environmental Science Technology 24, 1032-1038","code":""},{"path":[]},{"path":"https://pkgdown.jrwb.de/mkin/reference/FOMC.solution.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"First-Order Multi-Compartment kinetics — FOMC.solution","text":"","code":"plot(function(x) FOMC.solution(x, 100, 10, 2), 0, 2, ylim = c(0, 100))"},{"path":"https://pkgdown.jrwb.de/mkin/reference/HS.solution.html","id":null,"dir":"Reference","previous_headings":"","what":"Hockey-Stick kinetics — HS.solution","title":"Hockey-Stick kinetics — HS.solution","text":"Function describing two exponential decline functions break point .","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/HS.solution.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Hockey-Stick kinetics — HS.solution","text":"","code":"HS.solution(t, parent_0, k1, k2, tb)"},{"path":"https://pkgdown.jrwb.de/mkin/reference/HS.solution.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Hockey-Stick kinetics — HS.solution","text":"t Time. parent_0 Starting value response variable time zero. k1 First kinetic constant. k2 Second kinetic constant. tb Break point. time, exponential decline according k1 calculated, time, exponential decline proceeds according k2.","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/HS.solution.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Hockey-Stick kinetics — HS.solution","text":"value response variable time t.","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/HS.solution.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Hockey-Stick kinetics — HS.solution","text":"FOCUS (2006) “Guidance Document Estimating Persistence Degradation Kinetics Environmental Fate Studies Pesticides EU Registration” Report FOCUS Work Group Degradation Kinetics, EC Document Reference Sanco/10058/2005 version 2.0, 434 pp, http://esdac.jrc.ec.europa.eu/projects/degradation-kinetics FOCUS (2014) “Generic guidance Estimating Persistence Degradation Kinetics Environmental Fate Studies Pesticides EU Registration” Report FOCUS Work Group Degradation Kinetics, Version 1.1, 18 December 2014 http://esdac.jrc.ec.europa.eu/projects/degradation-kinetics","code":""},{"path":[]},{"path":"https://pkgdown.jrwb.de/mkin/reference/HS.solution.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Hockey-Stick kinetics — HS.solution","text":"","code":"plot(function(x) HS.solution(x, 100, 2, 0.3, 0.5), 0, 2, ylim=c(0,100))"},{"path":"https://pkgdown.jrwb.de/mkin/reference/IORE.solution.html","id":null,"dir":"Reference","previous_headings":"","what":"Indeterminate order rate equation kinetics — IORE.solution","title":"Indeterminate order rate equation kinetics — IORE.solution","text":"Function describing exponential decline defined starting value, concentration dependent rate constant.","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/IORE.solution.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Indeterminate order rate equation kinetics — IORE.solution","text":"","code":"IORE.solution(t, parent_0, k__iore, N)"},{"path":"https://pkgdown.jrwb.de/mkin/reference/IORE.solution.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Indeterminate order rate equation kinetics — IORE.solution","text":"t Time. parent_0 Starting value response variable time zero. k__iore Rate constant. Note depends concentration units used. N Exponent describing nonlinearity rate equation","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/IORE.solution.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Indeterminate order rate equation kinetics — IORE.solution","text":"value response variable time t.","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/IORE.solution.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Indeterminate order rate equation kinetics — IORE.solution","text":"solution IORE kinetic model reduces SFO.solution N = 1. parameters IORE model can transformed equivalent parameters FOMC mode - see NAFTA guidance details.","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/IORE.solution.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Indeterminate order rate equation kinetics — IORE.solution","text":"NAFTA Technical Working Group Pesticides (dated) Guidance Evaluating Calculating Degradation Kinetics Environmental Media","code":""},{"path":[]},{"path":"https://pkgdown.jrwb.de/mkin/reference/IORE.solution.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Indeterminate order rate equation kinetics — IORE.solution","text":"","code":"plot(function(x) IORE.solution(x, 100, 0.2, 1.3), 0, 2, ylim = c(0, 100)) # \\dontrun{ fit.fomc <- mkinfit(\"FOMC\", FOCUS_2006_C, quiet = TRUE) fit.iore <- mkinfit(\"IORE\", FOCUS_2006_C, quiet = TRUE) fit.iore.deS <- mkinfit(\"IORE\", FOCUS_2006_C, solution_type = \"deSolve\", quiet = TRUE) #> Error in is.loaded(initfunc, PACKAGE = dllname, type = \"\") : #> invalid 'PACKAGE' argument print(data.frame(fit.fomc$par, fit.iore$par, fit.iore.deS$par, row.names = paste(\"model par\", 1:4))) #> fit.fomc.par fit.iore.par fit.iore.deS.par #> model par 1 85.87489063 85.874890 85.874890 #> model par 2 0.05192238 -4.826631 -4.826631 #> model par 3 0.65096665 1.949403 1.949403 #> model par 4 1.85744396 1.857444 1.857444 print(rbind(fomc = endpoints(fit.fomc)$distimes, iore = endpoints(fit.iore)$distimes, iore.deS = endpoints(fit.iore)$distimes)) #> DT50 DT90 DT50back #> fomc 1.785233 15.1479 4.559973 #> iore 1.785233 15.1479 4.559973 #> iore.deS 1.785233 15.1479 4.559973 # }"},{"path":"https://pkgdown.jrwb.de/mkin/reference/NAFTA_SOP_2015.html","id":null,"dir":"Reference","previous_headings":"","what":"Example datasets from the NAFTA SOP published 2015 — NAFTA_SOP_2015","title":"Example datasets from the NAFTA SOP published 2015 — NAFTA_SOP_2015","text":"Data taken US EPA (2015), p. 19 23.","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/NAFTA_SOP_2015.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Example datasets from the NAFTA SOP published 2015 — NAFTA_SOP_2015","text":"","code":"NAFTA_SOP_Appendix_B NAFTA_SOP_Appendix_D"},{"path":"https://pkgdown.jrwb.de/mkin/reference/NAFTA_SOP_2015.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Example datasets from the NAFTA SOP published 2015 — NAFTA_SOP_2015","text":"2 datasets observations following variables. name factor containing name observed variable time numeric vector containing time points value numeric vector containing concentrations","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/NAFTA_SOP_2015.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"Example datasets from the NAFTA SOP published 2015 — NAFTA_SOP_2015","text":"NAFTA (2011) Guidance evaluating calculating degradation kinetics environmental media. NAFTA Technical Working Group Pesticides https://www.epa.gov/pesticide-science--assessing-pesticide-risks/guidance-evaluating--calculating-degradation accessed 2019-02-22 US EPA (2015) Standard Operating Procedure Using NAFTA Guidance Calculate Representative Half-life Values Characterizing Pesticide Degradation https://www.epa.gov/pesticide-science--assessing-pesticide-risks/standard-operating-procedure-using-nafta-guidance","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/NAFTA_SOP_2015.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Example datasets from the NAFTA SOP published 2015 — NAFTA_SOP_2015","text":"","code":"nafta_evaluation <- nafta(NAFTA_SOP_Appendix_D, cores = 1) #> The SFO model is rejected as S_SFO is equal or higher than the critical value S_c #> The representative half-life of the IORE model is longer than the one corresponding #> to the terminal degradation rate found with the DFOP model. #> The representative half-life obtained from the DFOP model may be used print(nafta_evaluation) #> Sums of squares: #> SFO IORE DFOP #> 1378.6832 615.7730 517.8836 #> #> Critical sum of squares for checking the SFO model: #> [1] 717.4598 #> #> Parameters: #> $SFO #> Estimate Pr(>t) Lower Upper #> parent_0 83.7558 1.80e-14 77.18268 90.3288 #> k_parent 0.0017 7.43e-05 0.00112 0.0026 #> sigma 8.7518 1.22e-05 5.64278 11.8608 #> #> $IORE #> Estimate Pr(>t) Lower Upper #> parent_0 9.69e+01 NA 8.88e+01 1.05e+02 #> k__iore_parent 8.40e-14 NA 1.79e-18 3.94e-09 #> N_parent 6.68e+00 NA 4.19e+00 9.17e+00 #> sigma 5.85e+00 NA 3.76e+00 7.94e+00 #> #> $DFOP #> Estimate Pr(>t) Lower Upper #> parent_0 9.76e+01 1.94e-13 9.02e+01 1.05e+02 #> k1 4.24e-02 5.92e-03 2.03e-02 8.88e-02 #> k2 8.24e-04 6.48e-03 3.89e-04 1.75e-03 #> g 2.88e-01 2.47e-05 1.95e-01 4.03e-01 #> sigma 5.36e+00 2.22e-05 3.43e+00 7.30e+00 #> #> #> DTx values: #> DT50 DT90 DT50_rep #> SFO 407 1350 407 #> IORE 541 5190000 1560000 #> DFOP 429 2380 841 #> #> Representative half-life: #> [1] 841.41 plot(nafta_evaluation)"},{"path":"https://pkgdown.jrwb.de/mkin/reference/NAFTA_SOP_Attachment.html","id":null,"dir":"Reference","previous_headings":"","what":"Example datasets from Attachment 1 to the NAFTA SOP published 2015 — NAFTA_SOP_Attachment","title":"Example datasets from Attachment 1 to the NAFTA SOP published 2015 — NAFTA_SOP_Attachment","text":"Data taken Attachment 1 SOP.","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/NAFTA_SOP_Attachment.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Example datasets from Attachment 1 to the NAFTA SOP published 2015 — NAFTA_SOP_Attachment","text":"","code":"NAFTA_SOP_Attachment"},{"path":"https://pkgdown.jrwb.de/mkin/reference/NAFTA_SOP_Attachment.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Example datasets from Attachment 1 to the NAFTA SOP published 2015 — NAFTA_SOP_Attachment","text":"list (NAFTA_SOP_Attachment) containing 16 datasets suitable evaluation nafta","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/NAFTA_SOP_Attachment.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"Example datasets from Attachment 1 to the NAFTA SOP published 2015 — NAFTA_SOP_Attachment","text":"NAFTA (2011) Guidance evaluating calculating degradation kinetics environmental media. NAFTA Technical Working Group Pesticides https://www.epa.gov/pesticide-science--assessing-pesticide-risks/guidance-evaluating--calculating-degradation accessed 2019-02-22 US EPA (2015) Standard Operating Procedure Using NAFTA Guidance Calculate Representative Half-life Values Characterizing Pesticide Degradation https://www.epa.gov/pesticide-science--assessing-pesticide-risks/standard-operating-procedure-using-nafta-guidance","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/NAFTA_SOP_Attachment.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Example datasets from Attachment 1 to the NAFTA SOP published 2015 — NAFTA_SOP_Attachment","text":"","code":"nafta_att_p5a <- nafta(NAFTA_SOP_Attachment[[\"p5a\"]], cores = 1) #> The SFO model is rejected as S_SFO is equal or higher than the critical value S_c #> The half-life obtained from the IORE model may be used print(nafta_att_p5a) #> Sums of squares: #> SFO IORE DFOP #> 465.21753 56.27506 32.06401 #> #> Critical sum of squares for checking the SFO model: #> [1] 64.4304 #> #> Parameters: #> $SFO #> Estimate Pr(>t) Lower Upper #> parent_0 95.8401 4.67e-21 92.245 99.4357 #> k_parent 0.0102 3.92e-12 0.009 0.0117 #> sigma 4.8230 3.81e-06 3.214 6.4318 #> #> $IORE #> Estimate Pr(>t) Lower Upper #> parent_0 1.01e+02 NA 9.91e+01 1.02e+02 #> k__iore_parent 1.54e-05 NA 4.08e-06 5.84e-05 #> N_parent 2.57e+00 NA 2.25e+00 2.89e+00 #> sigma 1.68e+00 NA 1.12e+00 2.24e+00 #> #> $DFOP #> Estimate Pr(>t) Lower Upper #> parent_0 9.99e+01 1.41e-26 98.8116 101.0810 #> k1 2.67e-02 5.05e-06 0.0243 0.0295 #> k2 3.41e-12 5.00e-01 0.0000 Inf #> g 6.47e-01 3.67e-06 0.6248 0.6677 #> sigma 1.27e+00 8.91e-06 0.8395 1.6929 #> #> #> DTx values: #> DT50 DT90 DT50_rep #> SFO 67.7 2.25e+02 6.77e+01 #> IORE 58.2 1.07e+03 3.22e+02 #> DFOP 55.5 3.70e+11 2.03e+11 #> #> Representative half-life: #> [1] 321.51 plot(nafta_att_p5a)"},{"path":"https://pkgdown.jrwb.de/mkin/reference/SFO.solution.html","id":null,"dir":"Reference","previous_headings":"","what":"Single First-Order kinetics — SFO.solution","title":"Single First-Order kinetics — SFO.solution","text":"Function describing exponential decline defined starting value.","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/SFO.solution.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Single First-Order kinetics — SFO.solution","text":"","code":"SFO.solution(t, parent_0, k)"},{"path":"https://pkgdown.jrwb.de/mkin/reference/SFO.solution.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Single First-Order kinetics — SFO.solution","text":"t Time. parent_0 Starting value response variable time zero. k Kinetic rate constant.","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/SFO.solution.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Single First-Order kinetics — SFO.solution","text":"value response variable time t.","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/SFO.solution.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Single First-Order kinetics — SFO.solution","text":"FOCUS (2006) “Guidance Document Estimating Persistence Degradation Kinetics Environmental Fate Studies Pesticides EU Registration” Report FOCUS Work Group Degradation Kinetics, EC Document Reference Sanco/10058/2005 version 2.0, 434 pp, http://esdac.jrc.ec.europa.eu/projects/degradation-kinetics FOCUS (2014) “Generic guidance Estimating Persistence Degradation Kinetics Environmental Fate Studies Pesticides EU Registration” Report FOCUS Work Group Degradation Kinetics, Version 1.1, 18 December 2014 http://esdac.jrc.ec.europa.eu/projects/degradation-kinetics","code":""},{"path":[]},{"path":"https://pkgdown.jrwb.de/mkin/reference/SFO.solution.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Single First-Order kinetics — SFO.solution","text":"","code":"plot(function(x) SFO.solution(x, 100, 3), 0, 2)"},{"path":"https://pkgdown.jrwb.de/mkin/reference/SFORB.solution.html","id":null,"dir":"Reference","previous_headings":"","what":"Single First-Order Reversible Binding kinetics — SFORB.solution","title":"Single First-Order Reversible Binding kinetics — SFORB.solution","text":"Function describing solution differential equations describing kinetic model first-order terms two-way transfer free bound fraction, first-order degradation term free fraction. initial condition defined amount free fraction substance bound fraction.","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/SFORB.solution.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Single First-Order Reversible Binding kinetics — SFORB.solution","text":"","code":"SFORB.solution(t, parent_0, k_12, k_21, k_1output)"},{"path":"https://pkgdown.jrwb.de/mkin/reference/SFORB.solution.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Single First-Order Reversible Binding kinetics — SFORB.solution","text":"t Time. parent_0 Starting value response variable time zero. k_12 Kinetic constant describing transfer free bound. k_21 Kinetic constant describing transfer bound free. k_1output Kinetic constant describing degradation free fraction.","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/SFORB.solution.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Single First-Order Reversible Binding kinetics — SFORB.solution","text":"value response variable, sum free bound fractions time t.","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/SFORB.solution.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Single First-Order Reversible Binding kinetics — SFORB.solution","text":"FOCUS (2006) “Guidance Document Estimating Persistence Degradation Kinetics Environmental Fate Studies Pesticides EU Registration” Report FOCUS Work Group Degradation Kinetics, EC Document Reference Sanco/10058/2005 version 2.0, 434 pp, http://esdac.jrc.ec.europa.eu/projects/degradation-kinetics FOCUS (2014) “Generic guidance Estimating Persistence Degradation Kinetics Environmental Fate Studies Pesticides EU Registration” Report FOCUS Work Group Degradation Kinetics, Version 1.1, 18 December 2014 http://esdac.jrc.ec.europa.eu/projects/degradation-kinetics","code":""},{"path":[]},{"path":"https://pkgdown.jrwb.de/mkin/reference/SFORB.solution.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Single First-Order Reversible Binding kinetics — SFORB.solution","text":"","code":"plot(function(x) SFORB.solution(x, 100, 0.5, 2, 3), 0, 2)"},{"path":"https://pkgdown.jrwb.de/mkin/reference/add_err.html","id":null,"dir":"Reference","previous_headings":"","what":"Add normally distributed errors to simulated kinetic degradation data — add_err","title":"Add normally distributed errors to simulated kinetic degradation data — add_err","text":"Normally distributed errors added data predicted specific degradation model using mkinpredict. variance error may depend predicted value specified standard deviation.","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/add_err.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Add normally distributed errors to simulated kinetic degradation data — add_err","text":"","code":"add_err( prediction, sdfunc, secondary = c(\"M1\", \"M2\"), n = 10, LOD = 0.1, reps = 2, digits = 1, seed = NA )"},{"path":"https://pkgdown.jrwb.de/mkin/reference/add_err.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Add normally distributed errors to simulated kinetic degradation data — add_err","text":"prediction prediction kinetic model produced mkinpredict. sdfunc function taking predicted value argument returning standard deviation used generating random error terms value. secondary names state variables initial value zero n number datasets generated. LOD limit detection (LOD). Values LOD adding random error set NA. reps number replicates generated within datasets. digits number digits values rounded. seed seed used generation random numbers. NA, seed set.","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/add_err.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Add normally distributed errors to simulated kinetic degradation data — add_err","text":"list datasets compatible mmkin, .e. components list datasets compatible mkinfit.","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/add_err.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Add normally distributed errors to simulated kinetic degradation data — add_err","text":"Ranke J Lehmann R (2015) t-test t-test, question. XV Symposium Pesticide Chemistry 2-4 September 2015, Piacenza, Italy https://jrwb.de/posters/piacenza_2015.pdf","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/add_err.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Add normally distributed errors to simulated kinetic degradation data — add_err","text":"Johannes Ranke","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/add_err.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Add normally distributed errors to simulated kinetic degradation data — add_err","text":"","code":"# The kinetic model m_SFO_SFO <- mkinmod(parent = mkinsub(\"SFO\", \"M1\"), M1 = mkinsub(\"SFO\"), use_of_ff = \"max\") #> Temporary DLL for differentials generated and loaded # Generate a prediction for a specific set of parameters sampling_times = c(0, 1, 3, 7, 14, 28, 60, 90, 120) # This is the prediction used for the \"Type 2 datasets\" on the Piacenza poster # from 2015 d_SFO_SFO <- mkinpredict(m_SFO_SFO, c(k_parent = 0.1, f_parent_to_M1 = 0.5, k_M1 = log(2)/1000), c(parent = 100, M1 = 0), sampling_times) # Add an error term with a constant (independent of the value) standard deviation # of 10, and generate three datasets d_SFO_SFO_err <- add_err(d_SFO_SFO, function(x) 10, n = 3, seed = 123456789 ) # Name the datasets for nicer plotting names(d_SFO_SFO_err) <- paste(\"Dataset\", 1:3) # Name the model in the list of models (with only one member in this case) for # nicer plotting later on. Be quiet and use only one core not to offend CRAN # checks # \\dontrun{ f_SFO_SFO <- mmkin(list(\"SFO-SFO\" = m_SFO_SFO), d_SFO_SFO_err, cores = 1, quiet = TRUE) plot(f_SFO_SFO) # We would like to inspect the fit for dataset 3 more closely # Using double brackets makes the returned object an mkinfit object # instead of a list of mkinfit objects, so plot.mkinfit is used plot(f_SFO_SFO[[3]], show_residuals = TRUE) # If we use single brackets, we should give two indices (model and dataset), # and plot.mmkin is used plot(f_SFO_SFO[1, 3]) # }"},{"path":"https://pkgdown.jrwb.de/mkin/reference/anova.saem.mmkin.html","id":null,"dir":"Reference","previous_headings":"","what":"Anova method for saem.mmkin objects — anova.saem.mmkin","title":"Anova method for saem.mmkin objects — anova.saem.mmkin","text":"Generate anova object. method calculate BIC saemix package. prominent anova methods, models sorted number parameters, tests (requested) always relative model previous line.","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/anova.saem.mmkin.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Anova method for saem.mmkin objects — anova.saem.mmkin","text":"","code":"# S3 method for saem.mmkin anova( object, ..., method = c(\"is\", \"lin\", \"gq\"), test = FALSE, model.names = NULL )"},{"path":"https://pkgdown.jrwb.de/mkin/reference/anova.saem.mmkin.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Anova method for saem.mmkin objects — anova.saem.mmkin","text":"object saem.mmkin object ... objects method Method likelihood calculation: \"\" (importance sampling), \"lin\" (linear approximation), \"gq\" (Gaussian quadrature). Passed saemix::logLik.SaemixObject test likelihood ratio test performed? TRUE, alternative models tested first model. done nested models. model.names Optional character vector model names","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/anova.saem.mmkin.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Anova method for saem.mmkin objects — anova.saem.mmkin","text":"\"anova\" data frame; traditional (S3) result anova()","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/aw.html","id":null,"dir":"Reference","previous_headings":"","what":"Calculate Akaike weights for model averaging — aw","title":"Calculate Akaike weights for model averaging — aw","text":"Akaike weights calculated based relative expected Kullback-Leibler information specified Burnham Anderson (2004).","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/aw.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Calculate Akaike weights for model averaging — aw","text":"","code":"aw(object, ...) # S3 method for mkinfit aw(object, ...) # S3 method for mmkin aw(object, ...) # S3 method for mixed.mmkin aw(object, ...) # S3 method for multistart aw(object, ...)"},{"path":"https://pkgdown.jrwb.de/mkin/reference/aw.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Calculate Akaike weights for model averaging — aw","text":"object mmkin column object, containing two mkinfit models fitted data, mkinfit object. latter case, mkinfit objects fitted data specified dots arguments. ... used method mmkin column objects, mkinfit objects method mkinfit objects.","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/aw.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Calculate Akaike weights for model averaging — aw","text":"Burnham KP Anderson DR (2004) Multimodel Inference: Understanding AIC BIC Model Selection. Sociological Methods & Research 33(2) 261-304","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/aw.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Calculate Akaike weights for model averaging — aw","text":"","code":"# \\dontrun{ f_sfo <- mkinfit(\"SFO\", FOCUS_2006_D, quiet = TRUE) f_dfop <- mkinfit(\"DFOP\", FOCUS_2006_D, quiet = TRUE) aw_sfo_dfop <- aw(f_sfo, f_dfop) sum(aw_sfo_dfop) #> [1] 1 aw_sfo_dfop # SFO gets more weight as it has less parameters and a similar fit #> [1] 0.5970258 0.4029742 f <- mmkin(c(\"SFO\", \"FOMC\", \"DFOP\"), list(\"FOCUS D\" = FOCUS_2006_D), cores = 1, quiet = TRUE) aw(f) #> [1] 0.4808722 0.1945539 0.3245740 sum(aw(f)) #> [1] 1 aw(f[c(\"SFO\", \"DFOP\")]) #> [1] 0.5970258 0.4029742 # }"},{"path":"https://pkgdown.jrwb.de/mkin/reference/confint.mkinfit.html","id":null,"dir":"Reference","previous_headings":"","what":"Confidence intervals for parameters of mkinfit objects — confint.mkinfit","title":"Confidence intervals for parameters of mkinfit objects — confint.mkinfit","text":"default method 'quadratic' based quadratic approximation curvature likelihood function maximum likelihood parameter estimates. alternative method 'profile' based profile likelihood parameter. 'profile' method uses two nested optimisations can take long time, even parallelized specifying 'cores' unixoid platforms. speed method likely improved using method Venzon Moolgavkar (1988).","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/confint.mkinfit.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Confidence intervals for parameters of mkinfit objects — confint.mkinfit","text":"","code":"# S3 method for mkinfit confint( object, parm, level = 0.95, alpha = 1 - level, cutoff, method = c(\"quadratic\", \"profile\"), transformed = TRUE, backtransform = TRUE, cores = parallel::detectCores(), rel_tol = 0.01, quiet = FALSE, ... )"},{"path":"https://pkgdown.jrwb.de/mkin/reference/confint.mkinfit.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Confidence intervals for parameters of mkinfit objects — confint.mkinfit","text":"object mkinfit object parm vector names parameters given confidence intervals. missing, parameters considered. level confidence level required alpha allowed error probability, overrides 'level' specified. cutoff Possibility specify alternative cutoff difference log-likelihoods confidence boundary. Specifying explicit cutoff value overrides arguments 'level' 'alpha' method 'quadratic' method approximates likelihood function optimised parameters using second term Taylor expansion, using second derivative (hessian) contained object. 'profile' method searches parameter space cutoff confidence intervals means likelihood ratio test. transformed quadratic approximation used, applied likelihood based transformed parameters? backtransform approximate likelihood terms transformed parameters, backtransform parameters confidence intervals? cores number cores used multicore processing. Windows machines, cores > 1 currently supported. rel_tol method 'profile', accuracy lower upper bounds, relative estimate obtained quadratic method? quiet suppress message \"Profiling likelihood\" ... used","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/confint.mkinfit.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Confidence intervals for parameters of mkinfit objects — confint.mkinfit","text":"matrix columns giving lower upper confidence limits parameter.","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/confint.mkinfit.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Confidence intervals for parameters of mkinfit objects — confint.mkinfit","text":"Bates DM Watts GW (1988) Nonlinear regression analysis & applications Pawitan Y (2013) likelihood - Statistical modelling inference using likelihood. Clarendon Press, Oxford. Venzon DJ Moolgavkar SH (1988) Method Computing Profile-Likelihood Based Confidence Intervals, Applied Statistics, 37, 87–94.","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/confint.mkinfit.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Confidence intervals for parameters of mkinfit objects — confint.mkinfit","text":"","code":"f <- mkinfit(\"SFO\", FOCUS_2006_C, quiet = TRUE) confint(f, method = \"quadratic\") #> 2.5% 97.5% #> parent_0 71.8242430 93.1600766 #> k_parent 0.2109541 0.4440528 #> sigma 1.9778868 7.3681380 # \\dontrun{ confint(f, method = \"profile\") #> Profiling the likelihood #> 2.5% 97.5% #> parent_0 73.0641834 92.1392181 #> k_parent 0.2170293 0.4235348 #> sigma 3.1307772 8.0628314 # Set the number of cores for the profiling method for further examples if (identical(Sys.getenv(\"NOT_CRAN\"), \"true\")) { n_cores <- parallel::detectCores() - 1 } else { n_cores <- 1 } if (Sys.getenv(\"TRAVIS\") != \"\") n_cores = 1 if (Sys.info()[\"sysname\"] == \"Windows\") n_cores = 1 SFO_SFO <- mkinmod(parent = mkinsub(\"SFO\", \"m1\"), m1 = mkinsub(\"SFO\"), use_of_ff = \"min\", quiet = TRUE) 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 elapsed #> 1.203 0.000 1.203 # Using more cores does not save much time here, as parent_0 takes up most of the time # If we additionally exclude parent_0 (the confidence of which is often of # minor interest), we get a nice performance improvement if we use at least 4 cores system.time(ci_profile_no_parent_0 <- confint(f_d_1, method = \"profile\", c(\"k_parent_sink\", \"k_parent_m1\", \"k_m1_sink\", \"sigma\"), cores = n_cores)) #> Profiling the likelihood #> user system elapsed #> 0.438 0.097 0.301 ci_profile #> 2.5% 97.5% #> parent_0 96.456003640 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_quadratic_transformed <- confint(f_d_1, method = \"quadratic\") ci_quadratic_transformed #> 2.5% 97.5% #> parent_0 96.403841640 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 ci_quadratic_untransformed <- confint(f_d_1, method = \"quadratic\", transformed = FALSE) ci_quadratic_untransformed #> 2.5% 97.5% #> parent_0 96.403841645 102.79312449 #> k_parent_sink 0.040485331 0.05535491 #> k_parent_m1 0.046611582 0.05494364 #> k_m1_sink 0.003835483 0.00668582 #> sigma 2.396089689 3.85491806 # Against the expectation based on Bates and Watts (1988), the confidence # intervals based on the internal parameter transformation are less # congruent with the likelihood based intervals. Note the superiority of the # interval based on the untransformed fit for k_m1_sink rel_diffs_transformed <- abs((ci_quadratic_transformed - ci_profile)/ci_profile) rel_diffs_untransformed <- abs((ci_quadratic_untransformed - ci_profile)/ci_profile) rel_diffs_transformed < rel_diffs_untransformed #> 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 signif(rel_diffs_transformed, 3) #> 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 signif(rel_diffs_untransformed, 3) #> 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 # Investigate a case with formation fractions f_d_2 <- mkinfit(SFO_SFO.ff, subset(FOCUS_2006_D, value != 0), quiet = TRUE) ci_profile_ff <- confint(f_d_2, method = \"profile\", cores = n_cores) #> Profiling the likelihood ci_profile_ff #> 2.5% 97.5% #> parent_0 96.456003640 1.027703e+02 #> k_parent 0.090911032 1.071578e-01 #> k_m1 0.003892606 6.702775e-03 #> f_parent_to_m1 0.471328495 5.611550e-01 #> sigma 2.535612399 3.985263e+00 ci_quadratic_transformed_ff <- confint(f_d_2, method = \"quadratic\") ci_quadratic_transformed_ff #> 2.5% 97.5% #> parent_0 96.403833581 102.79311649 #> k_parent 0.090823771 0.10725430 #> k_m1 0.004012219 0.00689755 #> f_parent_to_m1 0.469118824 0.55959615 #> sigma 2.396089689 3.85491806 ci_quadratic_untransformed_ff <- confint(f_d_2, method = \"quadratic\", transformed = FALSE) ci_quadratic_untransformed_ff #> 2.5% 97.5% #> parent_0 96.403833586 1.027931e+02 #> k_parent 0.090491913 1.069035e-01 #> k_m1 0.003835485 6.685823e-03 #> f_parent_to_m1 0.469113477 5.598387e-01 #> sigma 2.396089689 3.854918e+00 rel_diffs_transformed_ff <- abs((ci_quadratic_transformed_ff - ci_profile_ff)/ci_profile_ff) rel_diffs_untransformed_ff <- abs((ci_quadratic_untransformed_ff - ci_profile_ff)/ci_profile_ff) # While the confidence interval for the parent rate constant is closer to # the profile based interval when using the internal parameter # transformation, the interval for the metabolite rate constant is 'better # without internal parameter transformation. rel_diffs_transformed_ff < rel_diffs_untransformed_ff #> 2.5% 97.5% #> parent_0 FALSE FALSE #> k_parent TRUE TRUE #> k_m1 FALSE FALSE #> f_parent_to_m1 TRUE FALSE #> sigma TRUE FALSE rel_diffs_transformed_ff #> 2.5% 97.5% #> parent_0 0.0005408690 0.0002217233 #> k_parent 0.0009598532 0.0009001864 #> k_m1 0.0307283045 0.0290588367 #> f_parent_to_m1 0.0046881768 0.0027780062 #> sigma 0.0550252516 0.0327066836 rel_diffs_untransformed_ff #> 2.5% 97.5% #> parent_0 0.0005408689 0.0002217233 #> k_parent 0.0046102155 0.0023732280 #> k_m1 0.0146740687 0.0025291815 #> f_parent_to_m1 0.0046995210 0.0023457712 #> sigma 0.0550252516 0.0327066836 # The profiling for the following fit does not finish in a reasonable time, # therefore we use the quadratic approximation m_synth_DFOP_par <- mkinmod(parent = mkinsub(\"DFOP\", c(\"M1\", \"M2\")), M1 = mkinsub(\"SFO\"), M2 = mkinsub(\"SFO\"), use_of_ff = \"max\", quiet = TRUE) DFOP_par_c <- synthetic_data_for_UBA_2014[[12]]$data f_tc_2 <- mkinfit(m_synth_DFOP_par, DFOP_par_c, error_model = \"tc\", error_model_algorithm = \"direct\", quiet = TRUE) confint(f_tc_2, method = \"quadratic\") #> 2.5% 97.5% #> parent_0 94.596181875 106.19936592 #> k_M1 0.037605432 0.04490757 #> k_M2 0.008568745 0.01087675 #> f_parent_to_M1 0.021464676 0.62023880 #> f_parent_to_M2 0.015167158 0.37975350 #> k1 0.273897535 0.33388072 #> k2 0.018614555 0.02250379 #> g 0.671943738 0.73583261 #> sigma_low 0.251283679 0.83992102 #> rsd_high 0.040411022 0.07662008 confint(f_tc_2, \"parent_0\", method = \"quadratic\") #> 2.5% 97.5% #> parent_0 94.59618 106.1994 # }"},{"path":"https://pkgdown.jrwb.de/mkin/reference/create_deg_func.html","id":null,"dir":"Reference","previous_headings":"","what":"Create degradation functions for known analytical solutions — create_deg_func","title":"Create degradation functions for known analytical solutions — create_deg_func","text":"Create degradation functions known analytical solutions","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/create_deg_func.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create degradation functions for known analytical solutions — create_deg_func","text":"","code":"create_deg_func(spec, use_of_ff = c(\"min\", \"max\"))"},{"path":"https://pkgdown.jrwb.de/mkin/reference/create_deg_func.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create degradation functions for known analytical solutions — create_deg_func","text":"spec List model specifications contained mkinmod objects use_of_ff Minimum maximum use formation fractions","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/create_deg_func.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create degradation functions for known analytical solutions — create_deg_func","text":"Degradation function attached mkinmod objects","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/create_deg_func.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Create degradation functions for known analytical solutions — create_deg_func","text":"","code":"SFO_SFO <- mkinmod( parent = mkinsub(\"SFO\", \"m1\"), m1 = mkinsub(\"SFO\")) #> Temporary DLL for differentials generated and loaded FOCUS_D <- subset(FOCUS_2006_D, value != 0) # to avoid warnings fit_1 <- mkinfit(SFO_SFO, FOCUS_D, solution_type = \"analytical\", quiet = TRUE) # \\dontrun{ fit_2 <- mkinfit(SFO_SFO, FOCUS_D, solution_type = \"deSolve\", quiet = TRUE) if (require(rbenchmark)) benchmark( analytical = mkinfit(SFO_SFO, FOCUS_D, solution_type = \"analytical\", quiet = TRUE), deSolve = mkinfit(SFO_SFO, FOCUS_D, solution_type = \"deSolve\", quiet = TRUE), replications = 2) #> Loading required package: rbenchmark #> test replications elapsed relative user.self sys.self user.child #> 1 analytical 2 0.233 1.000 0.232 0.001 0 #> 2 deSolve 2 0.293 1.258 0.293 0.000 0 #> sys.child #> 1 0 #> 2 0 DFOP_SFO <- mkinmod( parent = mkinsub(\"DFOP\", \"m1\"), m1 = mkinsub(\"SFO\")) #> Temporary DLL for differentials generated and loaded benchmark( analytical = mkinfit(DFOP_SFO, FOCUS_D, solution_type = \"analytical\", quiet = TRUE), deSolve = mkinfit(DFOP_SFO, FOCUS_D, solution_type = \"deSolve\", quiet = TRUE), replications = 2) #> test replications elapsed relative user.self sys.self user.child #> 1 analytical 2 0.375 1.000 0.375 0 0 #> 2 deSolve 2 0.508 1.355 0.508 0 0 #> sys.child #> 1 0 #> 2 0 # }"},{"path":"https://pkgdown.jrwb.de/mkin/reference/dimethenamid_2018.html","id":null,"dir":"Reference","previous_headings":"","what":"Aerobic soil degradation data on dimethenamid and dimethenamid-P from the EU assessment in 2018 — dimethenamid_2018","title":"Aerobic soil degradation data on dimethenamid and dimethenamid-P from the EU assessment in 2018 — dimethenamid_2018","text":"datasets extracted active substance evaluation dossier published EFSA. Kinetic evaluations shown datasets intended illustrate advance kinetic modelling. fact data results shown imply license use context pesticide registrations, use data may constrained data protection regulations.","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/dimethenamid_2018.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Aerobic soil degradation data on dimethenamid and dimethenamid-P from the EU assessment in 2018 — dimethenamid_2018","text":"","code":"dimethenamid_2018"},{"path":"https://pkgdown.jrwb.de/mkin/reference/dimethenamid_2018.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Aerobic soil degradation data on dimethenamid and dimethenamid-P from the EU assessment in 2018 — dimethenamid_2018","text":"mkindsg object grouping seven datasets meta information","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/dimethenamid_2018.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"Aerobic soil degradation data on dimethenamid and dimethenamid-P from the EU assessment in 2018 — dimethenamid_2018","text":"Rapporteur Member State Germany, Co-Rapporteur Member State Bulgaria (2018) Renewal Assessment Report Dimethenamid-P Volume 3 - B.8 Environmental fate behaviour Rev. 2 - November 2017 https://open.efsa.europa.eu/study-inventory/EFSA-Q-2014-00716","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/dimethenamid_2018.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Aerobic soil degradation data on dimethenamid and dimethenamid-P from the EU assessment in 2018 — dimethenamid_2018","text":"R code used create data object installed package 'dataset_generation' directory. code, page numbers given specific pieces information comments.","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/dimethenamid_2018.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Aerobic soil degradation data on dimethenamid and dimethenamid-P from the EU assessment in 2018 — dimethenamid_2018","text":"","code":"print(dimethenamid_2018) #> <mkindsg> holding 7 mkinds objects #> Title $title: Aerobic soil degradation data on dimethenamid-P from the EU assessment in 2018 #> Occurrence of observed compounds $observed_n: #> DMTAP M23 M27 M31 DMTA #> 3 7 7 7 4 #> Time normalisation factors $f_time_norm: #> [1] 1.0000000 0.9706477 1.2284784 1.2284784 0.6233856 0.7678922 0.6733938 #> Meta information $meta: #> study usda_soil_type study_moisture_ref_type rel_moisture #> Calke Unsworth 2014 Sandy loam pF2 1.00 #> Borstel Staudenmaier 2009 Sand pF1 0.50 #> Elliot 1 Wendt 1997 Clay loam pF2.5 0.75 #> Elliot 2 Wendt 1997 Clay loam pF2.5 0.75 #> Flaach König 1996 Sandy clay loam pF1 0.40 #> BBA 2.2 König 1995 Loamy sand pF1 0.40 #> BBA 2.3 König 1995 Sandy loam pF1 0.40 #> study_ref_moisture temperature #> Calke NA 20 #> Borstel 23.00 20 #> Elliot 1 33.37 23 #> Elliot 2 33.37 23 #> Flaach NA 20 #> BBA 2.2 NA 20 #> BBA 2.3 NA 20 dmta_ds <- lapply(1:7, function(i) { ds_i <- dimethenamid_2018$ds[[i]]$data ds_i[ds_i$name == \"DMTAP\", \"name\"] <- \"DMTA\" ds_i$time <- ds_i$time * dimethenamid_2018$f_time_norm[i] ds_i }) names(dmta_ds) <- sapply(dimethenamid_2018$ds, function(ds) ds$title) dmta_ds[[\"Elliot\"]] <- rbind(dmta_ds[[\"Elliot 1\"]], dmta_ds[[\"Elliot 2\"]]) dmta_ds[[\"Elliot 1\"]] <- NULL dmta_ds[[\"Elliot 2\"]] <- NULL # \\dontrun{ # We don't use DFOP for the parent compound, as this gives numerical # instabilities in the fits sfo_sfo3p <- mkinmod( DMTA = mkinsub(\"SFO\", c(\"M23\", \"M27\", \"M31\")), M23 = mkinsub(\"SFO\"), M27 = mkinsub(\"SFO\"), M31 = mkinsub(\"SFO\", \"M27\", sink = FALSE), quiet = TRUE ) dmta_sfo_sfo3p_tc <- mmkin(list(\"SFO-SFO3+\" = sfo_sfo3p), dmta_ds, error_model = \"tc\", quiet = TRUE) print(dmta_sfo_sfo3p_tc) #> <mmkin> object #> Status of individual fits: #> #> dataset #> model Calke Borstel Flaach BBA 2.2 BBA 2.3 Elliot #> SFO-SFO3+ OK OK OK OK OK OK #> #> OK: No warnings # The default (test_log_parms = FALSE) gives an undue # influence of ill-defined rate constants that have # extremely small values: plot(mixed(dmta_sfo_sfo3p_tc), test_log_parms = FALSE) # If we disregards ill-defined rate constants, the results # look more plausible, but the truth is likely to be in # between these variants plot(mixed(dmta_sfo_sfo3p_tc), test_log_parms = TRUE) # We can also specify a default value for the failing # log parameters, to mimic FOCUS guidance plot(mixed(dmta_sfo_sfo3p_tc), test_log_parms = TRUE, default_log_parms = log(2)/1000) # As these attempts are not satisfying, we use nonlinear mixed-effects models # f_dmta_nlme_tc <- nlme(dmta_sfo_sfo3p_tc) # nlme reaches maxIter = 50 without convergence f_dmta_saem_tc <- saem(dmta_sfo_sfo3p_tc) # I am commenting out the convergence plot as rendering them # with pkgdown fails (at least without further tweaks to the # graphics device used) #saemix::plot(f_dmta_saem_tc$so, plot.type = \"convergence\") summary(f_dmta_saem_tc) #> saemix version used for fitting: 3.2 #> mkin version used for pre-fitting: 1.2.6 #> R version used for fitting: 4.3.2 #> Date of fit: Thu Nov 16 04:14:53 2023 #> Date of summary: Thu Nov 16 04:14:53 2023 #> #> Equations: #> d_DMTA/dt = - k_DMTA * DMTA #> d_M23/dt = + f_DMTA_to_M23 * k_DMTA * DMTA - k_M23 * M23 #> d_M27/dt = + f_DMTA_to_M27 * k_DMTA * DMTA - k_M27 * M27 + k_M31 * M31 #> d_M31/dt = + f_DMTA_to_M31 * k_DMTA * DMTA - k_M31 * M31 #> #> Data: #> 563 observations of 4 variable(s) grouped in 6 datasets #> #> Model predictions using solution type deSolve #> #> Fitted in 302.335 s #> Using 300, 100 iterations and 9 chains #> #> Variance model: Two-component variance function #> #> Starting values for degradation parameters: #> DMTA_0 log_k_DMTA log_k_M23 log_k_M27 log_k_M31 f_DMTA_ilr_1 #> 95.5662 -2.9048 -3.8130 -4.1600 -4.1486 0.1341 #> f_DMTA_ilr_2 f_DMTA_ilr_3 #> 0.1385 -1.6700 #> #> Fixed degradation parameter values: #> None #> #> Starting values for random effects (square root of initial entries in omega): #> DMTA_0 log_k_DMTA log_k_M23 log_k_M27 log_k_M31 f_DMTA_ilr_1 #> DMTA_0 4.802 0.0000 0.0000 0.000 0.0000 0.0000 #> log_k_DMTA 0.000 0.9834 0.0000 0.000 0.0000 0.0000 #> log_k_M23 0.000 0.0000 0.6983 0.000 0.0000 0.0000 #> log_k_M27 0.000 0.0000 0.0000 1.028 0.0000 0.0000 #> log_k_M31 0.000 0.0000 0.0000 0.000 0.9841 0.0000 #> f_DMTA_ilr_1 0.000 0.0000 0.0000 0.000 0.0000 0.7185 #> f_DMTA_ilr_2 0.000 0.0000 0.0000 0.000 0.0000 0.0000 #> f_DMTA_ilr_3 0.000 0.0000 0.0000 0.000 0.0000 0.0000 #> f_DMTA_ilr_2 f_DMTA_ilr_3 #> DMTA_0 0.0000 0.0000 #> log_k_DMTA 0.0000 0.0000 #> log_k_M23 0.0000 0.0000 #> log_k_M27 0.0000 0.0000 #> log_k_M31 0.0000 0.0000 #> f_DMTA_ilr_1 0.0000 0.0000 #> f_DMTA_ilr_2 0.7378 0.0000 #> f_DMTA_ilr_3 0.0000 0.4451 #> #> Starting values for error model parameters: #> a.1 b.1 #> 1 1 #> #> Results: #> #> Likelihood computed by importance sampling #> AIC BIC logLik #> 2276 2273 -1120 #> #> Optimised parameters: #> est. lower upper #> DMTA_0 88.4862 84.1127 92.8598 #> log_k_DMTA -3.0512 -3.5674 -2.5351 #> log_k_M23 -4.0576 -4.9013 -3.2139 #> log_k_M27 -3.8584 -4.2572 -3.4595 #> log_k_M31 -3.9779 -4.4844 -3.4714 #> f_DMTA_ilr_1 0.1264 -0.2186 0.4714 #> f_DMTA_ilr_2 0.1509 -0.2547 0.5565 #> f_DMTA_ilr_3 -1.3891 -1.6962 -1.0819 #> a.1 0.9196 0.8231 1.0161 #> b.1 0.1377 0.1203 0.1551 #> SD.DMTA_0 3.5956 -0.8154 8.0066 #> SD.log_k_DMTA 0.6437 0.2784 1.0091 #> SD.log_k_M23 0.9929 0.3719 1.6139 #> SD.log_k_M27 0.4530 0.1522 0.7537 #> SD.log_k_M31 0.5773 0.1952 0.9595 #> SD.f_DMTA_ilr_1 0.4063 0.1505 0.6621 #> SD.f_DMTA_ilr_2 0.4800 0.1817 0.7783 #> SD.f_DMTA_ilr_3 0.3582 0.1350 0.5814 #> #> Correlation: #> DMTA_0 l__DMTA lg__M23 lg__M27 lg__M31 f_DMTA__1 f_DMTA__2 #> log_k_DMTA 0.0306 #> log_k_M23 -0.0234 -0.0032 #> log_k_M27 -0.0380 -0.0049 0.0041 #> log_k_M31 -0.0247 -0.0031 0.0022 0.0817 #> f_DMTA_ilr_1 -0.0046 -0.0006 0.0425 -0.0438 0.0319 #> f_DMTA_ilr_2 -0.0008 -0.0002 0.0216 -0.0267 -0.0890 -0.0349 #> f_DMTA_ilr_3 -0.1805 -0.0136 0.0434 0.0791 0.0390 -0.0061 0.0053 #> #> Random effects: #> est. lower upper #> SD.DMTA_0 3.5956 -0.8154 8.0066 #> SD.log_k_DMTA 0.6437 0.2784 1.0091 #> SD.log_k_M23 0.9929 0.3719 1.6139 #> SD.log_k_M27 0.4530 0.1522 0.7537 #> SD.log_k_M31 0.5773 0.1952 0.9595 #> SD.f_DMTA_ilr_1 0.4063 0.1505 0.6621 #> SD.f_DMTA_ilr_2 0.4800 0.1817 0.7783 #> SD.f_DMTA_ilr_3 0.3582 0.1350 0.5814 #> #> Variance model: #> est. lower upper #> a.1 0.9196 0.8231 1.0161 #> b.1 0.1377 0.1203 0.1551 #> #> Backtransformed parameters: #> est. lower upper #> DMTA_0 88.48621 84.112654 92.85977 #> k_DMTA 0.04730 0.028230 0.07926 #> k_M23 0.01729 0.007437 0.04020 #> k_M27 0.02110 0.014162 0.03144 #> k_M31 0.01872 0.011283 0.03107 #> f_DMTA_to_M23 0.14551 NA NA #> f_DMTA_to_M27 0.12169 NA NA #> f_DMTA_to_M31 0.11062 NA NA #> #> Resulting formation fractions: #> ff #> DMTA_M23 0.1455 #> DMTA_M27 0.1217 #> DMTA_M31 0.1106 #> DMTA_sink 0.6222 #> #> Estimated disappearance times: #> DT50 DT90 #> DMTA 14.65 48.68 #> M23 40.09 133.17 #> M27 32.85 109.11 #> M31 37.02 122.97 # As the confidence interval for the random effects of DMTA_0 # includes zero, we could try an alternative model without # such random effects # f_dmta_saem_tc_2 <- saem(dmta_sfo_sfo3p_tc, # covariance.model = diag(c(0, rep(1, 7)))) # saemix::plot(f_dmta_saem_tc_2$so, plot.type = \"convergence\") # This does not perform better judged by AIC and BIC # saemix::compare.saemix(f_dmta_saem_tc$so, f_dmta_saem_tc_2$so) # }"},{"path":"https://pkgdown.jrwb.de/mkin/reference/ds_mixed.html","id":null,"dir":"Reference","previous_headings":"","what":"Synthetic data for hierarchical kinetic degradation models — ds_mixed","title":"Synthetic data for hierarchical kinetic degradation models — ds_mixed","text":"R code used create data object installed package 'dataset_generation' directory.","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/ds_mixed.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Synthetic data for hierarchical kinetic degradation models — ds_mixed","text":"","code":"# \\dontrun{ sfo_mmkin <- mmkin(\"SFO\", ds_sfo, quiet = TRUE, error_model = \"tc\", cores = 15) sfo_saem <- saem(sfo_mmkin, no_random_effect = \"parent_0\") plot(sfo_saem) # } # This is the code used to generate the datasets cat(readLines(system.file(\"dataset_generation/ds_mixed.R\", package = \"mkin\")), sep = \"\\n\") #> # Synthetic data for hierarchical kinetic models #> # Refactored version of the code previously in tests/testthat/setup_script.R #> # The number of datasets was 3 for FOMC, and 10 for HS in that script, now it #> # is always 15 for consistency #> #> library(mkin) # We use mkinmod and mkinpredict #> sampling_times = c(0, 1, 3, 7, 14, 28, 60, 90, 120) #> n <- 15 #> log_sd <- 0.3 #> err_1 = list(const = 1, prop = 0.05) #> tc <- function(value) sigma_twocomp(value, err_1$const, err_1$prop) #> const <- function(value) 2 #> #> set.seed(123456) #> SFO <- mkinmod(parent = mkinsub(\"SFO\")) #> sfo_pop <- list(parent_0 = 100, k_parent = 0.03) #> sfo_parms <- as.matrix(data.frame( #> k_parent = rlnorm(n, log(sfo_pop$k_parent), log_sd))) #> set.seed(123456) #> ds_sfo <- lapply(1:n, function(i) { #> ds_mean <- mkinpredict(SFO, sfo_parms[i, ], #> c(parent = sfo_pop$parent_0), sampling_times) #> add_err(ds_mean, tc, n = 1)[[1]] #> }) #> attr(ds_sfo, \"pop\") <- sfo_pop #> attr(ds_sfo, \"parms\") <- sfo_parms #> #> set.seed(123456) #> FOMC <- mkinmod(parent = mkinsub(\"FOMC\")) #> fomc_pop <- list(parent_0 = 100, alpha = 2, beta = 8) #> fomc_parms <- as.matrix(data.frame( #> alpha = rlnorm(n, log(fomc_pop$alpha), 0.4), #> beta = rlnorm(n, log(fomc_pop$beta), 0.2))) #> set.seed(123456) #> ds_fomc <- lapply(1:n, function(i) { #> ds_mean <- mkinpredict(FOMC, fomc_parms[i, ], #> c(parent = fomc_pop$parent_0), sampling_times) #> add_err(ds_mean, tc, n = 1)[[1]] #> }) #> attr(ds_fomc, \"pop\") <- fomc_pop #> attr(ds_fomc, \"parms\") <- fomc_parms #> #> set.seed(123456) #> DFOP <- mkinmod(parent = mkinsub(\"DFOP\")) #> dfop_pop <- list(parent_0 = 100, k1 = 0.06, k2 = 0.015, g = 0.4) #> dfop_parms <- as.matrix(data.frame( #> k1 = rlnorm(n, log(dfop_pop$k1), log_sd), #> k2 = rlnorm(n, log(dfop_pop$k2), log_sd), #> g = plogis(rnorm(n, qlogis(dfop_pop$g), log_sd)))) #> set.seed(123456) #> ds_dfop <- lapply(1:n, function(i) { #> ds_mean <- mkinpredict(DFOP, dfop_parms[i, ], #> c(parent = dfop_pop$parent_0), sampling_times) #> add_err(ds_mean, tc, n = 1)[[1]] #> }) #> attr(ds_dfop, \"pop\") <- dfop_pop #> attr(ds_dfop, \"parms\") <- dfop_parms #> #> set.seed(123456) #> HS <- mkinmod(parent = mkinsub(\"HS\")) #> hs_pop <- list(parent_0 = 100, k1 = 0.08, k2 = 0.01, tb = 15) #> hs_parms <- as.matrix(data.frame( #> k1 = rlnorm(n, log(hs_pop$k1), log_sd), #> k2 = rlnorm(n, log(hs_pop$k2), log_sd), #> tb = rlnorm(n, log(hs_pop$tb), 0.1))) #> set.seed(123456) #> ds_hs <- lapply(1:n, function(i) { #> ds_mean <- mkinpredict(HS, hs_parms[i, ], #> c(parent = hs_pop$parent_0), sampling_times) #> add_err(ds_mean, const, n = 1)[[1]] #> }) #> attr(ds_hs, \"pop\") <- hs_pop #> attr(ds_hs, \"parms\") <- hs_parms #> #> set.seed(123456) #> DFOP_SFO <- mkinmod( #> parent = mkinsub(\"DFOP\", \"m1\"), #> m1 = mkinsub(\"SFO\"), #> quiet = TRUE) #> dfop_sfo_pop <- list(parent_0 = 100, #> k_m1 = 0.007, f_parent_to_m1 = 0.5, #> k1 = 0.1, k2 = 0.02, g = 0.5) #> dfop_sfo_parms <- as.matrix(data.frame( #> k1 = rlnorm(n, log(dfop_sfo_pop$k1), log_sd), #> k2 = rlnorm(n, log(dfop_sfo_pop$k2), log_sd), #> g = plogis(rnorm(n, qlogis(dfop_sfo_pop$g), log_sd)), #> f_parent_to_m1 = plogis(rnorm(n, #> qlogis(dfop_sfo_pop$f_parent_to_m1), log_sd)), #> k_m1 = rlnorm(n, log(dfop_sfo_pop$k_m1), log_sd))) #> ds_dfop_sfo_mean <- lapply(1:n, #> function(i) { #> mkinpredict(DFOP_SFO, dfop_sfo_parms[i, ], #> c(parent = dfop_sfo_pop$parent_0, m1 = 0), sampling_times) #> } #> ) #> set.seed(123456) #> ds_dfop_sfo <- lapply(ds_dfop_sfo_mean, function(ds) { #> add_err(ds, #> sdfunc = function(value) sqrt(err_1$const^2 + value^2 * err_1$prop^2), #> n = 1, secondary = \"m1\")[[1]] #> }) #> attr(ds_dfop_sfo, \"pop\") <- dfop_sfo_pop #> attr(ds_dfop_sfo, \"parms\") <- dfop_sfo_parms #> #> #save(ds_sfo, ds_fomc, ds_dfop, ds_hs, ds_dfop_sfo, file = \"data/ds_mixed.rda\", version = 2)"},{"path":"https://pkgdown.jrwb.de/mkin/reference/endpoints.html","id":null,"dir":"Reference","previous_headings":"","what":"Function to calculate endpoints for further use from kinetic models fitted\nwith mkinfit — endpoints","title":"Function to calculate endpoints for further use from kinetic models fitted\nwith mkinfit — endpoints","text":"function calculates DT50 DT90 values well formation fractions kinetic models fitted mkinfit. SFORB model specified one parents metabolites, Eigenvalues returned. equivalent rate constants DFOP model, advantage SFORB model can also used metabolites.","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/endpoints.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Function to calculate endpoints for further use from kinetic models fitted\nwith mkinfit — endpoints","text":"","code":"endpoints(fit, covariates = NULL, covariate_quantile = 0.5)"},{"path":"https://pkgdown.jrwb.de/mkin/reference/endpoints.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Function to calculate endpoints for further use from kinetic models fitted\nwith mkinfit — endpoints","text":"fit object class mkinfit, nlme.mmkin saem.mmkin, another object list components mkinmod containing mkinmod degradation model, two numeric vectors, bparms.optim bparms.fixed, contain parameter values model. covariates Numeric vector covariate values variables covariate models object. given, overrides 'covariate_quantile'. covariate_quantile argument effect fitted object covariate models. , default show endpoints median covariate values (50th percentile).","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/endpoints.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Function to calculate endpoints for further use from kinetic models fitted\nwith mkinfit — endpoints","text":"list matrix dissipation times named distimes, , applicable, vector formation fractions named ff , SFORB model use, vector eigenvalues SFORB models, equivalent DFOP rate constants","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/endpoints.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Function to calculate endpoints for further use from kinetic models fitted\nwith mkinfit — endpoints","text":"Additional DT50 values calculated FOMC DT90 k1 k2 HS DFOP, well Eigenvalues b1 b2 SFORB models","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/endpoints.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Function to calculate endpoints for further use from kinetic models fitted\nwith mkinfit — endpoints","text":"function used internally summary.mkinfit, summary.nlme.mmkin summary.saem.mmkin.","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/endpoints.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Function to calculate endpoints for further use from kinetic models fitted\nwith mkinfit — endpoints","text":"Johannes Ranke","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/endpoints.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Function to calculate endpoints for further use from kinetic models fitted\nwith mkinfit — endpoints","text":"","code":"fit <- mkinfit(\"FOMC\", FOCUS_2006_C, quiet = TRUE) endpoints(fit) #> $distimes #> DT50 DT90 DT50back #> parent 1.785233 15.1479 4.559973 #> # \\dontrun{ fit_2 <- mkinfit(\"DFOP\", FOCUS_2006_C, quiet = TRUE) endpoints(fit_2) #> $distimes #> DT50 DT90 DT50back DT50_k1 DT50_k2 #> parent 1.886925 21.25106 6.397207 1.508293 38.83438 #> fit_3 <- mkinfit(\"SFORB\", FOCUS_2006_C, quiet = TRUE) endpoints(fit_3) #> $ff #> parent_free #> 1 #> #> $SFORB #> parent_b1 parent_b2 parent_g #> 0.4595574 0.0178488 0.8539454 #> #> $distimes #> DT50 DT90 DT50back DT50_parent_b1 DT50_parent_b2 #> parent 1.886925 21.25106 6.397208 1.508293 38.83438 #> # }"},{"path":"https://pkgdown.jrwb.de/mkin/reference/experimental_data_for_UBA.html","id":null,"dir":"Reference","previous_headings":"","what":"Experimental datasets used for development and testing of error models — experimental_data_for_UBA_2019","title":"Experimental datasets used for development and testing of error models — experimental_data_for_UBA_2019","text":"12 datasets extracted active substance evaluation dossiers published EFSA. Kinetic evaluations shown datasets intended illustrate advance error model specifications. fact data results shown imply license use context pesticide registrations, use data may constrained data protection regulations. Preprocessing data performed based recommendations FOCUS kinetics workgroup (FOCUS, 2014) described . Datasets 1 2 Renewal Assessment Report (RAR) imazamox (France, 2015, p. 15). setting values reported zero, LOQ 0.1 assumed. Metabolite residues reported day zero added parent compound residues. Datasets 3 4 Renewal Assessment Report (RAR) isofetamid (Belgium, 2014, p. 8) show data two different radiolabels. dataset 4, value given metabolite day zero sampling replicate B added parent compound, following respective FOCUS recommendation. Dataset 5 Renewal Assessment Report (RAR) ethofumesate (Austria, 2015, p. 16). Datasets 6 10 Renewal Assessment Report (RAR) glyphosate (Germany, 2013, pages 8, 28, 50, 51). initial sampling, residues given metabolite added parent value, following recommendation FOCUS kinetics workgroup. Dataset 11 Renewal Assessment Report (RAR) 2,4-D (Hellas, 2013, p. 644). Values reported zero set NA, exception day three sampling metabolite A2, set one half LOD reported 1% AR. Dataset 12 Renewal Assessment Report (RAR) thifensulfuron-methyl (United Kingdom, 2014, p. 81).","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/experimental_data_for_UBA.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Experimental datasets used for development and testing of error models — experimental_data_for_UBA_2019","text":"","code":"experimental_data_for_UBA_2019"},{"path":"https://pkgdown.jrwb.de/mkin/reference/experimental_data_for_UBA.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Experimental datasets used for development and testing of error models — experimental_data_for_UBA_2019","text":"list containing twelve datasets R6 class defined mkinds, containing, among others, following components title name dataset, e.g. Soil 1 data data frame data form expected mkinfit","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/experimental_data_for_UBA.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"Experimental datasets used for development and testing of error models — experimental_data_for_UBA_2019","text":"Austria (2015). Ethofumesate Renewal Assessment Report Volume 3 Annex B.8 () Belgium (2014). Isofetamid (IKF-5411) Draft Assessment Report Volume 3 Annex B.8 () France (2015). Imazamox Draft Renewal Assessment Report Volume 3 Annex B.8 () FOCUS (2014) “Generic guidance Estimating Persistence Degradation Kinetics Environmental Fate Studies Pesticides EU Registration” Report FOCUS Work Group Degradation Kinetics, Version 1.1, 18 December 2014 http://esdac.jrc.ec.europa.eu/projects/degradation-kinetics Germany (2013). Renewal Assessment Report Glyphosate Volume 3 Annex B.8: Environmental Fate Behaviour Hellas (2013). Renewal Assessment Report 2,4-D Volume 3 Annex B.8: Fate behaviour environment Ranke (2019) Documentation results obtained error model expertise written German Umweltbundesamt. United Kingdom (2014). Thifensulfuron-methyl - Annex B.8 (Volume 3) Report Proposed Decision United Kingdom made European Commission Regulation (EC) . 1141/2010 renewal active substance","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/experimental_data_for_UBA.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Experimental datasets used for development and testing of error models — experimental_data_for_UBA_2019","text":"","code":"# \\dontrun{ # Model definitions sfo_sfo <- mkinmod( parent = mkinsub(\"SFO\", to = \"A1\"), A1 = mkinsub(\"SFO\"), use_of_ff = \"max\" ) #> Temporary DLL for differentials generated and loaded dfop_sfo <- mkinmod( parent = mkinsub(\"DFOP\", to = \"A1\"), A1 = mkinsub(\"SFO\"), use_of_ff = \"max\" ) #> Temporary DLL for differentials generated and loaded sfo_sfo_sfo <- mkinmod( parent = mkinsub(\"SFO\", to = \"A1\"), A1 = mkinsub(\"SFO\", to = \"A2\"), A2 = mkinsub(\"SFO\"), use_of_ff = \"max\" ) #> Temporary DLL for differentials generated and loaded dfop_sfo_sfo <- mkinmod( parent = mkinsub(\"DFOP\", to = \"A1\"), A1 = mkinsub(\"SFO\", to = \"A2\"), A2 = mkinsub(\"SFO\"), use_of_ff = \"max\" ) #> Temporary DLL for differentials generated and loaded d_1_2 <- lapply(experimental_data_for_UBA_2019[1:2], function(x) x$data) names(d_1_2) <- paste(\"Soil\", 1:2) f_1_2_tc <- mmkin(list(\"DFOP-SFO-SFO\" = dfop_sfo_sfo), d_1_2, error_model = \"tc\") plot(f_1_2_tc, resplot = \"errmod\") # }"},{"path":"https://pkgdown.jrwb.de/mkin/reference/f_time_norm_focus.html","id":null,"dir":"Reference","previous_headings":"","what":"Normalisation factors for aerobic soil degradation according to FOCUS guidance — f_time_norm_focus","title":"Normalisation factors for aerobic soil degradation according to FOCUS guidance — f_time_norm_focus","text":"Time step normalisation factors aerobic soil degradation described Appendix 8 FOCUS kinetics guidance (FOCUS 2014, p. 369).","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/f_time_norm_focus.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Normalisation factors for aerobic soil degradation according to FOCUS guidance — f_time_norm_focus","text":"","code":"f_time_norm_focus(object, ...) # S3 method for numeric f_time_norm_focus( object, moisture = NA, field_moisture = NA, temperature = object, Q10 = 2.58, walker = 0.7, f_na = NA, ... ) # S3 method for mkindsg f_time_norm_focus( object, study_moisture_ref_source = c(\"auto\", \"meta\", \"focus\"), Q10 = 2.58, walker = 0.7, f_na = NA, ... )"},{"path":"https://pkgdown.jrwb.de/mkin/reference/f_time_norm_focus.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Normalisation factors for aerobic soil degradation according to FOCUS guidance — f_time_norm_focus","text":"object object containing information used calculations ... Currently used moisture Numeric vector moisture contents \\% w/w field_moisture Numeric vector moisture contents field capacity (pF2) \\% w/w temperature Numeric vector temperatures °C Q10 Q10 value used temperature normalisation walker Walker exponent used moisture normalisation f_na factor use NA values. set NA, factors complete cases returned. study_moisture_ref_source Source reference value used calculate study moisture. 'auto', preference given reference moisture given meta information, otherwise focus soil moisture soil class used","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/f_time_norm_focus.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Normalisation factors for aerobic soil degradation according to FOCUS guidance — f_time_norm_focus","text":"FOCUS (2006) “Guidance Document Estimating Persistence Degradation Kinetics Environmental Fate Studies Pesticides EU Registration” Report FOCUS Work Group Degradation Kinetics, EC Document Reference Sanco/10058/2005 version 2.0, 434 pp, http://esdac.jrc.ec.europa.eu/projects/degradation-kinetics FOCUS (2014) “Generic guidance Estimating Persistence Degradation Kinetics Environmental Fate Studies Pesticides EU Registration” Report FOCUS Work Group Degradation Kinetics, Version 1.1, 18 December 2014 http://esdac.jrc.ec.europa.eu/projects/degradation-kinetics","code":""},{"path":[]},{"path":"https://pkgdown.jrwb.de/mkin/reference/f_time_norm_focus.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Normalisation factors for aerobic soil degradation according to FOCUS guidance — f_time_norm_focus","text":"","code":"f_time_norm_focus(25, 20, 25) # 1.37, compare FOCUS 2014 p. 184 #> [1] 1.373956 D24_2014$meta #> study usda_soil_type study_moisture_ref_type #> Mississippi Cohen 1991 Silt loam <NA> #> Fayette Liu and Adelfinskaya 2011 Silt loam pF1 #> RefSol 03-G Liu and Adelfinskaya 2011 Loam pF1 #> Site E1 Liu and Adelfinskaya 2011 Loam pF1 #> Site I2 Liu and Adelfinskaya 2011 Loamy sand pF1 #> rel_moisture temperature #> Mississippi NA 25 #> Fayette 0.5 20 #> RefSol 03-G 0.5 20 #> Site E1 0.5 20 #> Site I2 0.5 20 # No moisture normalisation in the first dataset, so we use f_na = 1 to get # temperature only normalisation as in the EU evaluation f_time_norm_focus(D24_2014, study_moisture_ref_source = \"focus\", f_na = 1) #> $f_time_norm was (re)set to normalised values"},{"path":"https://pkgdown.jrwb.de/mkin/reference/focus_soil_moisture.html","id":null,"dir":"Reference","previous_headings":"","what":"FOCUS default values for soil moisture contents at field capacity, MWHC and 1/3 bar — focus_soil_moisture","title":"FOCUS default values for soil moisture contents at field capacity, MWHC and 1/3 bar — focus_soil_moisture","text":"value transcribed p. 36. table assumes field capacity corresponds pF2, MWHC pF 1 1/3 bar pF 2.5.","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/focus_soil_moisture.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"FOCUS default values for soil moisture contents at field capacity, MWHC and 1/3 bar — focus_soil_moisture","text":"","code":"focus_soil_moisture"},{"path":"https://pkgdown.jrwb.de/mkin/reference/focus_soil_moisture.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"FOCUS default values for soil moisture contents at field capacity, MWHC and 1/3 bar — focus_soil_moisture","text":"matrix upper case USDA soil classes row names, water tension ('pF1', 'pF2', 'pF 2.5') column names","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/focus_soil_moisture.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"FOCUS default values for soil moisture contents at field capacity, MWHC and 1/3 bar — focus_soil_moisture","text":"Anonymous (2014) Generic Guidance Tier 1 FOCUS Ground Water Assessment Version 2.2, May 2014 https://esdac.jrc.ec.europa.eu/projects/ground-water","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/focus_soil_moisture.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"FOCUS default values for soil moisture contents at field capacity, MWHC and 1/3 bar — focus_soil_moisture","text":"","code":"focus_soil_moisture #> pF1 pF2 pF2.5 #> Sand 24 12 7 #> Loamy sand 24 14 9 #> Sandy loam 27 19 15 #> Sandy clay loam 28 22 18 #> Clay loam 32 28 25 #> Loam 31 25 21 #> Silt loam 32 26 21 #> Silty clay loam 34 30 27 #> Silt 31 27 21 #> Sandy clay 41 35 31 #> Silty clay 44 40 36 #> Clay 53 48 43"},{"path":"https://pkgdown.jrwb.de/mkin/reference/get_deg_func.html","id":null,"dir":"Reference","previous_headings":"","what":"Retrieve a degradation function from the mmkin namespace — get_deg_func","title":"Retrieve a degradation function from the mmkin namespace — get_deg_func","text":"Retrieve degradation function mmkin namespace","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/get_deg_func.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Retrieve a degradation function from the mmkin namespace — get_deg_func","text":"","code":"get_deg_func()"},{"path":"https://pkgdown.jrwb.de/mkin/reference/get_deg_func.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Retrieve a degradation function from the mmkin namespace — get_deg_func","text":"function likely previously assigned within nlme.mmkin","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/hierarchical_kinetics.html","id":null,"dir":"Reference","previous_headings":"","what":"Hierarchical kinetics template — hierarchical_kinetics","title":"Hierarchical kinetics template — hierarchical_kinetics","text":"R markdown format setting hierarchical kinetics based template provided mkin package. format based rmarkdown::pdf_document. Chunk options adapted. Echoing R code code chunks caching turned per default. character prepending output code chunks set empty string, code tidying , figure alignment defaults centering, positioning figures set \"H\", means figures move around document, stay user includes .","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/hierarchical_kinetics.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Hierarchical kinetics template — hierarchical_kinetics","text":"","code":"hierarchical_kinetics(..., keep_tex = FALSE)"},{"path":"https://pkgdown.jrwb.de/mkin/reference/hierarchical_kinetics.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Hierarchical kinetics template — hierarchical_kinetics","text":"... Arguments rmarkdown::pdf_document keep_tex Keep intermediate tex file used conversion PDF","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/hierarchical_kinetics.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Hierarchical kinetics template — hierarchical_kinetics","text":"R Markdown output format pass render","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/hierarchical_kinetics.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Hierarchical kinetics template — hierarchical_kinetics","text":"latter feature (positioning figures \"H\") depends LaTeX package 'float'. addition, LaTeX package 'listing' used template showing model fit summaries Appendix. means LaTeX packages 'float' 'listing' need installed TeX distribution used. Windows, easiest way achieve (TeX distribution present ) install 'tinytex' R package, run 'tinytex::install_tinytex()' get basic tiny Tex distribution, run 'tinytex::tlmgr_install(c(\"float\", \"listing\"))'.","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/hierarchical_kinetics.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Hierarchical kinetics template — hierarchical_kinetics","text":"","code":"# \\dontrun{ library(rmarkdown) # The following is now commented out after the relase of v1.2.3 for the generation # of online docs, as the command creates a directory and opens an editor #draft(\"example_analysis.rmd\", template = \"hierarchical_kinetics\", package = \"mkin\") # }"},{"path":"https://pkgdown.jrwb.de/mkin/reference/illparms.html","id":null,"dir":"Reference","previous_headings":"","what":"Method to get the names of ill-defined parameters — illparms","title":"Method to get the names of ill-defined parameters — illparms","text":"method generalised nonlinear regression fits obtained mkinfit mmkin checks degradation parameters pass Wald test (degradation kinetics often simply called t-test) significant difference zero. test, parameterisation without parameter transformations used.","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/illparms.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Method to get the names of ill-defined parameters — illparms","text":"","code":"illparms(object, ...) # S3 method for mkinfit illparms(object, conf.level = 0.95, ...) # S3 method for illparms.mkinfit print(x, ...) # S3 method for mmkin illparms(object, conf.level = 0.95, ...) # S3 method for illparms.mmkin print(x, ...) # S3 method for saem.mmkin illparms( object, conf.level = 0.95, random = TRUE, errmod = TRUE, slopes = TRUE, ... ) # S3 method for illparms.saem.mmkin print(x, ...) # S3 method for mhmkin illparms(object, conf.level = 0.95, random = TRUE, errmod = TRUE, ...) # S3 method for illparms.mhmkin print(x, ...)"},{"path":"https://pkgdown.jrwb.de/mkin/reference/illparms.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Method to get the names of ill-defined parameters — illparms","text":"object object investigate ... potential future extensions conf.level confidence level checking p values x object printed random hierarchical fits, random effects tested? errmod hierarchical fits, error model parameters tested? slopes hierarchical saem fits using saemix backend, slope parameters covariate model(starting 'beta_') tested?","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/illparms.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Method to get the names of ill-defined parameters — illparms","text":"mkinfit saem objects, character vector parameter names. mmkin mhmkin objects, matrix like object class 'illparms.mmkin' 'illparms.mhmkin'.","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/illparms.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Method to get the names of ill-defined parameters — illparms","text":"method hierarchical model fits, also known nonlinear mixed-effects model fits obtained saem mhmkin checks confidence intervals random effects expressed standard deviations include zero, confidence intervals error model parameters include zero.","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/illparms.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Method to get the names of ill-defined parameters — illparms","text":"return objects printing methods. single fits, printing output anything case ill-defined parameters found.","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/illparms.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Method to get the names of ill-defined parameters — illparms","text":"","code":"fit <- mkinfit(\"FOMC\", FOCUS_2006_A, quiet = TRUE) #> Warning: Optimisation did not converge: #> false convergence (8) illparms(fit) #> [1] \"parent_0\" \"alpha\" \"beta\" \"sigma\" # \\dontrun{ fits <- mmkin( c(\"SFO\", \"FOMC\"), list(\"FOCUS A\" = FOCUS_2006_A, \"FOCUS C\" = FOCUS_2006_C), quiet = TRUE) illparms(fits) #> dataset #> model FOCUS A FOCUS C #> SFO #> FOMC parent_0, alpha, beta, sigma # }"},{"path":"https://pkgdown.jrwb.de/mkin/reference/ilr.html","id":null,"dir":"Reference","previous_headings":"","what":"Function to perform isometric log-ratio transformation — ilr","title":"Function to perform isometric log-ratio transformation — ilr","text":"implementation special case class isometric log-ratio transformations.","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/ilr.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Function to perform isometric log-ratio transformation — ilr","text":"","code":"ilr(x) invilr(x)"},{"path":"https://pkgdown.jrwb.de/mkin/reference/ilr.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Function to perform isometric log-ratio transformation — ilr","text":"x numeric vector. Naturally, forward transformation sensible vectors elements greater zero.","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/ilr.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Function to perform isometric log-ratio transformation — ilr","text":"result forward backward transformation. returned components always sum 1 case inverse log-ratio transformation.","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/ilr.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Function to perform isometric log-ratio transformation — ilr","text":"Peter Filzmoser, Karel Hron (2008) Outlier Detection Compositional Data Using Robust Methods. Math Geosci 40 233-248","code":""},{"path":[]},{"path":"https://pkgdown.jrwb.de/mkin/reference/ilr.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Function to perform isometric log-ratio transformation — ilr","text":"René Lehmann Johannes Ranke","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/ilr.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Function to perform isometric log-ratio transformation — ilr","text":"","code":"# Order matters ilr(c(0.1, 1, 10)) #> [1] -1.628174 -2.820079 ilr(c(10, 1, 0.1)) #> [1] 1.628174 2.820079 # Equal entries give ilr transformations with zeros as elements ilr(c(3, 3, 3)) #> [1] 0 0 # Almost equal entries give small numbers ilr(c(0.3, 0.4, 0.3)) #> [1] -0.2034219 0.1174457 # Only the ratio between the numbers counts, not their sum invilr(ilr(c(0.7, 0.29, 0.01))) #> [1] 0.70 0.29 0.01 invilr(ilr(2.1 * c(0.7, 0.29, 0.01))) #> [1] 0.70 0.29 0.01 # Inverse transformation of larger numbers gives unequal elements invilr(-10) #> [1] 7.213536e-07 9.999993e-01 invilr(c(-10, 0)) #> [1] 7.207415e-07 9.991507e-01 8.486044e-04 # The sum of the elements of the inverse ilr is 1 sum(invilr(c(-10, 0))) #> [1] 1 # This is why we do not need all elements of the inverse transformation to go back: a <- c(0.1, 0.3, 0.5) b <- invilr(a) length(b) # Four elements #> [1] 4 ilr(c(b[1:3], 1 - sum(b[1:3]))) # Gives c(0.1, 0.3, 0.5) #> [1] 0.1 0.3 0.5"},{"path":"https://pkgdown.jrwb.de/mkin/reference/intervals.saem.mmkin.html","id":null,"dir":"Reference","previous_headings":"","what":"Confidence intervals for parameters in saem.mmkin objects — intervals.saem.mmkin","title":"Confidence intervals for parameters in saem.mmkin objects — intervals.saem.mmkin","text":"Confidence intervals parameters saem.mmkin objects","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/intervals.saem.mmkin.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Confidence intervals for parameters in saem.mmkin objects — intervals.saem.mmkin","text":"","code":"# S3 method for saem.mmkin intervals(object, level = 0.95, backtransform = TRUE, ...)"},{"path":"https://pkgdown.jrwb.de/mkin/reference/intervals.saem.mmkin.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Confidence intervals for parameters in saem.mmkin objects — intervals.saem.mmkin","text":"object fitted saem.mmkin object level confidence level. Must default 0.95 available saemix object backtransform case model fitted mkin transformations, backtransform parameters one one correlation transformed backtransformed parameters exists? ... compatibility generic method","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/intervals.saem.mmkin.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Confidence intervals for parameters in saem.mmkin objects — intervals.saem.mmkin","text":"object 'intervals.saem.mmkin' 'intervals.lme' class attribute","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/llhist.html","id":null,"dir":"Reference","previous_headings":"","what":"Plot the distribution of log likelihoods from multistart objects — llhist","title":"Plot the distribution of log likelihoods from multistart objects — llhist","text":"Produces histogram log-likelihoods. addition, likelihood original fit shown red vertical line.","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/llhist.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Plot the distribution of log likelihoods from multistart objects — llhist","text":"","code":"llhist(object, breaks = \"Sturges\", lpos = \"topleft\", main = \"\", ...)"},{"path":"https://pkgdown.jrwb.de/mkin/reference/llhist.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Plot the distribution of log likelihoods from multistart objects — llhist","text":"object multistart object breaks Passed hist lpos Positioning legend. main Title plot ... Passed hist","code":""},{"path":[]},{"path":"https://pkgdown.jrwb.de/mkin/reference/loftest.html","id":null,"dir":"Reference","previous_headings":"","what":"Lack-of-fit test for models fitted to data with replicates — loftest","title":"Lack-of-fit test for models fitted to data with replicates — loftest","text":"generic function method currently defined mkinfit objects. fits anova model data contained object compares likelihoods using likelihood ratio test lrtest.default lmtest package.","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/loftest.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Lack-of-fit test for models fitted to data with replicates — loftest","text":"","code":"loftest(object, ...) # S3 method for mkinfit loftest(object, ...)"},{"path":"https://pkgdown.jrwb.de/mkin/reference/loftest.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Lack-of-fit test for models fitted to data with replicates — loftest","text":"object model object defined loftest method ... used","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/loftest.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Lack-of-fit test for models fitted to data with replicates — loftest","text":"anova model interpreted simplest form mkinfit model, assuming constant variance means, enforcing structure means, one model parameter every mean replicate samples.","code":""},{"path":[]},{"path":"https://pkgdown.jrwb.de/mkin/reference/loftest.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Lack-of-fit test for models fitted to data with replicates — loftest","text":"","code":"# \\dontrun{ test_data <- subset(synthetic_data_for_UBA_2014[[12]]$data, name == \"parent\") sfo_fit <- mkinfit(\"SFO\", test_data, quiet = TRUE) plot_res(sfo_fit) # We see a clear pattern in the residuals loftest(sfo_fit) # We have a clear lack of fit #> Likelihood ratio test #> #> Model 1: ANOVA with error model const #> Model 2: SFO with error model const #> #Df LogLik Df Chisq Pr(>Chisq) #> 1 10 -40.710 #> 2 3 -63.954 -7 46.487 7.027e-08 *** #> --- #> Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 # # We try a different model (the one that was used to generate the data) dfop_fit <- mkinfit(\"DFOP\", test_data, quiet = TRUE) plot_res(dfop_fit) # We don't see systematic deviations, but heteroscedastic residuals # therefore we should consider adapting the error model, although we have loftest(dfop_fit) # no lack of fit #> Likelihood ratio test #> #> Model 1: ANOVA with error model const #> Model 2: DFOP with error model const #> #Df LogLik Df Chisq Pr(>Chisq) #> 1 10 -40.710 #> 2 5 -42.453 -5 3.485 0.6257 # # This is the anova model used internally for the comparison test_data_anova <- test_data test_data_anova$time <- as.factor(test_data_anova$time) anova_fit <- lm(value ~ time, data = test_data_anova) summary(anova_fit) #> #> Call: #> lm(formula = value ~ time, data = test_data_anova) #> #> Residuals: #> Min 1Q Median 3Q Max #> -6.1000 -0.5625 0.0000 0.5625 6.1000 #> #> Coefficients: #> Estimate Std. Error t value Pr(>|t|) #> (Intercept) 103.150 2.323 44.409 7.44e-12 *** #> time1 -19.950 3.285 -6.073 0.000185 *** #> time3 -50.800 3.285 -15.465 8.65e-08 *** #> time7 -68.500 3.285 -20.854 6.28e-09 *** #> time14 -79.750 3.285 -24.278 1.63e-09 *** #> time28 -86.000 3.285 -26.181 8.35e-10 *** #> time60 -94.900 3.285 -28.891 3.48e-10 *** #> time90 -98.500 3.285 -29.986 2.49e-10 *** #> time120 -100.450 3.285 -30.580 2.09e-10 *** #> --- #> Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 #> #> Residual standard error: 3.285 on 9 degrees of freedom #> Multiple R-squared: 0.9953,\tAdjusted R-squared: 0.9912 #> F-statistic: 240.5 on 8 and 9 DF, p-value: 1.417e-09 #> logLik(anova_fit) # We get the same likelihood and degrees of freedom #> 'log Lik.' -40.71015 (df=10) # test_data_2 <- synthetic_data_for_UBA_2014[[12]]$data m_synth_SFO_lin <- mkinmod(parent = list(type = \"SFO\", to = \"M1\"), M1 = list(type = \"SFO\", to = \"M2\"), M2 = list(type = \"SFO\"), use_of_ff = \"max\") #> Temporary DLL for differentials generated and loaded sfo_lin_fit <- mkinfit(m_synth_SFO_lin, test_data_2, quiet = TRUE) plot_res(sfo_lin_fit) # not a good model, we try parallel formation loftest(sfo_lin_fit) #> Likelihood ratio test #> #> Model 1: ANOVA with error model const #> Model 2: m_synth_SFO_lin with error model const and fixed parameter(s) M1_0, M2_0 #> #Df LogLik Df Chisq Pr(>Chisq) #> 1 28 -93.606 #> 2 7 -171.927 -21 156.64 < 2.2e-16 *** #> --- #> Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 # m_synth_SFO_par <- mkinmod(parent = list(type = \"SFO\", to = c(\"M1\", \"M2\")), M1 = list(type = \"SFO\"), M2 = list(type = \"SFO\"), use_of_ff = \"max\") #> Temporary DLL for differentials generated and loaded sfo_par_fit <- mkinfit(m_synth_SFO_par, test_data_2, quiet = TRUE) plot_res(sfo_par_fit) # much better for metabolites loftest(sfo_par_fit) #> Likelihood ratio test #> #> Model 1: ANOVA with error model const #> Model 2: m_synth_SFO_par with error model const and fixed parameter(s) M1_0, M2_0 #> #Df LogLik Df Chisq Pr(>Chisq) #> 1 28 -93.606 #> 2 7 -156.331 -21 125.45 < 2.2e-16 *** #> --- #> Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 # m_synth_DFOP_par <- mkinmod(parent = list(type = \"DFOP\", to = c(\"M1\", \"M2\")), M1 = list(type = \"SFO\"), M2 = list(type = \"SFO\"), use_of_ff = \"max\") #> Temporary DLL for differentials generated and loaded dfop_par_fit <- mkinfit(m_synth_DFOP_par, test_data_2, quiet = TRUE) plot_res(dfop_par_fit) # No visual lack of fit loftest(dfop_par_fit) # no lack of fit found by the test #> Likelihood ratio test #> #> Model 1: ANOVA with error model const #> Model 2: m_synth_DFOP_par with error model const and fixed parameter(s) M1_0, M2_0 #> #Df LogLik Df Chisq Pr(>Chisq) #> 1 28 -93.606 #> 2 9 -102.763 -19 18.313 0.5016 # # The anova model used for comparison in the case of transformation products test_data_anova_2 <- dfop_par_fit$data test_data_anova_2$variable <- as.factor(test_data_anova_2$variable) test_data_anova_2$time <- as.factor(test_data_anova_2$time) anova_fit_2 <- lm(observed ~ time:variable - 1, data = test_data_anova_2) summary(anova_fit_2) #> #> Call: #> lm(formula = observed ~ time:variable - 1, data = test_data_anova_2) #> #> Residuals: #> Min 1Q Median 3Q Max #> -6.1000 -0.5875 0.0000 0.5875 6.1000 #> #> Coefficients: (2 not defined because of singularities) #> Estimate Std. Error t value Pr(>|t|) #> time0:variableparent 103.150 1.573 65.562 < 2e-16 *** #> time1:variableparent 83.200 1.573 52.882 < 2e-16 *** #> time3:variableparent 52.350 1.573 33.274 < 2e-16 *** #> time7:variableparent 34.650 1.573 22.024 < 2e-16 *** #> time14:variableparent 23.400 1.573 14.873 6.35e-14 *** #> time28:variableparent 17.150 1.573 10.901 5.47e-11 *** #> time60:variableparent 8.250 1.573 5.244 1.99e-05 *** #> time90:variableparent 4.650 1.573 2.956 0.006717 ** #> time120:variableparent 2.700 1.573 1.716 0.098507 . #> time0:variableM1 NA NA NA NA #> time1:variableM1 11.850 1.573 7.532 6.93e-08 *** #> time3:variableM1 22.700 1.573 14.428 1.26e-13 *** #> time7:variableM1 33.050 1.573 21.007 < 2e-16 *** #> time14:variableM1 31.250 1.573 19.863 < 2e-16 *** #> time28:variableM1 18.900 1.573 12.013 7.02e-12 *** #> time60:variableM1 7.550 1.573 4.799 6.28e-05 *** #> time90:variableM1 3.850 1.573 2.447 0.021772 * #> time120:variableM1 2.050 1.573 1.303 0.204454 #> time0:variableM2 NA NA NA NA #> time1:variableM2 6.700 1.573 4.259 0.000254 *** #> time3:variableM2 16.750 1.573 10.646 8.93e-11 *** #> time7:variableM2 25.800 1.573 16.399 6.89e-15 *** #> time14:variableM2 28.600 1.573 18.178 6.35e-16 *** #> time28:variableM2 25.400 1.573 16.144 9.85e-15 *** #> time60:variableM2 21.600 1.573 13.729 3.81e-13 *** #> time90:variableM2 17.800 1.573 11.314 2.51e-11 *** #> time120:variableM2 14.100 1.573 8.962 2.79e-09 *** #> --- #> Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 #> #> Residual standard error: 2.225 on 25 degrees of freedom #> Multiple R-squared: 0.9979,\tAdjusted R-squared: 0.9957 #> F-statistic: 469.2 on 25 and 25 DF, p-value: < 2.2e-16 #> # }"},{"path":"https://pkgdown.jrwb.de/mkin/reference/logLik.mkinfit.html","id":null,"dir":"Reference","previous_headings":"","what":"Calculated the log-likelihood of a fitted mkinfit object — logLik.mkinfit","title":"Calculated the log-likelihood of a fitted mkinfit object — logLik.mkinfit","text":"function returns product likelihood densities observed value, calculated part fitting procedure using dnorm, .e. assuming normal distribution, means predicted degradation model, standard deviations predicted error model.","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/logLik.mkinfit.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Calculated the log-likelihood of a fitted mkinfit object — logLik.mkinfit","text":"","code":"# S3 method for mkinfit logLik(object, ...)"},{"path":"https://pkgdown.jrwb.de/mkin/reference/logLik.mkinfit.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Calculated the log-likelihood of a fitted mkinfit object — logLik.mkinfit","text":"object object class mkinfit. ... compatibility generic method","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/logLik.mkinfit.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Calculated the log-likelihood of a fitted mkinfit object — logLik.mkinfit","text":"object class logLik number estimated parameters (degradation model parameters plus variance model parameters) attribute.","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/logLik.mkinfit.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Calculated the log-likelihood of a fitted mkinfit object — logLik.mkinfit","text":"total number estimated parameters returned value likelihood calculated sum fitted degradation model parameters fitted error model parameters.","code":""},{"path":[]},{"path":"https://pkgdown.jrwb.de/mkin/reference/logLik.mkinfit.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Calculated the log-likelihood of a fitted mkinfit object — logLik.mkinfit","text":"Johannes Ranke","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/logLik.mkinfit.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Calculated the log-likelihood of a fitted mkinfit object — logLik.mkinfit","text":"","code":"# \\dontrun{ sfo_sfo <- mkinmod( parent = mkinsub(\"SFO\", to = \"m1\"), m1 = mkinsub(\"SFO\") ) #> Temporary DLL for differentials generated and loaded d_t <- subset(FOCUS_2006_D, value != 0) f_nw <- mkinfit(sfo_sfo, d_t, quiet = TRUE) # no weighting (weights are unity) f_obs <- update(f_nw, error_model = \"obs\") f_tc <- update(f_nw, error_model = \"tc\") AIC(f_nw, f_obs, f_tc) #> df AIC #> f_nw 5 204.4486 #> f_obs 6 205.8727 #> f_tc 6 141.9656 # }"},{"path":"https://pkgdown.jrwb.de/mkin/reference/logLik.saem.mmkin.html","id":null,"dir":"Reference","previous_headings":"","what":"logLik method for saem.mmkin objects — logLik.saem.mmkin","title":"logLik method for saem.mmkin objects — logLik.saem.mmkin","text":"logLik method saem.mmkin objects","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/logLik.saem.mmkin.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"logLik method for saem.mmkin objects — logLik.saem.mmkin","text":"","code":"# S3 method for saem.mmkin logLik(object, ..., method = c(\"is\", \"lin\", \"gq\"))"},{"path":"https://pkgdown.jrwb.de/mkin/reference/logLik.saem.mmkin.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"logLik method for saem.mmkin objects — logLik.saem.mmkin","text":"object fitted saem.mmkin object ... Passed saemix::logLik.SaemixObject method Passed saemix::logLik.SaemixObject","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/logistic.solution.html","id":null,"dir":"Reference","previous_headings":"","what":"Logistic kinetics — logistic.solution","title":"Logistic kinetics — logistic.solution","text":"Function describing exponential decline defined starting value, increasing rate constant, supposedly caused microbial growth","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/logistic.solution.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Logistic kinetics — logistic.solution","text":"","code":"logistic.solution(t, parent_0, kmax, k0, r)"},{"path":"https://pkgdown.jrwb.de/mkin/reference/logistic.solution.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Logistic kinetics — logistic.solution","text":"t Time. parent_0 Starting value response variable time zero. kmax Maximum rate constant. k0 Minimum rate constant effective time zero. r Growth rate increase rate constant.","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/logistic.solution.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Logistic kinetics — logistic.solution","text":"value response variable time t.","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/logistic.solution.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Logistic kinetics — logistic.solution","text":"solution logistic model reduces SFO.solution k0 equal kmax.","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/logistic.solution.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Logistic kinetics — logistic.solution","text":"FOCUS (2006) “Guidance Document Estimating Persistence Degradation Kinetics Environmental Fate Studies Pesticides EU Registration” Report FOCUS Work Group Degradation Kinetics, EC Document Reference Sanco/10058/2005 version 2.0, 434 pp, http://esdac.jrc.ec.europa.eu/projects/degradation-kinetics FOCUS (2014) “Generic guidance Estimating Persistence Degradation Kinetics Environmental Fate Studies Pesticides EU Registration” Report FOCUS Work Group Degradation Kinetics, Version 1.1, 18 December 2014 http://esdac.jrc.ec.europa.eu/projects/degradation-kinetics","code":""},{"path":[]},{"path":"https://pkgdown.jrwb.de/mkin/reference/logistic.solution.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Logistic kinetics — logistic.solution","text":"","code":"# Reproduce the plot on page 57 of FOCUS (2014) plot(function(x) logistic.solution(x, 100, 0.08, 0.0001, 0.2), from = 0, to = 100, ylim = c(0, 100), xlab = \"Time\", ylab = \"Residue\") plot(function(x) logistic.solution(x, 100, 0.08, 0.0001, 0.4), from = 0, to = 100, add = TRUE, lty = 2, col = 2) plot(function(x) logistic.solution(x, 100, 0.08, 0.0001, 0.8), from = 0, to = 100, add = TRUE, lty = 3, col = 3) plot(function(x) logistic.solution(x, 100, 0.08, 0.001, 0.2), from = 0, to = 100, add = TRUE, lty = 4, col = 4) plot(function(x) logistic.solution(x, 100, 0.08, 0.08, 0.2), from = 0, to = 100, add = TRUE, lty = 5, col = 5) legend(\"topright\", inset = 0.05, legend = paste0(\"k0 = \", c(0.0001, 0.0001, 0.0001, 0.001, 0.08), \", r = \", c(0.2, 0.4, 0.8, 0.2, 0.2)), lty = 1:5, col = 1:5) # Fit with synthetic data logistic <- mkinmod(parent = mkinsub(\"logistic\")) sampling_times = c(0, 1, 3, 7, 14, 28, 60, 90, 120) parms_logistic <- c(kmax = 0.08, k0 = 0.0001, r = 0.2) d_logistic <- mkinpredict(logistic, parms_logistic, c(parent = 100), sampling_times) d_2_1 <- add_err(d_logistic, sdfunc = function(x) sigma_twocomp(x, 0.5, 0.07), n = 1, reps = 2, digits = 5, LOD = 0.1, seed = 123456)[[1]] m <- mkinfit(\"logistic\", d_2_1, quiet = TRUE) plot_sep(m) summary(m)$bpar #> Estimate se_notrans t value Pr(>t) Lower #> parent_0 1.057896e+02 1.9023449604 55.610120 3.768360e-16 1.016451e+02 #> kmax 6.398190e-02 0.0143201030 4.467978 3.841828e-04 3.929235e-02 #> k0 1.612775e-04 0.0005866813 0.274898 3.940351e-01 5.846688e-08 #> r 2.263946e-01 0.1718110664 1.317695 1.061043e-01 4.335843e-02 #> sigma 5.332935e+00 0.9145907310 5.830952 4.036926e-05 3.340213e+00 #> Upper #> parent_0 109.9341588 #> kmax 0.1041853 #> k0 0.4448749 #> r 1.1821120 #> sigma 7.3256566 endpoints(m)$distimes #> DT50 DT90 DT50_k0 DT50_kmax #> parent 36.86533 62.41511 4297.853 10.83349"},{"path":"https://pkgdown.jrwb.de/mkin/reference/lrtest.mkinfit.html","id":null,"dir":"Reference","previous_headings":"","what":"Likelihood ratio test for mkinfit models — lrtest.mkinfit","title":"Likelihood ratio test for mkinfit models — lrtest.mkinfit","text":"Compare two mkinfit models based likelihood. two fitted mkinfit objects given arguments, checked fitted data. responsibility user make sure models nested, .e. one less degrees freedom can expressed fixing parameters .","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/lrtest.mkinfit.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Likelihood ratio test for mkinfit models — lrtest.mkinfit","text":"","code":"# S3 method for mkinfit lrtest(object, object_2 = NULL, ...) # S3 method for mmkin lrtest(object, ...)"},{"path":"https://pkgdown.jrwb.de/mkin/reference/lrtest.mkinfit.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Likelihood ratio test for mkinfit models — lrtest.mkinfit","text":"object mkinfit object, mmkin column object containing two fits data. object_2 Optionally, another mkinfit object fitted data. ... Argument mkinfit, passed update.mkinfit creating alternative fitted object.","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/lrtest.mkinfit.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Likelihood ratio test for mkinfit models — lrtest.mkinfit","text":"Alternatively, argument mkinfit can given passed update.mkinfit obtain alternative model. comparison made lrtest.default method lmtest package. model higher number fitted parameters (alternative hypothesis) listed first, model lower number fitted parameters (null hypothesis).","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/lrtest.mkinfit.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Likelihood ratio test for mkinfit models — lrtest.mkinfit","text":"","code":"# \\dontrun{ test_data <- subset(synthetic_data_for_UBA_2014[[12]]$data, name == \"parent\") sfo_fit <- mkinfit(\"SFO\", test_data, quiet = TRUE) dfop_fit <- mkinfit(\"DFOP\", test_data, quiet = TRUE) lrtest(dfop_fit, sfo_fit) #> Likelihood ratio test #> #> Model 1: DFOP with error model const #> Model 2: SFO with error model const #> #Df LogLik Df Chisq Pr(>Chisq) #> 1 5 -42.453 #> 2 3 -63.954 -2 43.002 4.594e-10 *** #> --- #> Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 lrtest(sfo_fit, dfop_fit) #> Likelihood ratio test #> #> Model 1: DFOP with error model const #> Model 2: SFO with error model const #> #Df LogLik Df Chisq Pr(>Chisq) #> 1 5 -42.453 #> 2 3 -63.954 -2 43.002 4.594e-10 *** #> --- #> Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 # The following two examples are commented out as they fail during # generation of the static help pages by pkgdown #lrtest(dfop_fit, error_model = \"tc\") #lrtest(dfop_fit, fixed_parms = c(k2 = 0)) # 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 #> Model 2: DFOP with error model const #> #Df LogLik Df Chisq Pr(>Chisq) #> 1 6 -34.587 #> 2 5 -42.453 -1 15.731 7.302e-05 *** #> --- #> Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 lrtest(dfop_fit, update(dfop_fit, fixed_parms = c(k2 = 0))) #> Likelihood ratio test #> #> Model 1: DFOP with error model const #> Model 2: DFOP with error model const and fixed parameter(s) k2 #> #Df LogLik Df Chisq Pr(>Chisq) #> 1 5 -42.453 #> 2 4 -57.340 -1 29.776 4.851e-08 *** #> --- #> Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 # }"},{"path":"https://pkgdown.jrwb.de/mkin/reference/max_twa_parent.html","id":null,"dir":"Reference","previous_headings":"","what":"Function to calculate maximum time weighted average concentrations from\nkinetic models fitted with mkinfit — max_twa_parent","title":"Function to calculate maximum time weighted average concentrations from\nkinetic models fitted with mkinfit — max_twa_parent","text":"function calculates maximum moving window time weighted average concentrations (TWAs) kinetic models fitted mkinfit. Currently, calculations parent implemented SFO, FOMC, DFOP HS models, using analytical formulas given PEC soil section FOCUS guidance.","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/max_twa_parent.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Function to calculate maximum time weighted average concentrations from\nkinetic models fitted with mkinfit — max_twa_parent","text":"","code":"max_twa_parent(fit, windows) max_twa_sfo(M0 = 1, k, t) max_twa_fomc(M0 = 1, alpha, beta, t) max_twa_dfop(M0 = 1, k1, k2, g, t) max_twa_hs(M0 = 1, k1, k2, tb, t)"},{"path":"https://pkgdown.jrwb.de/mkin/reference/max_twa_parent.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Function to calculate maximum time weighted average concentrations from\nkinetic models fitted with mkinfit — max_twa_parent","text":"fit object class mkinfit. windows width time windows TWAs calculated. M0 initial concentration maximum time weighted average decline curve calculated. default use value 1, means relative maximum time weighted average factor (f_twa) calculated. k rate constant case SFO kinetics. t width time window. alpha Parameter FOMC model. beta Parameter FOMC model. k1 first rate constant DFOP HS kinetics. k2 second rate constant DFOP HS kinetics. g Parameter DFOP model. tb Parameter HS model.","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/max_twa_parent.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Function to calculate maximum time weighted average concentrations from\nkinetic models fitted with mkinfit — max_twa_parent","text":"max_twa_parent, numeric vector, named using windows argument. functions, numeric vector length one (also known 'number').","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/max_twa_parent.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Function to calculate maximum time weighted average concentrations from\nkinetic models fitted with mkinfit — max_twa_parent","text":"FOCUS (2006) “Guidance Document Estimating Persistence Degradation Kinetics Environmental Fate Studies Pesticides EU Registration” Report FOCUS Work Group Degradation Kinetics, EC Document Reference Sanco/10058/2005 version 2.0, 434 pp, http://esdac.jrc.ec.europa.eu/projects/degradation-kinetics","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/max_twa_parent.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Function to calculate maximum time weighted average concentrations from\nkinetic models fitted with mkinfit — max_twa_parent","text":"Johannes Ranke","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/max_twa_parent.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Function to calculate maximum time weighted average concentrations from\nkinetic models fitted with mkinfit — max_twa_parent","text":"","code":"fit <- mkinfit(\"FOMC\", FOCUS_2006_C, quiet = TRUE) max_twa_parent(fit, c(7, 21)) #> 7 21 #> 34.71343 18.22124"},{"path":"https://pkgdown.jrwb.de/mkin/reference/mccall81_245T.html","id":null,"dir":"Reference","previous_headings":"","what":"Datasets on aerobic soil metabolism of 2,4,5-T in six soils — mccall81_245T","title":"Datasets on aerobic soil metabolism of 2,4,5-T in six soils — mccall81_245T","text":"Time course 2,4,5-trichlorophenoxyacetic acid, corresponding 2,4,5-trichlorophenol 2,4,5-trichloroanisole recovered diethylether extracts.","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/mccall81_245T.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Datasets on aerobic soil metabolism of 2,4,5-T in six soils — mccall81_245T","text":"","code":"mccall81_245T"},{"path":"https://pkgdown.jrwb.de/mkin/reference/mccall81_245T.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Datasets on aerobic soil metabolism of 2,4,5-T in six soils — mccall81_245T","text":"dataframe containing following variables. name name compound observed. Note T245 used acronym 2,4,5-T. T245 legitimate object name R, necessary specifying models using mkinmod. time numeric vector containing sampling times days treatment value numeric vector containing concentrations percent applied radioactivity soil factor containing name soil","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/mccall81_245T.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"Datasets on aerobic soil metabolism of 2,4,5-T in six soils — mccall81_245T","text":"McCall P, Vrona SA, Kelley SS (1981) Fate uniformly carbon-14 ring labelled 2,4,5-Trichlorophenoxyacetic acid 2,4-dichlorophenoxyacetic acid. J Agric Chem 29, 100-107 doi:10.1021/jf00103a026","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/mccall81_245T.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Datasets on aerobic soil metabolism of 2,4,5-T in six soils — mccall81_245T","text":"","code":"SFO_SFO_SFO <- mkinmod(T245 = list(type = \"SFO\", to = \"phenol\"), phenol = list(type = \"SFO\", to = \"anisole\"), anisole = list(type = \"SFO\")) #> Temporary DLL for differentials generated and loaded # \\dontrun{ fit.1 <- mkinfit(SFO_SFO_SFO, subset(mccall81_245T, soil == \"Commerce\"), quiet = TRUE) #> Warning: Observations with value of zero were removed from the data summary(fit.1)$bpar #> Estimate se_notrans t value Pr(>t) #> T245_0 1.038550e+02 2.1847074943 47.537272 4.472189e-18 #> k_T245 4.337042e-02 0.0018983965 22.845818 2.276911e-13 #> k_phenol 4.050581e-01 0.2986993738 1.356073 9.756990e-02 #> k_anisole 6.678742e-03 0.0008021439 8.326114 2.623177e-07 #> f_T245_to_phenol 6.227599e-01 0.3985340721 1.562626 6.949414e-02 #> f_phenol_to_anisole 1.000000e+00 0.6718440131 1.488441 7.867790e-02 #> sigma 2.514628e+00 0.4907558973 5.123989 6.233159e-05 #> Lower Upper #> T245_0 99.246061490 1.084640e+02 #> k_T245 0.039631621 4.746194e-02 #> k_phenol 0.218013879 7.525762e-01 #> k_anisole 0.005370739 8.305299e-03 #> f_T245_to_phenol 0.547559080 6.924813e-01 #> f_phenol_to_anisole 0.000000000 1.000000e+00 #> sigma 1.706607296 3.322649e+00 endpoints(fit.1) #> $ff #> T245_phenol T245_sink phenol_anisole phenol_sink #> 6.227599e-01 3.772401e-01 1.000000e+00 3.072478e-10 #> #> $distimes #> DT50 DT90 #> T245 15.982025 53.09114 #> phenol 1.711229 5.68458 #> anisole 103.784093 344.76329 #> # formation fraction from phenol to anisol is practically 1. As we cannot # fix formation fractions when using the ilr transformation, we can turn of # the sink in the model generation SFO_SFO_SFO_2 <- mkinmod(T245 = list(type = \"SFO\", to = \"phenol\"), phenol = list(type = \"SFO\", to = \"anisole\", sink = FALSE), anisole = list(type = \"SFO\")) #> Temporary DLL for differentials generated and loaded fit.2 <- mkinfit(SFO_SFO_SFO_2, subset(mccall81_245T, soil == \"Commerce\"), quiet = TRUE) #> Warning: Observations with value of zero were removed from the data summary(fit.2)$bpar #> Estimate se_notrans t value Pr(>t) Lower #> T245_0 1.038550e+02 2.1623653059 48.028439 4.993108e-19 99.271020328 #> k_T245 4.337042e-02 0.0018343666 23.643268 3.573556e-14 0.039650976 #> k_phenol 4.050582e-01 0.1177237651 3.440752 1.679255e-03 0.218746589 #> k_anisole 6.678742e-03 0.0006829745 9.778903 1.872894e-08 0.005377083 #> f_T245_to_phenol 6.227599e-01 0.0342197873 18.198824 2.039411e-12 0.547975634 #> sigma 2.514628e+00 0.3790944250 6.633250 2.875782e-06 1.710983655 #> Upper #> T245_0 108.43904079 #> k_T245 0.04743877 #> k_phenol 0.75005593 #> k_anisole 0.00829550 #> f_T245_to_phenol 0.69212307 #> sigma 3.31827222 endpoints(fit.1) #> $ff #> T245_phenol T245_sink phenol_anisole phenol_sink #> 6.227599e-01 3.772401e-01 1.000000e+00 3.072478e-10 #> #> $distimes #> DT50 DT90 #> T245 15.982025 53.09114 #> phenol 1.711229 5.68458 #> anisole 103.784093 344.76329 #> plot_sep(fit.2) # }"},{"path":"https://pkgdown.jrwb.de/mkin/reference/mean_degparms.html","id":null,"dir":"Reference","previous_headings":"","what":"Calculate mean degradation parameters for an mmkin row object — mean_degparms","title":"Calculate mean degradation parameters for an mmkin row object — mean_degparms","text":"Calculate mean degradation parameters mmkin row object","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/mean_degparms.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Calculate mean degradation parameters for an mmkin row object — mean_degparms","text":"","code":"mean_degparms( object, random = FALSE, test_log_parms = FALSE, conf.level = 0.6, default_log_parms = NA )"},{"path":"https://pkgdown.jrwb.de/mkin/reference/mean_degparms.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Calculate mean degradation parameters for an mmkin row object — mean_degparms","text":"object mmkin row object containing several fits model different datasets random list fixed random effects returned? test_log_parms TRUE, log parameters considered mean calculations untransformed counterparts (likely rate constants) pass t-test significant difference zero. conf.level Possibility adjust required confidence level parameter tested requested 'test_log_parms'. default_log_parms set numeric value, used default value tested log parameters failed t-test.","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/mean_degparms.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Calculate mean degradation parameters for an mmkin row object — mean_degparms","text":"random FALSE (default), named vector containing mean values fitted degradation model parameters. random TRUE, list fixed random effects, format required start argument nlme case single grouping variable ds.","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/mhmkin.html","id":null,"dir":"Reference","previous_headings":"","what":"Fit nonlinear mixed-effects models built from one or more kinetic\ndegradation models and one or more error models — mhmkin","title":"Fit nonlinear mixed-effects models built from one or more kinetic\ndegradation models and one or more error models — mhmkin","text":"name methods expresses (multiple) hierarchichal (also known multilevel) multicompartment kinetic models fitted. kinetic models nonlinear, can use various nonlinear mixed-effects model fitting functions.","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/mhmkin.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Fit nonlinear mixed-effects models built from one or more kinetic\ndegradation models and one or more error models — mhmkin","text":"","code":"mhmkin(objects, ...) # S3 method for mmkin mhmkin(objects, ...) # S3 method for list mhmkin( objects, backend = \"saemix\", algorithm = \"saem\", no_random_effect = NULL, ..., cores = if (Sys.info()[\"sysname\"] == \"Windows\") 1 else parallel::detectCores(), cluster = NULL ) # S3 method for mhmkin [(x, i, j, ..., drop = FALSE) # S3 method for mhmkin print(x, ...)"},{"path":"https://pkgdown.jrwb.de/mkin/reference/mhmkin.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Fit nonlinear mixed-effects models built from one or more kinetic\ndegradation models and one or more error models — mhmkin","text":"objects list mmkin objects containing fits degradation models data, using different error models. Alternatively, single mmkin object containing fits several degradation models data ... arguments passed nonlinear mixed-effects model fitting function. backend backend used fitting. Currently, saemix supported algorithm algorithm used fitting (currently used) no_random_effect Default NULL passed saem. character vector supplied, passed calls saem, exclude random effects matching parameters. Alternatively, list character vectors object class illparms.mhmkin can specified. dimensions return object current call , .e. number rows must match number degradation models mmkin object(s), number columns must match number error models used mmkin object(s). cores number cores used multicore processing. used cluster argument NULL. Windows machines, cores > 1 supported, need use cluster argument use multiple logical processors. Per default, cores detected parallel::detectCores() used, except Windows default 1. cluster cluster returned makeCluster used parallel execution. x mhmkin object. Row index selecting fits specific models j Column index selecting fits specific datasets drop FALSE, method always returns mhmkin object, otherwise either list fit objects single fit object.","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/mhmkin.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Fit nonlinear mixed-effects models built from one or more kinetic\ndegradation models and one or more error models — mhmkin","text":"two-dimensional array fit objects /try-errors can indexed using degradation model names first index (row index) error model names second index (column index), class attribute 'mhmkin'. object inheriting mhmkin.","code":""},{"path":[]},{"path":"https://pkgdown.jrwb.de/mkin/reference/mhmkin.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Fit nonlinear mixed-effects models built from one or more kinetic\ndegradation models and one or more error models — mhmkin","text":"Johannes Ranke","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/mhmkin.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Fit nonlinear mixed-effects models built from one or more kinetic\ndegradation models and one or more error models — mhmkin","text":"","code":"# \\dontrun{ # We start with separate evaluations of all the first six datasets with two # degradation models and two error models f_sep_const <- mmkin(c(\"SFO\", \"FOMC\"), ds_fomc[1:6], cores = 2, quiet = TRUE) f_sep_tc <- update(f_sep_const, error_model = \"tc\") # The mhmkin function sets up hierarchical degradation models aka # nonlinear mixed-effects models for all four combinations, specifying # uncorrelated random effects for all degradation parameters f_saem_1 <- mhmkin(list(f_sep_const, f_sep_tc), cores = 2) status(f_saem_1) #> error #> degradation const tc #> SFO OK OK #> FOMC OK OK #> #> OK: Fit terminated successfully # The 'illparms' function shows that in all hierarchical fits, at least # one random effect is ill-defined (the confidence interval for the # random effect expressed as standard deviation includes zero) illparms(f_saem_1) #> error #> degradation const tc #> SFO sd(parent_0) sd(parent_0) #> FOMC sd(log_beta) sd(parent_0), sd(log_beta) # Therefore we repeat the fits, excluding the ill-defined random effects f_saem_2 <- update(f_saem_1, no_random_effect = illparms(f_saem_1)) status(f_saem_2) #> error #> degradation const tc #> SFO OK OK #> FOMC OK OK #> #> OK: Fit terminated successfully illparms(f_saem_2) #> error #> degradation const tc #> SFO #> FOMC # Model comparisons show that FOMC with two-component error is preferable, # and confirms our reduction of the default parameter model anova(f_saem_1) #> Data: 95 observations of 1 variable(s) grouped in 6 datasets #> #> npar AIC BIC Lik #> SFO const 5 574.40 573.35 -282.20 #> SFO tc 6 543.72 542.47 -265.86 #> FOMC const 7 489.67 488.22 -237.84 #> FOMC tc 8 406.11 404.44 -195.05 anova(f_saem_2) #> Data: 95 observations of 1 variable(s) grouped in 6 datasets #> #> npar AIC BIC Lik #> SFO const 4 572.22 571.39 -282.11 #> SFO tc 5 541.63 540.59 -265.81 #> FOMC const 6 487.38 486.13 -237.69 #> FOMC tc 6 402.12 400.88 -195.06 # The convergence plot for the selected model looks fine saemix::plot(f_saem_2[[\"FOMC\", \"tc\"]]$so, plot.type = \"convergence\") # The plot of predictions versus data shows that we have a pretty data-rich # situation with homogeneous distribution of residuals, because we used the # same degradation model, error model and parameter distribution model that # was used in the data generation. plot(f_saem_2[[\"FOMC\", \"tc\"]]) # We can specify the same parameter model reductions manually no_ranef <- list(\"parent_0\", \"log_beta\", \"parent_0\", c(\"parent_0\", \"log_beta\")) dim(no_ranef) <- c(2, 2) f_saem_2m <- update(f_saem_1, no_random_effect = no_ranef) anova(f_saem_2m) #> Data: 95 observations of 1 variable(s) grouped in 6 datasets #> #> npar AIC BIC Lik #> SFO const 4 572.22 571.39 -282.11 #> SFO tc 5 541.63 540.59 -265.81 #> FOMC const 6 487.38 486.13 -237.69 #> FOMC tc 6 402.12 400.88 -195.06 # }"},{"path":"https://pkgdown.jrwb.de/mkin/reference/mixed.html","id":null,"dir":"Reference","previous_headings":"","what":"Create a mixed effects model from an mmkin row object — mixed","title":"Create a mixed effects model from an mmkin row object — mixed","text":"Create mixed effects model mmkin row object","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/mixed.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create a mixed effects model from an mmkin row object — mixed","text":"","code":"mixed(object, ...) # S3 method for mmkin mixed(object, method = c(\"none\"), ...) # S3 method for mixed.mmkin print(x, digits = max(3, getOption(\"digits\") - 3), ...)"},{"path":"https://pkgdown.jrwb.de/mkin/reference/mixed.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create a mixed effects model from an mmkin row object — mixed","text":"object mmkin row object ... Currently used method method used x mixed.mmkin object print digits Number digits use printing.","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/mixed.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create a mixed effects model from an mmkin row object — mixed","text":"object class 'mixed.mmkin' observed data single dataframe convenient plotting","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/mixed.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Create a mixed effects model from an mmkin row object — mixed","text":"","code":"sampling_times = c(0, 1, 3, 7, 14, 28, 60, 90, 120) n_biphasic <- 8 err_1 = list(const = 1, prop = 0.07) DFOP_SFO <- mkinmod( parent = mkinsub(\"DFOP\", \"m1\"), m1 = mkinsub(\"SFO\"), quiet = TRUE) set.seed(123456) log_sd <- 0.3 syn_biphasic_parms <- as.matrix(data.frame( k1 = rlnorm(n_biphasic, log(0.05), log_sd), k2 = rlnorm(n_biphasic, log(0.01), log_sd), g = plogis(rnorm(n_biphasic, 0, log_sd)), f_parent_to_m1 = plogis(rnorm(n_biphasic, 0, log_sd)), k_m1 = rlnorm(n_biphasic, log(0.002), log_sd))) ds_biphasic_mean <- lapply(1:n_biphasic, function(i) { mkinpredict(DFOP_SFO, syn_biphasic_parms[i, ], c(parent = 100, m1 = 0), sampling_times) } ) set.seed(123456L) ds_biphasic <- lapply(ds_biphasic_mean, function(ds) { add_err(ds, sdfunc = function(value) sqrt(err_1$const^2 + value^2 * err_1$prop^2), n = 1, secondary = \"m1\")[[1]] }) # \\dontrun{ f_mmkin <- mmkin(list(\"DFOP-SFO\" = DFOP_SFO), ds_biphasic, error_model = \"tc\", quiet = TRUE) f_mixed <- mixed(f_mmkin) print(f_mixed) #> Kinetic model fitted by nonlinear regression to each dataset #> Structural model: #> d_parent/dt = - ((k1 * g * exp(-k1 * time) + k2 * (1 - g) * exp(-k2 * #> time)) / (g * exp(-k1 * time) + (1 - g) * exp(-k2 * time))) #> * parent #> d_m1/dt = + f_parent_to_m1 * ((k1 * g * exp(-k1 * time) + k2 * (1 - g) #> * exp(-k2 * time)) / (g * exp(-k1 * time) + (1 - g) * #> exp(-k2 * time))) * parent - k_m1 * m1 #> #> Data: #> 271 observations of 2 variable(s) grouped in 8 datasets #> #> <mmkin> object #> Status of individual fits: #> #> dataset #> model 1 2 3 4 5 6 7 8 #> DFOP-SFO OK OK OK OK OK C OK OK #> #> C: Optimisation did not converge: #> iteration limit reached without convergence (10) #> OK: No warnings #> #> Mean fitted parameters: #> parent_0 log_k_m1 f_parent_qlogis log_k1 log_k2 #> 100.605312 -8.758664 -0.001917 -3.350887 -3.990017 #> g_qlogis #> -0.091167 plot(f_mixed) # }"},{"path":"https://pkgdown.jrwb.de/mkin/reference/mkin_long_to_wide.html","id":null,"dir":"Reference","previous_headings":"","what":"Convert a dataframe from long to wide format — mkin_long_to_wide","title":"Convert a dataframe from long to wide format — mkin_long_to_wide","text":"function takes dataframe long form, .e. row observed value, converts dataframe one independent variable several dependent variables columns.","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/mkin_long_to_wide.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convert a dataframe from long to wide format — mkin_long_to_wide","text":"","code":"mkin_long_to_wide(long_data, time = \"time\", outtime = \"time\")"},{"path":"https://pkgdown.jrwb.de/mkin/reference/mkin_long_to_wide.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convert a dataframe from long to wide format — mkin_long_to_wide","text":"long_data dataframe must contain one variable called \"time\" time values specified time argument, one column called \"name\" grouping observed values, finally one column observed values called \"value\". time name time variable long input data. outtime name time variable wide output data.","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/mkin_long_to_wide.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Convert a dataframe from long to wide format — mkin_long_to_wide","text":"Dataframe wide format.","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/mkin_long_to_wide.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Convert a dataframe from long to wide format — mkin_long_to_wide","text":"Johannes Ranke","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/mkin_long_to_wide.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Convert a dataframe from long to wide format — mkin_long_to_wide","text":"","code":"mkin_long_to_wide(FOCUS_2006_D) #> time parent m1 #> 1 0 99.46 0.00 #> 2 0 102.04 0.00 #> 3 1 93.50 4.84 #> 4 1 92.50 5.64 #> 5 3 63.23 12.91 #> 6 3 68.99 12.96 #> 7 7 52.32 22.97 #> 8 7 55.13 24.47 #> 9 14 27.27 41.69 #> 10 14 26.64 33.21 #> 11 21 11.50 44.37 #> 12 21 11.64 46.44 #> 13 35 2.85 41.22 #> 14 35 2.91 37.95 #> 15 50 0.69 41.19 #> 16 50 0.63 40.01 #> 17 75 0.05 40.09 #> 18 75 0.06 33.85 #> 19 100 NA 31.04 #> 20 100 NA 33.13 #> 21 120 NA 25.15 #> 22 120 NA 33.31"},{"path":"https://pkgdown.jrwb.de/mkin/reference/mkin_wide_to_long.html","id":null,"dir":"Reference","previous_headings":"","what":"Convert a dataframe with observations over time into long format — mkin_wide_to_long","title":"Convert a dataframe with observations over time into long format — mkin_wide_to_long","text":"function simply takes dataframe one independent variable several dependent variable converts long form required mkinfit.","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/mkin_wide_to_long.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convert a dataframe with observations over time into long format — mkin_wide_to_long","text":"","code":"mkin_wide_to_long(wide_data, time = \"t\")"},{"path":"https://pkgdown.jrwb.de/mkin/reference/mkin_wide_to_long.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convert a dataframe with observations over time into long format — mkin_wide_to_long","text":"wide_data dataframe must contain one variable time values specified time argument usually one column observed values. time name time variable.","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/mkin_wide_to_long.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Convert a dataframe with observations over time into long format — mkin_wide_to_long","text":"Dataframe long format needed mkinfit.","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/mkin_wide_to_long.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Convert a dataframe with observations over time into long format — mkin_wide_to_long","text":"Johannes Ranke","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/mkin_wide_to_long.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Convert a dataframe with observations over time into long format — mkin_wide_to_long","text":"","code":"wide <- data.frame(t = c(1,2,3), x = c(1,4,7), y = c(3,4,5)) mkin_wide_to_long(wide) #> name time value #> 1 x 1 1 #> 2 x 2 4 #> 3 x 3 7 #> 4 y 1 3 #> 5 y 2 4 #> 6 y 3 5"},{"path":"https://pkgdown.jrwb.de/mkin/reference/mkinds.html","id":null,"dir":"Reference","previous_headings":"","what":"A dataset class for mkin — mkinds","title":"A dataset class for mkin — mkinds","text":"moment dataset class hardly used mkin. example, mkinfit take mkinds datasets argument, works dataframes contained data field mkinds objects. datasets provided package come mkinds objects nevertheless.","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/mkinds.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"A dataset class for mkin — mkinds","text":"","code":"# S3 method for mkinds print(x, data = FALSE, ...)"},{"path":"https://pkgdown.jrwb.de/mkin/reference/mkinds.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"A dataset class for mkin — mkinds","text":"x mkinds object. data data printed? ... used.","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/mkinds.html","id":"public-fields","dir":"Reference","previous_headings":"","what":"Public fields","title":"A dataset class for mkin — mkinds","text":"title full title dataset sampling_times sampling times time_unit time unit observed Names observed variables unit unit observations replicates maximum number replicates per sampling time data data frame least columns name, time value order compatible mkinfit","code":""},{"path":[]},{"path":"https://pkgdown.jrwb.de/mkin/reference/mkinds.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"A dataset class for mkin — mkinds","text":"mkinds$new() mkinds$clone()","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/mkinds.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"A dataset class for mkin — mkinds","text":"Create new mkinds object","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/mkinds.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"A dataset class for mkin — mkinds","text":"","code":"mkinds$new(title = \"\", data, time_unit = NA, unit = NA)"},{"path":"https://pkgdown.jrwb.de/mkin/reference/mkinds.html","id":"arguments-1","dir":"Reference","previous_headings":"","what":"Arguments","title":"A dataset class for mkin — mkinds","text":"title dataset title data data time_unit time unit unit unit observations","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/mkinds.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"A dataset class for mkin — mkinds","text":"objects class cloneable method.","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/mkinds.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"A dataset class for mkin — mkinds","text":"","code":"mkinds$clone(deep = FALSE)"},{"path":"https://pkgdown.jrwb.de/mkin/reference/mkinds.html","id":"arguments-2","dir":"Reference","previous_headings":"","what":"Arguments","title":"A dataset class for mkin — mkinds","text":"deep Whether make deep clone.","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/mkinds.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"A dataset class for mkin — mkinds","text":"","code":"mds <- mkinds$new(\"FOCUS A\", FOCUS_2006_A) print(mds) #> <mkinds> with $title: FOCUS A #> Observed compounds $observed: parent #> Sampling times $sampling_times: #> 0, 3, 7, 14, 30, 62, 90, 118 #> With a maximum of 1 replicates"},{"path":"https://pkgdown.jrwb.de/mkin/reference/mkindsg.html","id":null,"dir":"Reference","previous_headings":"","what":"A class for dataset groups for mkin — mkindsg","title":"A class for dataset groups for mkin — mkindsg","text":"container working datasets share least one compound, combined evaluations desirable. Time normalisation factors initialised value 1 dataset data supplied.","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/mkindsg.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"A class for dataset groups for mkin — mkindsg","text":"","code":"# S3 method for mkindsg print(x, data = FALSE, verbose = data, ...)"},{"path":"https://pkgdown.jrwb.de/mkin/reference/mkindsg.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"A class for dataset groups for mkin — mkindsg","text":"x mkindsg object. data mkinds objects printed data? verbose mkinds objects printed? ... used.","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/mkindsg.html","id":"public-fields","dir":"Reference","previous_headings":"","what":"Public fields","title":"A class for dataset groups for mkin — mkindsg","text":"title title dataset group ds list mkinds objects observed_n Occurrence counts compounds datasets f_time_norm Time normalisation factors meta data frame row dataset, containing additional information form categorical data (factors) numerical data (e.g. temperature, moisture, covariates like soil pH).","code":""},{"path":[]},{"path":"https://pkgdown.jrwb.de/mkin/reference/mkindsg.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"A class for dataset groups for mkin — mkindsg","text":"mkindsg$new() mkindsg$clone()","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/mkindsg.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"A class for dataset groups for mkin — mkindsg","text":"Create new mkindsg object","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/mkindsg.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"A class for dataset groups for mkin — mkindsg","text":"","code":"mkindsg$new(title = \"\", ds, f_time_norm = rep(1, length(ds)), meta)"},{"path":"https://pkgdown.jrwb.de/mkin/reference/mkindsg.html","id":"arguments-1","dir":"Reference","previous_headings":"","what":"Arguments","title":"A class for dataset groups for mkin — mkindsg","text":"title title ds list mkinds objects f_time_norm Time normalisation factors meta meta data","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/mkindsg.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"A class for dataset groups for mkin — mkindsg","text":"objects class cloneable method.","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/mkindsg.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"A class for dataset groups for mkin — mkindsg","text":"","code":"mkindsg$clone(deep = FALSE)"},{"path":"https://pkgdown.jrwb.de/mkin/reference/mkindsg.html","id":"arguments-2","dir":"Reference","previous_headings":"","what":"Arguments","title":"A class for dataset groups for mkin — mkindsg","text":"deep Whether make deep clone.","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/mkindsg.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"A class for dataset groups for mkin — mkindsg","text":"","code":"mdsg <- mkindsg$new(\"Experimental X\", experimental_data_for_UBA_2019[6:10]) print(mdsg) #> <mkindsg> holding 5 mkinds objects #> Title $title: Experimental X #> Occurrence of observed compounds $observed_n: #> parent A1 #> 5 5 print(mdsg, verbose = TRUE) #> <mkindsg> holding 5 mkinds objects #> Title $title: Experimental X #> Occurrence of observed compounds $observed_n: #> parent A1 #> 5 5 #> #> Datasets $ds: #> <mkinds> with $title: Soil 6 #> Observed compounds $observed: parent, A1 #> Sampling times $sampling_times: #> 0, 3, 6, 10, 20, 34, 55, 90, 112, 132 #> With a maximum of 2 replicates #> Time unit: days #> Observation unit: \\%AR #> #> <mkinds> with $title: Soil 7 #> Observed compounds $observed: parent, A1 #> Sampling times $sampling_times: #> 0, 3, 7, 14, 30, 60, 90, 120, 180 #> With a maximum of 2 replicates #> Time unit: days #> Observation unit: \\%AR #> #> <mkinds> with $title: Soil 8 #> Observed compounds $observed: parent, A1 #> Sampling times $sampling_times: #> 0, 1, 3, 8, 14, 27, 48, 70 #> With a maximum of 2 replicates #> Time unit: days #> Observation unit: \\%AR #> #> <mkinds> with $title: Soil 9 #> Observed compounds $observed: parent, A1 #> Sampling times $sampling_times: #> 0, 1, 3, 8, 14, 27, 48, 70, 91, 120 #> With a maximum of 2 replicates #> Time unit: days #> Observation unit: \\%AR #> #> <mkinds> with $title: Soil 10 #> Observed compounds $observed: parent, A1 #> Sampling times $sampling_times: #> 0, 8, 14, 21, 41, 63, 91, 120 #> With a maximum of 2 replicates #> Time unit: days #> Observation unit: \\%AR print(mdsg, verbose = TRUE, data = TRUE) #> <mkindsg> holding 5 mkinds objects #> Title $title: Experimental X #> Occurrence of observed compounds $observed_n: #> parent A1 #> 5 5 #> #> Datasets $ds: #> <mkinds> with $title: Soil 6 #> Observed compounds $observed: parent, A1 #> Sampling times $sampling_times: #> 0, 3, 6, 10, 20, 34, 55, 90, 112, 132 #> With a maximum of 2 replicates #> Time unit: days #> Observation unit: \\%AR #> time parent A1 #> 1 0 97.2 NA #> 2 0 96.4 NA #> 3 3 71.1 4.3 #> 4 3 69.2 4.6 #> 5 6 58.1 7.0 #> 6 6 56.6 7.2 #> 7 10 44.4 8.2 #> 8 10 43.4 8.0 #> 9 20 33.3 11.0 #> 10 20 29.2 13.7 #> 11 34 17.6 11.5 #> 12 34 18.0 12.7 #> 13 55 10.5 14.9 #> 14 55 9.3 14.5 #> 15 90 4.5 12.1 #> 16 90 4.7 12.3 #> 17 112 3.0 9.9 #> 18 112 3.4 10.2 #> 19 132 2.3 8.8 #> 20 132 2.7 7.8 #> #> <mkinds> with $title: Soil 7 #> Observed compounds $observed: parent, A1 #> Sampling times $sampling_times: #> 0, 3, 7, 14, 30, 60, 90, 120, 180 #> With a maximum of 2 replicates #> Time unit: days #> Observation unit: \\%AR #> time parent A1 #> 1 0 93.6 NA #> 2 0 92.3 NA #> 3 3 87.0 3.9 #> 4 3 82.2 3.1 #> 5 7 74.0 6.9 #> 6 7 73.9 6.6 #> 7 14 64.2 10.4 #> 8 14 69.5 8.3 #> 9 30 54.0 14.4 #> 10 30 54.6 13.7 #> 11 60 41.1 22.1 #> 12 60 38.4 22.3 #> 13 90 32.5 27.5 #> 14 90 35.5 25.4 #> 15 120 28.1 28.0 #> 16 120 29.0 26.6 #> 17 180 26.5 25.8 #> 18 180 27.6 25.3 #> #> <mkinds> with $title: Soil 8 #> Observed compounds $observed: parent, A1 #> Sampling times $sampling_times: #> 0, 1, 3, 8, 14, 27, 48, 70 #> With a maximum of 2 replicates #> Time unit: days #> Observation unit: \\%AR #> time parent A1 #> 1 0 91.9 NA #> 2 0 90.8 NA #> 3 1 64.9 9.6 #> 4 1 66.2 7.7 #> 5 3 43.5 15.0 #> 6 3 44.1 15.1 #> 7 8 18.3 21.2 #> 8 8 18.1 21.1 #> 9 14 10.2 19.7 #> 10 14 10.8 18.9 #> 11 27 4.9 17.5 #> 12 27 3.3 15.9 #> 13 48 1.6 9.5 #> 14 48 1.5 9.8 #> 15 70 1.1 6.2 #> 16 70 0.9 6.1 #> #> <mkinds> with $title: Soil 9 #> Observed compounds $observed: parent, A1 #> Sampling times $sampling_times: #> 0, 1, 3, 8, 14, 27, 48, 70, 91, 120 #> With a maximum of 2 replicates #> Time unit: days #> Observation unit: \\%AR #> time parent A1 #> 1 0 99.8 NA #> 2 0 98.3 NA #> 3 1 77.1 4.2 #> 4 1 77.2 3.9 #> 5 3 59.0 7.4 #> 6 3 58.1 7.9 #> 7 8 27.4 14.5 #> 8 8 29.2 13.7 #> 9 14 19.1 14.2 #> 10 14 29.6 12.2 #> 11 27 10.1 13.7 #> 12 27 18.2 13.2 #> 13 48 4.5 13.6 #> 14 48 9.1 15.4 #> 15 70 2.3 10.4 #> 16 70 2.9 11.6 #> 17 91 2.0 10.0 #> 18 91 1.8 9.5 #> 19 120 2.0 9.1 #> 20 120 2.2 9.0 #> #> <mkinds> with $title: Soil 10 #> Observed compounds $observed: parent, A1 #> Sampling times $sampling_times: #> 0, 8, 14, 21, 41, 63, 91, 120 #> With a maximum of 2 replicates #> Time unit: days #> Observation unit: \\%AR #> time parent A1 #> 1 0 96.1 NA #> 2 0 94.3 NA #> 3 8 73.9 3.3 #> 4 8 73.9 3.4 #> 5 14 69.4 3.9 #> 6 14 73.1 2.9 #> 7 21 65.6 6.4 #> 8 21 65.3 7.2 #> 9 41 55.9 9.1 #> 10 41 54.4 8.5 #> 11 63 47.0 11.7 #> 12 63 49.3 12.0 #> 13 91 44.7 13.3 #> 14 91 46.7 13.2 #> 15 120 42.1 14.3 #> 16 120 41.3 12.1"},{"path":"https://pkgdown.jrwb.de/mkin/reference/mkinerrmin.html","id":null,"dir":"Reference","previous_headings":"","what":"Calculate the minimum error to assume in order to pass the variance test — mkinerrmin","title":"Calculate the minimum error to assume in order to pass the variance test — mkinerrmin","text":"function finds smallest relative error still resulting passing chi-squared test defined FOCUS kinetics report 2006.","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/mkinerrmin.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Calculate the minimum error to assume in order to pass the variance test — mkinerrmin","text":"","code":"mkinerrmin(fit, alpha = 0.05)"},{"path":"https://pkgdown.jrwb.de/mkin/reference/mkinerrmin.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Calculate the minimum error to assume in order to pass the variance test — mkinerrmin","text":"fit object class mkinfit. alpha confidence level chosen chi-squared test.","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/mkinerrmin.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Calculate the minimum error to assume in order to pass the variance test — mkinerrmin","text":"dataframe following components: err.min relative error, expressed fraction. n.optim number optimised parameters attributed data series. df number remaining degrees freedom chi2 error level calculations. Note mean values used chi2 statistic therefore every time point observed values series counts one time. dataframe one row total dataset one row observed state variable model.","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/mkinerrmin.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Calculate the minimum error to assume in order to pass the variance test — mkinerrmin","text":"function used internally summary.mkinfit.","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/mkinerrmin.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Calculate the minimum error to assume in order to pass the variance test — mkinerrmin","text":"FOCUS (2006) “Guidance Document Estimating Persistence Degradation Kinetics Environmental Fate Studies Pesticides EU Registration” Report FOCUS Work Group Degradation Kinetics, EC Document Reference Sanco/10058/2005 version 2.0, 434 pp, http://esdac.jrc.ec.europa.eu/projects/degradation-kinetics","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/mkinerrmin.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Calculate the minimum error to assume in order to pass the variance test — mkinerrmin","text":"","code":"SFO_SFO = mkinmod(parent = mkinsub(\"SFO\", to = \"m1\"), m1 = mkinsub(\"SFO\"), use_of_ff = \"max\") #> Temporary DLL for differentials generated and loaded fit_FOCUS_D = mkinfit(SFO_SFO, FOCUS_2006_D, quiet = TRUE) #> Warning: Observations with value of zero were removed from the data round(mkinerrmin(fit_FOCUS_D), 4) #> err.min n.optim df #> All data 0.0640 4 15 #> parent 0.0646 2 7 #> m1 0.0469 2 8 # \\dontrun{ fit_FOCUS_E = mkinfit(SFO_SFO, FOCUS_2006_E, quiet = TRUE) round(mkinerrmin(fit_FOCUS_E), 4) #> err.min n.optim df #> All data 0.1544 4 13 #> parent 0.1659 2 7 #> m1 0.1095 2 6 # }"},{"path":"https://pkgdown.jrwb.de/mkin/reference/mkinerrplot.html","id":null,"dir":"Reference","previous_headings":"","what":"Function to plot squared residuals and the error model for an mkin object — mkinerrplot","title":"Function to plot squared residuals and the error model for an mkin object — mkinerrplot","text":"function plots squared residuals specified subset observed variables mkinfit object. addition, one dashed line(s) show fitted error model. combined plot fitted model error model plot can obtained plot.mkinfit using argument show_errplot = TRUE.","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/mkinerrplot.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Function to plot squared residuals and the error model for an mkin object — mkinerrplot","text":"","code":"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, ... )"},{"path":"https://pkgdown.jrwb.de/mkin/reference/mkinerrplot.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Function to plot squared residuals and the error model for an mkin object — mkinerrplot","text":"object fit represented mkinfit object. obs_vars character vector names observed variables residuals plotted. Defaults observed variables model xlim plot range x direction. xlab Label x axis. ylab Label y axis. maxy Maximum value residuals. used scaling y axis defaults \"auto\". legend legend plotted? lpos legend placed? Default \"topright\". passed legend. col_obs Colors observed variables. pch_obs Symbols used observed variables. frame frame drawn around plots? ... arguments passed plot.","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/mkinerrplot.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Function to plot squared residuals and the error model for an mkin object — mkinerrplot","text":"Nothing returned function, called side effect, namely produce plot.","code":""},{"path":[]},{"path":"https://pkgdown.jrwb.de/mkin/reference/mkinerrplot.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Function to plot squared residuals and the error model for an mkin object — mkinerrplot","text":"Johannes Ranke","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/mkinerrplot.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Function to plot squared residuals and the error model for an mkin object — mkinerrplot","text":"","code":"# \\dontrun{ model <- mkinmod(parent = mkinsub(\"SFO\", \"m1\"), m1 = mkinsub(\"SFO\")) #> Temporary DLL for differentials generated and loaded fit <- mkinfit(model, FOCUS_2006_D, error_model = \"tc\", quiet = TRUE) #> Warning: Observations with value of zero were removed from the data mkinerrplot(fit) # }"},{"path":"https://pkgdown.jrwb.de/mkin/reference/mkinfit.html","id":null,"dir":"Reference","previous_headings":"","what":"Fit a kinetic model to data with one or more state variables — mkinfit","title":"Fit a kinetic model to data with one or more state variables — mkinfit","text":"function maximises likelihood observed data using Port algorithm stats::nlminb(), specified initial fixed parameters starting values. step optimisation, kinetic model solved using function mkinpredict(), except analytical solution implemented, case model solved using degradation function mkinmod object. parameters selected error model fitted simultaneously degradation model parameters, arguments likelihood function.","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/mkinfit.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Fit a kinetic model to data with one or more state variables — mkinfit","text":"","code":"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\", control = list(eval.max = 300, iter.max = 200), transform_rates = TRUE, transform_fractions = TRUE, quiet = FALSE, atol = 1e-08, rtol = 1e-10, 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, test_residuals = FALSE, ... )"},{"path":"https://pkgdown.jrwb.de/mkin/reference/mkinfit.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Fit a kinetic model to data with one or more state variables — mkinfit","text":"mkinmod list class mkinmod, containing kinetic model fitted data, one shorthand names (\"SFO\", \"FOMC\", \"DFOP\", \"HS\", \"SFORB\", \"IORE\"). shorthand name given, parent degradation model generated variable highest value observed. observed dataframe observed data. first column called \"name\" must contain name observed variable data point. second column must contain times observation, named \"time\". third column must named \"value\" contain observed values. Zero values \"value\" column removed, warning, order avoid problems fitting two-component error model. expected problem, general, values zero observed degradation data, lower limit detection. parms.ini named vector initial values parameters, including parameters optimised potentially also fixed parameters indicated fixed_parms. set \"auto\", initial values rate constants set default values. Using parameter names model gives error. possible specify subset parameters model needs. can use parameter lists \"bparms.ode\" previously fitted model, contains differential equation parameters model. works nicely models nested. example given . state.ini named vector initial values state variables model. case observed variables represented one model variable, names differ names observed variables (see map component mkinmod). default set initial value first model variable mean time zero values variable maximum observed value, others 0. variable time zero observations, initial value set 100. err.ini named vector initial values error model parameters optimised. set \"auto\", initial values set default values. Otherwise, inital values error model parameters must given. fixed_parms names parameters optimised rather kept values specified parms.ini. Alternatively, named numeric vector parameters fixed, regardless values parms.ini. fixed_initials names model variables initial state time 0 excluded optimisation. Defaults state variables except first one. from_max_mean set TRUE, model one observed variable, data time maximum observed value (averaging sampling time) discarded, time subtracted remaining time values, time maximum observed mean value new time zero. solution_type set \"eigen\", solution system differential equations based spectral decomposition coefficient matrix cases possible. set \"deSolve\", numerical ode solver package deSolve used. set \"analytical\", analytical solution model used. implemented relatively simple degradation models. default \"auto\", uses \"analytical\" possible, otherwise \"deSolve\" compiler present, \"eigen\" compiler present model can expressed using eigenvalues eigenvectors. method.ode solution method passed via mkinpredict() deSolve::ode() case solution type \"deSolve\". default \"lsoda\" performant, sometimes fails converge. use_compiled set FALSE, compiled version mkinmod model used calls mkinpredict() even compiled version present. control list control arguments passed stats::nlminb(). transform_rates Boolean specifying kinetic rate constants transformed model specification used fitting better compliance assumption normal distribution estimator. TRUE, also alpha beta parameters FOMC model log-transformed, well k1 k2 rate constants DFOP HS models break point tb HS model. FALSE, zero used lower bound rates optimisation. transform_fractions Boolean specifying formation fractions transformed model specification used fitting better compliance assumption normal distribution estimator. default (TRUE) transformations. TRUE, g parameter DFOP model also transformed. Transformations described transform_odeparms. quiet Suppress printing current value negative log-likelihood improvement? atol Absolute error tolerance, passed deSolve::ode(). Default 1e-8, lower default deSolve::lsoda() function used per default. rtol Absolute error tolerance, passed deSolve::ode(). Default 1e-10, much lower deSolve::lsoda(). error_model error model \"const\", constant standard deviation assumed. error model \"obs\", observed variable assumed variance. error model \"tc\" (two-component error model), two component error model similar one described Rocke Lorenzato (1995) used setting likelihood function. Note model deviates model Rocke Lorenzato, model implies errors follow lognormal distribution large values, normal distribution assumed method. error_model_algorithm \"auto\", selected algorithm depends error model. error model \"const\", unweighted nonlinear least squares fitting (\"OLS\") selected. error model \"obs\", \"tc\", \"d_3\" algorithm selected. algorithm \"d_3\" directly minimize negative log-likelihood independently also use three step algorithm described . fit higher likelihood returned. algorithm \"direct\" directly minimize negative log-likelihood. algorithm \"twostep\" minimize negative log-likelihood initial unweighted least squares optimisation step. algorithm \"threestep\" starts unweighted least squares, optimizes error model using degradation model parameters found, minimizes negative log-likelihood free degradation error model parameters. algorithm \"fourstep\" starts unweighted least squares, optimizes error model using degradation model parameters found, optimizes degradation model fixed error model parameters, finally minimizes negative log-likelihood free degradation error model parameters. algorithm \"IRLS\" (Iteratively Reweighted Least Squares) starts unweighted least squares, iterates optimization error model parameters subsequent optimization degradation model using error model parameters, error model parameters converge. reweight.tol Tolerance convergence criterion calculated error model parameters IRLS fits. reweight.max.iter Maximum number iterations IRLS fits. trace_parms trace parameter values listed? test_residuals residuals tested normal distribution? ... arguments passed deSolve::ode().","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/mkinfit.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Fit a kinetic model to data with one or more state variables — mkinfit","text":"list \"mkinfit\" class attribute.","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/mkinfit.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Fit a kinetic model to data with one or more state variables — mkinfit","text":"Per default, parameters kinetic models internally transformed order better satisfy assumption normal distribution estimators.","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/mkinfit.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Fit a kinetic model to data with one or more state variables — mkinfit","text":"using \"IORE\" submodel metabolites, fitting \"transform_rates = TRUE\" (default) often leads failures numerical ODE solver. situation may help switch internal rate transformation.","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/mkinfit.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Fit a kinetic model to data with one or more state variables — mkinfit","text":"Rocke DM Lorenzato S (1995) two-component model measurement error analytical chemistry. Technometrics 37(2), 176-184. Ranke J Meinecke S (2019) Error Models Kinetic Evaluation Chemical Degradation Data. Environments 6(12) 124 doi:10.3390/environments6120124 .","code":""},{"path":[]},{"path":"https://pkgdown.jrwb.de/mkin/reference/mkinfit.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Fit a kinetic model to data with one or more state variables — mkinfit","text":"Johannes Ranke","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/mkinfit.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Fit a kinetic model to data with one or more state variables — mkinfit","text":"","code":"# Use shorthand notation for parent only degradation fit <- mkinfit(\"FOMC\", FOCUS_2006_C, quiet = TRUE) summary(fit) #> mkin version used for fitting: 1.2.6 #> R version used for fitting: 4.3.2 #> Date of fit: Thu Nov 16 04:15:31 2023 #> Date of summary: Thu Nov 16 04:15:31 2023 #> #> 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.014 s #> #> Error model: Constant variance #> #> Error model algorithm: OLS #> #> Starting values for parameters to be optimised: #> value type #> parent_0 85.1 state #> alpha 1.0 deparm #> beta 10.0 deparm #> #> Starting values for the transformed parameters actually optimised: #> value lower upper #> parent_0 85.100000 -Inf Inf #> log_alpha 0.000000 -Inf Inf #> log_beta 2.302585 -Inf Inf #> #> Fixed parameter values: #> None #> #> Results: #> #> AIC BIC logLik #> 44.68652 45.47542 -18.34326 #> #> Optimised, transformed parameters with symmetric confidence intervals: #> Estimate Std. Error Lower Upper #> parent_0 85.87000 1.8070 81.23000 90.5200 #> log_alpha 0.05192 0.1353 -0.29580 0.3996 #> log_beta 0.65100 0.2287 0.06315 1.2390 #> sigma 1.85700 0.4378 0.73200 2.9830 #> #> Parameter correlation: #> parent_0 log_alpha log_beta sigma #> parent_0 1.000e+00 -1.565e-01 -3.142e-01 4.681e-08 #> log_alpha -1.565e-01 1.000e+00 9.564e-01 1.013e-07 #> log_beta -3.142e-01 9.564e-01 1.000e+00 8.637e-08 #> sigma 4.681e-08 1.013e-07 8.637e-08 1.000e+00 #> #> 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 85.870 47.530 3.893e-08 81.2300 90.520 #> alpha 1.053 7.393 3.562e-04 0.7439 1.491 #> beta 1.917 4.373 3.601e-03 1.0650 3.451 #> sigma 1.857 4.243 4.074e-03 0.7320 2.983 #> #> FOCUS Chi2 error levels in percent: #> err.min n.optim df #> All data 6.657 3 6 #> parent 6.657 3 6 #> #> Estimated disappearance times: #> DT50 DT90 DT50back #> parent 1.785 15.15 4.56 #> #> Data: #> time variable observed predicted residual #> 0 parent 85.1 85.875 -0.7749 #> 1 parent 57.9 55.191 2.7091 #> 3 parent 29.9 31.845 -1.9452 #> 7 parent 14.6 17.012 -2.4124 #> 14 parent 9.7 9.241 0.4590 #> 28 parent 6.6 4.754 1.8460 #> 63 parent 4.0 2.102 1.8977 #> 91 parent 3.9 1.441 2.4590 #> 119 parent 0.6 1.092 -0.4919 # One parent compound, one metabolite, both single first order. # We remove zero values from FOCUS dataset D in order to avoid warnings 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\")) #> 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) plot_sep(fit) # As lower parent values appear to have lower variance, we try an alternative error model fit.tc <- mkinfit(SFO_SFO, FOCUS_D, quiet = TRUE, error_model = \"tc\") # This avoids the warning, and the likelihood ratio test confirms it is preferable lrtest(fit.tc, fit) #> Likelihood ratio test #> #> Model 1: SFO_SFO with error model tc and fixed parameter(s) m1_0 #> Model 2: SFO_SFO with error model const and fixed parameter(s) m1_0 #> #Df LogLik Df Chisq Pr(>Chisq) #> 1 6 -64.983 #> 2 5 -97.224 -1 64.483 9.737e-16 *** #> --- #> Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 # We can also allow for different variances of parent and metabolite as error model fit.obs <- mkinfit(SFO_SFO, FOCUS_D, quiet = TRUE, error_model = \"obs\") # The two-component error model has significantly higher likelihood lrtest(fit.obs, fit.tc) #> Likelihood ratio test #> #> Model 1: SFO_SFO with error model tc and fixed parameter(s) m1_0 #> Model 2: SFO_SFO with error model obs and fixed parameter(s) m1_0 #> #Df LogLik Df Chisq Pr(>Chisq) #> 1 6 -64.983 #> 2 6 -96.936 0 63.907 < 2.2e-16 *** #> --- #> Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 parms(fit.tc) #> 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.049883e-03 #> rsd_high #> 7.928118e-02 endpoints(fit.tc) #> $ff #> parent_m1 parent_sink #> 0.5083933 0.4916067 #> #> $distimes #> DT50 DT90 #> parent 6.89313 22.89848 #> m1 134.15634 445.65771 #> # We can show a quick (only one replication) benchmark for this case, as we # have several alternative solution methods for the model. We skip # uncompiled deSolve, as it is so slow. More benchmarks are found in the # benchmark vignette # \\dontrun{ if(require(rbenchmark)) { benchmark(replications = 1, order = \"relative\", columns = c(\"test\", \"relative\", \"elapsed\"), deSolve_compiled = mkinfit(SFO_SFO, FOCUS_D, quiet = TRUE, error_model = \"tc\", solution_type = \"deSolve\", use_compiled = TRUE), eigen = mkinfit(SFO_SFO, FOCUS_D, quiet = TRUE, error_model = \"tc\", solution_type = \"eigen\"), analytical = mkinfit(SFO_SFO, FOCUS_D, quiet = TRUE, error_model = \"tc\", solution_type = \"analytical\")) } #> test relative elapsed #> 3 analytical 1.000 0.223 #> 2 eigen 1.973 0.440 #> 1 deSolve_compiled 2.072 0.462 # } # Use stepwise fitting, using optimised parameters from parent only fit, FOMC-SFO # \\dontrun{ FOMC_SFO <- mkinmod( parent = mkinsub(\"FOMC\", \"m1\"), m1 = mkinsub(\"SFO\")) #> 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 lrtest(fit.tc, fit.FOMC_SFO.tc) #> 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 # and beta indicate overparameterisation summary(fit.FOMC_SFO.tc, data = FALSE) #> Warning: NaNs produced #> Warning: NaNs produced #> Warning: diag(.) had 0 or NA entries; non-finite result is doubtful #> mkin version used for fitting: 1.2.6 #> R version used for fitting: 4.3.2 #> Date of fit: Thu Nov 16 04:15:35 2023 #> Date of summary: Thu Nov 16 04:15:35 2023 #> #> Equations: #> d_parent/dt = - (alpha/beta) * 1/((time/beta) + 1) * parent #> d_m1/dt = + f_parent_to_m1 * (alpha/beta) * 1/((time/beta) + 1) * #> parent - k_m1 * m1 #> #> Model predictions using solution type deSolve #> #> Fitted using 4062 model solutions performed in 0.768 s #> #> Error model: Two-component variance function #> #> Error model algorithm: d_3 #> Direct fitting and three-step fitting yield approximately the same likelihood #> #> Starting values for parameters to be optimised: #> value type #> parent_0 100.75 state #> alpha 1.00 deparm #> beta 10.00 deparm #> k_m1 0.10 deparm #> f_parent_to_m1 0.50 deparm #> sigma_low 0.10 error #> 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_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 #> #> Results: #> #> AIC BIC logLik #> 143.658 155.1211 -64.82902 #> #> Optimised, transformed parameters with symmetric confidence intervals: #> Estimate Std. Error Lower Upper #> parent_0 101.600000 2.6400000 96.240000 107.000000 #> log_k_m1 -5.284000 0.0929100 -5.474000 -5.095000 #> f_parent_qlogis 0.001426 0.0766900 -0.155000 0.157800 #> log_alpha 5.522000 0.0077320 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 #> #> Parameter correlation: #> parent_0 log_k_m1 f_parent_qlogis log_alpha log_beta #> parent_0 1.000000 -0.095161 -0.76675 0.70542 NaN #> log_k_m1 -0.095161 1.000000 0.51429 -0.14382 NaN #> f_parent_qlogis -0.766750 0.514286 1.00000 -0.61393 NaN #> log_alpha 0.705417 -0.143821 -0.61393 1.00000 NaN #> log_beta NaN NaN NaN NaN 1 #> sigma_low 0.016086 0.001583 0.01547 5.87036 NaN #> rsd_high 0.006618 -0.011695 -0.05356 0.04848 NaN #> sigma_low rsd_high #> parent_0 0.016086 0.006618 #> log_k_m1 0.001583 -0.011695 #> f_parent_qlogis 0.015466 -0.053560 #> log_alpha 5.870361 0.048483 #> log_beta NaN NaN #> sigma_low 1.000000 -0.652545 #> rsd_high -0.652545 1.000000 #> #> 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.310e-26 9.624e+01 1.070e+02 #> k_m1 5.072e-03 10.1200 1.216e-11 4.196e-03 6.130e-03 #> f_parent_to_m1 5.004e-01 20.8300 4.316e-20 4.613e-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 #> #> 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 #> #> Resulting formation fractions: #> ff #> parent_m1 0.5004 #> parent_sink 0.4996 #> #> Estimated disappearance times: #> DT50 DT90 DT50back #> parent 6.812 22.7 6.834 #> m1 136.661 454.0 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, parms.ini = fit.FOMC$bparms.ode, error_model = \"tc\") # }"},{"path":"https://pkgdown.jrwb.de/mkin/reference/mkinmod.html","id":null,"dir":"Reference","previous_headings":"","what":"Function to set up a kinetic model with one or more state variables — mkinmod","title":"Function to set up a kinetic model with one or more state variables — mkinmod","text":"function usually called using call mkinsub() observed variable, specifying corresponding submodel well outgoing pathways (see examples). Print mkinmod objects way user finds way get components.","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/mkinmod.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Function to set up a kinetic model with one or more state variables — mkinmod","text":"","code":"mkinmod( ..., use_of_ff = \"max\", name = NULL, speclist = NULL, quiet = FALSE, verbose = FALSE, dll_dir = NULL, unload = FALSE, overwrite = FALSE ) # S3 method for mkinmod print(x, ...) mkinsub(submodel, to = NULL, sink = TRUE, full_name = NA)"},{"path":"https://pkgdown.jrwb.de/mkin/reference/mkinmod.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Function to set up a kinetic model with one or more state variables — mkinmod","text":"... observed variable, list obtained mkinsub() specified argument (see examples). Currently, single first order kinetics \"SFO\", indeterminate order rate equation kinetics \"IORE\", single first order reversible binding \"SFORB\" implemented variables, \"FOMC\", \"DFOP\", \"HS\" \"logistic\" can additionally chosen first variable assumed source compartment. Additionally, mkinsub() argument , specifying names variables transfer assumed model. argument use_of_ff set \"min\" model compartment \"SFO\" \"SFORB\", additional mkinsub() argument can sink = FALSE, effectively fixing flux sink zero. print.mkinmod, argument currently used. use_of_ff Specification use formation fractions model equations , applicable, coefficient matrix. \"max\", formation fractions always used (default). \"min\", minimum use formation fractions made, .e. first-order pathway metabolite rate constant. name name model. valid R object name. speclist specification observed variables submodel types pathways can given single list using argument. Default NULL. quiet messages suppressed? verbose TRUE, passed inline::cfunction() applicable give detailed information C function built. dll_dir Directory DLL object, generated internally inline::cfunction(), saved. DLL stored permanent location use future sessions, 'dll_dir' 'name' specified. helpful fit objects cached e.g. knitr, cache remains functional across sessions DLL stored user defined location. unload DLL target location 'dll_dir' already loaded, unloaded first? overwrite file exists target DLL location 'dll_dir', overwritten? x mkinmod object. submodel Character vector length one specify submodel type. See mkinmod list allowed submodel names. Vector names state variable transformation shall included model. sink pathway sink included model addition pathways state variables? full_name optional name used e.g. plotting fits performed model. can use non-ASCII characters , R code portable, .e. may produce unintended plot results operating systems system configurations.","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/mkinmod.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Function to set up a kinetic model with one or more state variables — mkinmod","text":"list class mkinmod use mkinfit(), containing, among others, diffs vector string representations differential equations, one modelling variable. map list containing named character vectors observed variable, specifying modelling variables represented. use_of_ff content use_of_ff passed list component. deg_func generated, function containing solution degradation model. coefmat coefficient matrix, system differential equations can represented one. cf generated, compiled function calculating derivatives returned cfunction. list use mkinmod.","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/mkinmod.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Function to set up a kinetic model with one or more state variables — mkinmod","text":"definition model types parameters, equations given FOCUS NAFTA guidance documents used. kinetic models one observed variable, symbolic solution system differential equations included resulting mkinmod object cases, speeding solution. C compiler found pkgbuild::has_compiler() one observed variable specification, C code generated evaluating differential equations, compiled using inline::cfunction() added resulting mkinmod object.","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/mkinmod.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Function to set up a kinetic model with one or more state variables — mkinmod","text":"IORE submodel well tested metabolites. using model metabolites, may want read note help page mkinfit.","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/mkinmod.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Function to set up a kinetic model with one or more state variables — mkinmod","text":"FOCUS (2006) “Guidance Document Estimating Persistence Degradation Kinetics Environmental Fate Studies Pesticides EU Registration” Report FOCUS Work Group Degradation Kinetics, EC Document Reference Sanco/10058/2005 version 2.0, 434 pp, http://esdac.jrc.ec.europa.eu/projects/degradation-kinetics NAFTA Technical Working Group Pesticides (dated) Guidance Evaluating Calculating Degradation Kinetics Environmental Media","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/mkinmod.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Function to set up a kinetic model with one or more state variables — mkinmod","text":"Johannes Ranke","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/mkinmod.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Function to set up a kinetic model with one or more state variables — mkinmod","text":"","code":"# Specify the SFO model (this is not needed any more, as we can now mkinfit(\"SFO\", ...) SFO <- mkinmod(parent = mkinsub(\"SFO\")) # One parent compound, one metabolite, both single first order SFO_SFO <- mkinmod( parent = mkinsub(\"SFO\", \"m1\"), m1 = mkinsub(\"SFO\")) #> Temporary DLL for differentials generated and loaded print(SFO_SFO) #> <mkinmod> model generated with #> Use of formation fractions $use_of_ff: max #> Specification $spec: #> $parent #> $type: SFO; $to: m1; $sink: TRUE #> $m1 #> $type: SFO; $sink: TRUE #> Coefficient matrix $coefmat available #> Compiled model $cf available #> Differential equations: #> d_parent/dt = - k_parent * parent #> d_m1/dt = + f_parent_to_m1 * k_parent * parent - k_m1 * m1 # \\dontrun{ fit_sfo_sfo <- mkinfit(SFO_SFO, FOCUS_2006_D, quiet = TRUE, solution_type = \"deSolve\") #> Warning: Observations with value of zero were removed from the data # Now supplying compound names used for plotting, and write to user defined location # We need to choose a path outside the session tempdir because this gets removed DLL_dir <- \"~/.local/share/mkin\" if (!dir.exists(DLL_dir)) dir.create(DLL_dir) SFO_SFO.2 <- mkinmod( parent = mkinsub(\"SFO\", \"m1\", full_name = \"Test compound\"), m1 = mkinsub(\"SFO\", full_name = \"Metabolite M1\"), name = \"SFO_SFO\", dll_dir = DLL_dir, unload = TRUE, overwrite = TRUE) #> Temporary DLL for differentials generated and loaded #> Copied DLL from /tmp/Rtmpjn19MY/filee5f2f55ca8372.so to /home/jranke/.local/share/mkin/SFO_SFO.so # Now we can save the model and restore it in a new session saveRDS(SFO_SFO.2, file = \"~/SFO_SFO.rds\") # Terminate the R session here if you would like to check, and then do library(mkin) SFO_SFO.3 <- readRDS(\"~/SFO_SFO.rds\") fit_sfo_sfo <- mkinfit(SFO_SFO.3, FOCUS_2006_D, quiet = TRUE, solution_type = \"deSolve\") #> Warning: Observations with value of zero were removed from the data # Show details of creating the C function SFO_SFO <- mkinmod( parent = mkinsub(\"SFO\", \"m1\"), m1 = mkinsub(\"SFO\"), verbose = TRUE) #> Program source: #> 1: #include <R.h> #> 2: #> 3: #> 4: static double parms [3]; #> 5: #define k_parent parms[0] #> 6: #define f_parent_to_m1 parms[1] #> 7: #define k_m1 parms[2] #> 8: #> 9: void initpar(void (* odeparms)(int *, double *)) { #> 10: int N = 3; #> 11: odeparms(&N, parms); #> 12: } #> 13: #> 14: #> 15: void diffs ( int * n, double * t, double * y, double * f, double * rpar, int * ipar ) { #> 16: #> 17: f[0] = - k_parent * y[0]; #> 18: f[1] = + f_parent_to_m1 * k_parent * y[0] - k_m1 * y[1]; #> 19: } #> Temporary DLL for differentials generated and loaded # The symbolic solution which is available in this case is not # made for human reading but for speed of computation SFO_SFO$deg_func #> function (observed, odeini, odeparms) #> { #> predicted <- numeric(0) #> with(as.list(odeparms), { #> t <- observed[observed$name == \"parent\", \"time\"] #> predicted <<- c(predicted, SFO.solution(t, odeini[\"parent\"], #> k_parent)) #> t <- observed[observed$name == \"m1\", \"time\"] #> predicted <<- c(predicted, (((k_m1 - k_parent) * odeini[\"m1\"] - #> f_parent_to_m1 * k_parent * odeini[\"parent\"]) * exp(-k_m1 * #> t) + f_parent_to_m1 * k_parent * odeini[\"parent\"] * #> exp(-k_parent * t))/(k_m1 - k_parent)) #> }) #> return(predicted) #> } #> <environment: 0x555555f44b28> # If we have several parallel metabolites # (compare tests/testthat/test_synthetic_data_for_UBA_2014.R) m_synth_DFOP_par <- mkinmod( parent = mkinsub(\"DFOP\", c(\"M1\", \"M2\")), M1 = mkinsub(\"SFO\"), M2 = mkinsub(\"SFO\"), quiet = TRUE) fit_DFOP_par_c <- mkinfit(m_synth_DFOP_par, synthetic_data_for_UBA_2014[[12]]$data, quiet = TRUE) # }"},{"path":"https://pkgdown.jrwb.de/mkin/reference/mkinparplot.html","id":null,"dir":"Reference","previous_headings":"","what":"Function to plot the confidence intervals obtained using mkinfit — mkinparplot","title":"Function to plot the confidence intervals obtained using mkinfit — mkinparplot","text":"function plots confidence intervals parameters fitted using mkinfit.","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/mkinparplot.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Function to plot the confidence intervals obtained using mkinfit — mkinparplot","text":"","code":"mkinparplot(object)"},{"path":"https://pkgdown.jrwb.de/mkin/reference/mkinparplot.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Function to plot the confidence intervals obtained using mkinfit — mkinparplot","text":"object fit represented mkinfit object.","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/mkinparplot.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Function to plot the confidence intervals obtained using mkinfit — mkinparplot","text":"Nothing returned function, called side effect, namely produce plot.","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/mkinparplot.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Function to plot the confidence intervals obtained using mkinfit — mkinparplot","text":"Johannes Ranke","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/mkinparplot.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Function to plot the confidence intervals obtained using mkinfit — mkinparplot","text":"","code":"# \\dontrun{ model <- mkinmod( T245 = mkinsub(\"SFO\", to = c(\"phenol\"), sink = FALSE), phenol = mkinsub(\"SFO\", to = c(\"anisole\")), anisole = mkinsub(\"SFO\"), use_of_ff = \"max\") #> Temporary DLL for differentials generated and loaded fit <- mkinfit(model, subset(mccall81_245T, soil == \"Commerce\"), quiet = TRUE) #> Warning: Observations with value of zero were removed from the data mkinparplot(fit) # }"},{"path":"https://pkgdown.jrwb.de/mkin/reference/mkinplot.html","id":null,"dir":"Reference","previous_headings":"","what":"Plot the observed data and the fitted model of an mkinfit object — mkinplot","title":"Plot the observed data and the fitted model of an mkinfit object — mkinplot","text":"Deprecated function. now calls plot method plot.mkinfit.","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/mkinplot.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Plot the observed data and the fitted model of an mkinfit object — mkinplot","text":"","code":"mkinplot(fit, ...)"},{"path":"https://pkgdown.jrwb.de/mkin/reference/mkinplot.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Plot the observed data and the fitted model of an mkinfit object — mkinplot","text":"fit object class mkinfit. ... arguments passed plot.mkinfit.","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/mkinplot.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Plot the observed data and the fitted model of an mkinfit object — mkinplot","text":"function called side effect.","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/mkinplot.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Plot the observed data and the fitted model of an mkinfit object — mkinplot","text":"Johannes Ranke","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/mkinpredict.html","id":null,"dir":"Reference","previous_headings":"","what":"Produce predictions from a kinetic model using specific parameters — mkinpredict","title":"Produce predictions from a kinetic model using specific parameters — mkinpredict","text":"function produces time series observed variables kinetic model specified mkinmod, using specific set kinetic parameters initial values state variables.","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/mkinpredict.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Produce predictions from a kinetic model using specific parameters — mkinpredict","text":"","code":"mkinpredict(x, odeparms, odeini, outtimes, ...) # 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\", use_symbols = FALSE, method.ode = \"lsoda\", atol = 1e-08, rtol = 1e-10, maxsteps = 20000L, map_output = TRUE, na_stop = 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, ... )"},{"path":"https://pkgdown.jrwb.de/mkin/reference/mkinpredict.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Produce predictions from a kinetic model using specific parameters — mkinpredict","text":"x kinetic model produced mkinmod, kinetic fit fitted mkinfit. latter case, fitted parameters used prediction. odeparms numeric vector specifying parameters used kinetic model, generally defined set ordinary differential equations. odeini numeric vector containing initial values state variables model. Note state variables can differ observed variables, example case SFORB model. outtimes numeric vector specifying time points model predictions generated. ... arguments passed ode solver case solver used. solution_type method used producing predictions. generally \"analytical\" one observed variable, usually \"deSolve\" case several observed variables. third possibility \"eigen\" fast comparison uncompiled ODE models, applicable models, e.g. using FOMC parent compound. use_compiled set FALSE, compiled version mkinmod model used, even present. use_symbols set TRUE (default), symbol info present mkinmod object used available accessing compiled code method.ode solution method passed via mkinpredict ode] case solution type \"deSolve\" using compiled code. using compiled code, lsoda supported. atol Absolute error tolerance, passed ode solver. rtol Absolute error tolerance, passed ode solver. maxsteps Maximum number steps, passed ode solver. map_output Boolean specify output list values observed variables (default) state variables (set FALSE). Setting FALSE effect analytical solutions, always return mapped output. na_stop error ode returns NaN values","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/mkinpredict.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Produce predictions from a kinetic model using specific parameters — mkinpredict","text":"matrix numeric solution wide format","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/mkinpredict.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Produce predictions from a kinetic model using specific parameters — mkinpredict","text":"Johannes Ranke","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/mkinpredict.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Produce predictions from a kinetic model using specific parameters — mkinpredict","text":"","code":"SFO <- mkinmod(degradinol = mkinsub(\"SFO\")) # Compare solution types mkinpredict(SFO, c(k_degradinol = 0.3), c(degradinol = 100), 0:20, solution_type = \"analytical\") #> time degradinol #> 0 0 100.0000000 #> 1 1 74.0818221 #> 2 2 54.8811636 #> 3 3 40.6569660 #> 4 4 30.1194212 #> 5 5 22.3130160 #> 6 6 16.5298888 #> 7 7 12.2456428 #> 8 8 9.0717953 #> 9 9 6.7205513 #> 10 10 4.9787068 #> 11 11 3.6883167 #> 12 12 2.7323722 #> 13 13 2.0241911 #> 14 14 1.4995577 #> 15 15 1.1108997 #> 16 16 0.8229747 #> 17 17 0.6096747 #> 18 18 0.4516581 #> 19 19 0.3345965 #> 20 20 0.2478752 mkinpredict(SFO, c(k_degradinol = 0.3), c(degradinol = 100), 0:20, solution_type = \"deSolve\") #> time degradinol #> 0 0 100.0000000 #> 1 1 74.0818221 #> 2 2 54.8811636 #> 3 3 40.6569660 #> 4 4 30.1194212 #> 5 5 22.3130160 #> 6 6 16.5298888 #> 7 7 12.2456428 #> 8 8 9.0717953 #> 9 9 6.7205513 #> 10 10 4.9787068 #> 11 11 3.6883167 #> 12 12 2.7323722 #> 13 13 2.0241911 #> 14 14 1.4995577 #> 15 15 1.1108996 #> 16 16 0.8229747 #> 17 17 0.6096747 #> 18 18 0.4516581 #> 19 19 0.3345965 #> 20 20 0.2478752 mkinpredict(SFO, c(k_degradinol = 0.3), c(degradinol = 100), 0:20, solution_type = \"deSolve\", use_compiled = FALSE) #> time degradinol #> 0 0 100.0000000 #> 1 1 74.0818221 #> 2 2 54.8811636 #> 3 3 40.6569660 #> 4 4 30.1194212 #> 5 5 22.3130160 #> 6 6 16.5298888 #> 7 7 12.2456428 #> 8 8 9.0717953 #> 9 9 6.7205513 #> 10 10 4.9787068 #> 11 11 3.6883167 #> 12 12 2.7323722 #> 13 13 2.0241911 #> 14 14 1.4995577 #> 15 15 1.1108996 #> 16 16 0.8229747 #> 17 17 0.6096747 #> 18 18 0.4516581 #> 19 19 0.3345965 #> 20 20 0.2478752 mkinpredict(SFO, c(k_degradinol = 0.3), c(degradinol = 100), 0:20, solution_type = \"eigen\") #> time degradinol #> 0 0 100.0000000 #> 1 1 74.0818221 #> 2 2 54.8811636 #> 3 3 40.6569660 #> 4 4 30.1194212 #> 5 5 22.3130160 #> 6 6 16.5298888 #> 7 7 12.2456428 #> 8 8 9.0717953 #> 9 9 6.7205513 #> 10 10 4.9787068 #> 11 11 3.6883167 #> 12 12 2.7323722 #> 13 13 2.0241911 #> 14 14 1.4995577 #> 15 15 1.1108997 #> 16 16 0.8229747 #> 17 17 0.6096747 #> 18 18 0.4516581 #> 19 19 0.3345965 #> 20 20 0.2478752 # Compare integration methods to analytical solution mkinpredict(SFO, c(k_degradinol = 0.3), c(degradinol = 100), 0:20, solution_type = \"analytical\")[21,] #> time degradinol #> 20.0000000 0.2478752 mkinpredict(SFO, c(k_degradinol = 0.3), c(degradinol = 100), 0:20, method = \"lsoda\", use_compiled = FALSE)[21,] #> time degradinol #> 20.0000000 0.2478752 mkinpredict(SFO, c(k_degradinol = 0.3), c(degradinol = 100), 0:20, method = \"ode45\", use_compiled = FALSE)[21,] #> time degradinol #> 20.0000000 0.2478752 mkinpredict(SFO, c(k_degradinol = 0.3), c(degradinol = 100), 0:20, method = \"rk4\", use_compiled = FALSE)[21,] #> time degradinol #> 20.0000000 0.2480043 # rk4 is not as precise here # The number of output times used to make a lot of difference until the # default for atol was adjusted mkinpredict(SFO, c(k_degradinol = 0.3), c(degradinol = 100), seq(0, 20, by = 0.1))[201,] #> time degradinol #> 20.0000000 0.2478752 mkinpredict(SFO, c(k_degradinol = 0.3), c(degradinol = 100), seq(0, 20, by = 0.01))[2001,] #> time degradinol #> 20.0000000 0.2478752 # Comparison of the performance of solution types SFO_SFO = mkinmod(parent = list(type = \"SFO\", to = \"m1\"), m1 = list(type = \"SFO\"), use_of_ff = \"max\") #> Temporary DLL for differentials generated and loaded if(require(rbenchmark)) { benchmark(replications = 10, order = \"relative\", columns = c(\"test\", \"relative\", \"elapsed\"), eigen = mkinpredict(SFO_SFO, c(k_parent = 0.15, f_parent_to_m1 = 0.5, k_m1 = 0.01), c(parent = 100, m1 = 0), seq(0, 20, by = 0.1), solution_type = \"eigen\")[201,], deSolve_compiled = mkinpredict(SFO_SFO, c(k_parent = 0.15, f_parent_to_m1 = 0.5, k_m1 = 0.01), c(parent = 100, m1 = 0), seq(0, 20, by = 0.1), solution_type = \"deSolve\")[201,], deSolve = mkinpredict(SFO_SFO, c(k_parent = 0.15, f_parent_to_m1 = 0.5, k_m1 = 0.01), c(parent = 100, m1 = 0), seq(0, 20, by = 0.1), solution_type = \"deSolve\", use_compiled = FALSE)[201,], analytical = mkinpredict(SFO_SFO, c(k_parent = 0.15, f_parent_to_m1 = 0.5, k_m1 = 0.01), c(parent = 100, m1 = 0), seq(0, 20, by = 0.1), solution_type = \"analytical\", use_compiled = FALSE)[201,]) } #> test relative elapsed #> 4 analytical 1 0.001 #> 2 deSolve_compiled 2 0.002 #> 1 eigen 8 0.008 #> 3 deSolve 64 0.064 # \\dontrun{ # Predict from a fitted model f <- mkinfit(SFO_SFO, FOCUS_2006_C, quiet = TRUE) f <- mkinfit(SFO_SFO, FOCUS_2006_C, quiet = TRUE, solution_type = \"deSolve\") head(mkinpredict(f)) #> Error in !is.null(x$symbols) & use_symbols: operations are possible only for numeric, logical or complex types # }"},{"path":"https://pkgdown.jrwb.de/mkin/reference/mkinresplot.html","id":null,"dir":"Reference","previous_headings":"","what":"Function to plot residuals stored in an mkin object — mkinresplot","title":"Function to plot residuals stored in an mkin object — mkinresplot","text":"function plots residuals specified subset observed variables mkinfit object. combined plot fitted model residuals can obtained using plot.mkinfit using argument show_residuals = TRUE.","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/mkinresplot.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Function to plot residuals stored in an mkin object — mkinresplot","text":"","code":"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, ... )"},{"path":"https://pkgdown.jrwb.de/mkin/reference/mkinresplot.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Function to plot residuals stored in an mkin object — mkinresplot","text":"object fit represented mkinfit object. obs_vars character vector names observed variables residuals plotted. Defaults observed variables model xlim plot range x direction. standardized residuals standardized dividing standard deviation given error model fit? xlab Label x axis. ylab Label y axis. maxabs Maximum absolute value residuals. used scaling y axis defaults \"auto\". legend legend plotted? lpos legend placed? Default \"topright\". passed legend. col_obs Colors observed variables. pch_obs Symbols used observed variables. frame frame drawn around plots? ... arguments passed plot.","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/mkinresplot.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Function to plot residuals stored in an mkin object — mkinresplot","text":"Nothing returned function, called side effect, namely produce plot.","code":""},{"path":[]},{"path":"https://pkgdown.jrwb.de/mkin/reference/mkinresplot.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Function to plot residuals stored in an mkin object — mkinresplot","text":"Johannes Ranke Katrin Lindenberger","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/mkinresplot.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Function to plot residuals stored in an mkin object — mkinresplot","text":"","code":"model <- mkinmod(parent = mkinsub(\"SFO\", \"m1\"), m1 = mkinsub(\"SFO\")) #> Temporary DLL for differentials generated and loaded fit <- mkinfit(model, FOCUS_2006_D, quiet = TRUE) #> Warning: Observations with value of zero were removed from the data mkinresplot(fit, \"m1\")"},{"path":"https://pkgdown.jrwb.de/mkin/reference/mmkin.html","id":null,"dir":"Reference","previous_headings":"","what":"Fit one or more kinetic models with one or more state variables to one or\nmore datasets — mmkin","title":"Fit one or more kinetic models with one or more state variables to one or\nmore datasets — mmkin","text":"function calls mkinfit combinations models datasets specified first two arguments.","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/mmkin.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Fit one or more kinetic models with one or more state variables to one or\nmore datasets — mmkin","text":"","code":"mmkin( models = c(\"SFO\", \"FOMC\", \"DFOP\"), datasets, cores = if (Sys.info()[\"sysname\"] == \"Windows\") 1 else parallel::detectCores(), cluster = NULL, ... ) # S3 method for mmkin print(x, ...)"},{"path":"https://pkgdown.jrwb.de/mkin/reference/mmkin.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Fit one or more kinetic models with one or more state variables to one or\nmore datasets — mmkin","text":"models Either character vector shorthand names like c(\"SFO\", \"FOMC\", \"DFOP\", \"HS\", \"SFORB\"), optionally named list mkinmod objects. datasets optionally named list datasets suitable observed data mkinfit. cores number cores used multicore processing. used cluster argument NULL. Windows machines, cores > 1 supported, need use cluster argument use multiple logical processors. Per default, cores detected parallel::detectCores() used, except Windows default 1. cluster cluster returned makeCluster used parallel execution. ... used. x mmkin object.","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/mmkin.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Fit one or more kinetic models with one or more state variables to one or\nmore datasets — mmkin","text":"two-dimensional array mkinfit objects /try-errors can indexed using model names first index (row index) dataset names second index (column index).","code":""},{"path":[]},{"path":"https://pkgdown.jrwb.de/mkin/reference/mmkin.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Fit one or more kinetic models with one or more state variables to one or\nmore datasets — mmkin","text":"Johannes Ranke","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/mmkin.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Fit one or more kinetic models with one or more state variables to one or\nmore datasets — mmkin","text":"","code":"# \\dontrun{ m_synth_SFO_lin <- mkinmod(parent = mkinsub(\"SFO\", \"M1\"), M1 = mkinsub(\"SFO\", \"M2\"), M2 = mkinsub(\"SFO\"), use_of_ff = \"max\") #> Temporary DLL for differentials generated and loaded m_synth_FOMC_lin <- mkinmod(parent = mkinsub(\"FOMC\", \"M1\"), M1 = mkinsub(\"SFO\", \"M2\"), M2 = mkinsub(\"SFO\"), use_of_ff = \"max\") #> Temporary DLL for differentials generated and loaded models <- list(SFO_lin = m_synth_SFO_lin, FOMC_lin = m_synth_FOMC_lin) datasets <- lapply(synthetic_data_for_UBA_2014[1:3], function(x) x$data) names(datasets) <- paste(\"Dataset\", 1:3) time_default <- system.time(fits.0 <- mmkin(models, datasets, quiet = TRUE)) time_1 <- system.time(fits.4 <- mmkin(models, datasets, cores = 1, quiet = TRUE)) time_default #> user system elapsed #> 1.653 0.553 0.654 time_1 #> user system elapsed #> 2.013 0.008 2.021 endpoints(fits.0[[\"SFO_lin\", 2]]) #> $ff #> parent_M1 parent_sink M1_M2 M1_sink #> 0.7340481 0.2659519 0.7505690 0.2494310 #> #> $distimes #> DT50 DT90 #> parent 0.8777689 2.915885 #> M1 2.3257403 7.725942 #> M2 33.7201060 112.015767 #> # plot.mkinfit handles rows or columns of mmkin result objects plot(fits.0[1, ]) plot(fits.0[1, ], obs_var = c(\"M1\", \"M2\")) plot(fits.0[, 1]) # Use double brackets to extract a single mkinfit object, which will be plotted # by plot.mkinfit and can be plotted using plot_sep plot(fits.0[[1, 1]], sep_obs = TRUE, show_residuals = TRUE, show_errmin = TRUE) plot_sep(fits.0[[1, 1]]) # Plotting with mmkin (single brackets, extracting an mmkin object) does not # allow to plot the observed variables separately plot(fits.0[1, 1]) # On Windows, we can use multiple cores by making a cluster first cl <- parallel::makePSOCKcluster(12) f <- mmkin(c(\"SFO\", \"FOMC\", \"DFOP\"), list(A = FOCUS_2006_A, B = FOCUS_2006_B, C = FOCUS_2006_C, D = FOCUS_2006_D), cluster = cl, quiet = TRUE) print(f) #> <mmkin> object #> Status of individual fits: #> #> dataset #> model A B C D #> SFO OK OK OK OK #> FOMC C OK OK OK #> DFOP OK OK OK OK #> #> C: Optimisation did not converge: #> false convergence (8) #> OK: No warnings # We get false convergence for the FOMC fit to FOCUS_2006_A because this # dataset is really SFO, and the FOMC fit is overparameterised parallel::stopCluster(cl) # }"},{"path":"https://pkgdown.jrwb.de/mkin/reference/multistart.html","id":null,"dir":"Reference","previous_headings":"","what":"Perform a hierarchical model fit with multiple starting values — multistart","title":"Perform a hierarchical model fit with multiple starting values — multistart","text":"purpose method check certain algorithm fitting nonlinear hierarchical models (also known nonlinear mixed-effects models) reliably yield results sufficiently similar , started certain range reasonable starting parameters. inspired article practical identifiabiliy frame nonlinear mixed-effects models Duchesne et al (2021).","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/multistart.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Perform a hierarchical model fit with multiple starting values — multistart","text":"","code":"multistart( object, n = 50, cores = if (Sys.info()[\"sysname\"] == \"Windows\") 1 else parallel::detectCores(), cluster = NULL, ... ) # S3 method for saem.mmkin multistart(object, n = 50, cores = 1, cluster = NULL, ...) # S3 method for multistart print(x, ...) best(object, ...) # S3 method for default best(object, ...) which.best(object, ...) # S3 method for default which.best(object, ...)"},{"path":"https://pkgdown.jrwb.de/mkin/reference/multistart.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Perform a hierarchical model fit with multiple starting values — multistart","text":"object fit object work n many different combinations starting parameters used? cores many fits run parallel (posix platforms)? cluster cluster returned parallel::makeCluster used parallel execution. ... Passed update function. x multistart object print","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/multistart.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Perform a hierarchical model fit with multiple starting values — multistart","text":"list saem.mmkin objects, class attributes 'multistart.saem.mmkin' 'multistart'. object highest likelihood index object highest likelihood","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/multistart.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Perform a hierarchical model fit with multiple starting values — multistart","text":"Duchesne R, Guillemin , Gandrillon O, Crauste F. Practical identifiability frame nonlinear mixed effects models: example vitro erythropoiesis. BMC Bioinformatics. 2021 Oct 4;22(1):478. doi: 10.1186/s12859-021-04373-4.","code":""},{"path":[]},{"path":"https://pkgdown.jrwb.de/mkin/reference/multistart.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Perform a hierarchical model fit with multiple starting values — multistart","text":"","code":"# \\dontrun{ library(mkin) dmta_ds <- lapply(1:7, function(i) { ds_i <- dimethenamid_2018$ds[[i]]$data ds_i[ds_i$name == \"DMTAP\", \"name\"] <- \"DMTA\" ds_i$time <- ds_i$time * dimethenamid_2018$f_time_norm[i] ds_i }) names(dmta_ds) <- sapply(dimethenamid_2018$ds, function(ds) ds$title) dmta_ds[[\"Elliot\"]] <- rbind(dmta_ds[[\"Elliot 1\"]], dmta_ds[[\"Elliot 2\"]]) dmta_ds[[\"Elliot 1\"]] <- dmta_ds[[\"Elliot 2\"]] <- NULL f_mmkin <- mmkin(\"DFOP\", dmta_ds, error_model = \"tc\", cores = 7, quiet = TRUE) f_saem_full <- saem(f_mmkin) f_saem_full_multi <- multistart(f_saem_full, n = 16, cores = 16) parplot(f_saem_full_multi, lpos = \"topleft\") illparms(f_saem_full) #> [1] \"sd(log_k2)\" f_saem_reduced <- update(f_saem_full, no_random_effect = \"log_k2\") illparms(f_saem_reduced) # On Windows, we need to create a PSOCK cluster first and refer to it # in the call to multistart() library(parallel) cl <- makePSOCKcluster(12) f_saem_reduced_multi <- multistart(f_saem_reduced, n = 16, cluster = cl) parplot(f_saem_reduced_multi, lpos = \"topright\", ylim = c(0.5, 2)) stopCluster(cl) # }"},{"path":"https://pkgdown.jrwb.de/mkin/reference/nafta.html","id":null,"dir":"Reference","previous_headings":"","what":"Evaluate parent kinetics using the NAFTA guidance — nafta","title":"Evaluate parent kinetics using the NAFTA guidance — nafta","text":"function fits SFO, IORE DFOP models using mmkin returns object class nafta methods printing plotting. Print nafta objects. results three models printed order increasing model complexity, .e. SFO, IORE, finally DFOP.","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/nafta.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Evaluate parent kinetics using the NAFTA guidance — nafta","text":"","code":"nafta(ds, title = NA, quiet = FALSE, ...) # S3 method for nafta print(x, quiet = TRUE, digits = 3, ...)"},{"path":"https://pkgdown.jrwb.de/mkin/reference/nafta.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"Evaluate parent kinetics using the NAFTA guidance — nafta","text":"NAFTA (2011) Guidance evaluating calculating degradation kinetics environmental media. NAFTA Technical Working Group Pesticides https://www.epa.gov/pesticide-science--assessing-pesticide-risks/guidance-evaluating--calculating-degradation accessed 2019-02-22 US EPA (2015) Standard Operating Procedure Using NAFTA Guidance Calculate Representative Half-life Values Characterizing Pesticide Degradation https://www.epa.gov/pesticide-science--assessing-pesticide-risks/standard-operating-procedure-using-nafta-guidance","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/nafta.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Evaluate parent kinetics using the NAFTA guidance — nafta","text":"ds dataframe must contain one variable called \"time\" time values specified time argument, one column called \"name\" grouping observed values, finally one column observed values called \"value\". title Optional title dataset quiet evaluation text shown? ... arguments passed mmkin (printing method). x nafta object. digits Number digits used printing parameters dissipation times.","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/nafta.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Evaluate parent kinetics using the NAFTA guidance — nafta","text":"list class nafta. list element named \"mmkin\" mmkin object containing fits three models. list element named \"title\" contains title dataset used. list element \"data\" contains dataset used fits.","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/nafta.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Evaluate parent kinetics using the NAFTA guidance — nafta","text":"Johannes Ranke","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/nafta.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Evaluate parent kinetics using the NAFTA guidance — nafta","text":"","code":"nafta_evaluation <- nafta(NAFTA_SOP_Appendix_D, cores = 1) #> The SFO model is rejected as S_SFO is equal or higher than the critical value S_c #> The representative half-life of the IORE model is longer than the one corresponding #> to the terminal degradation rate found with the DFOP model. #> The representative half-life obtained from the DFOP model may be used print(nafta_evaluation) #> Sums of squares: #> SFO IORE DFOP #> 1378.6832 615.7730 517.8836 #> #> Critical sum of squares for checking the SFO model: #> [1] 717.4598 #> #> Parameters: #> $SFO #> Estimate Pr(>t) Lower Upper #> parent_0 83.7558 1.80e-14 77.18268 90.3288 #> k_parent 0.0017 7.43e-05 0.00112 0.0026 #> sigma 8.7518 1.22e-05 5.64278 11.8608 #> #> $IORE #> Estimate Pr(>t) Lower Upper #> parent_0 9.69e+01 NA 8.88e+01 1.05e+02 #> k__iore_parent 8.40e-14 NA 1.79e-18 3.94e-09 #> N_parent 6.68e+00 NA 4.19e+00 9.17e+00 #> sigma 5.85e+00 NA 3.76e+00 7.94e+00 #> #> $DFOP #> Estimate Pr(>t) Lower Upper #> parent_0 9.76e+01 1.94e-13 9.02e+01 1.05e+02 #> k1 4.24e-02 5.92e-03 2.03e-02 8.88e-02 #> k2 8.24e-04 6.48e-03 3.89e-04 1.75e-03 #> g 2.88e-01 2.47e-05 1.95e-01 4.03e-01 #> sigma 5.36e+00 2.22e-05 3.43e+00 7.30e+00 #> #> #> DTx values: #> DT50 DT90 DT50_rep #> SFO 407 1350 407 #> IORE 541 5190000 1560000 #> DFOP 429 2380 841 #> #> Representative half-life: #> [1] 841.41 plot(nafta_evaluation)"},{"path":"https://pkgdown.jrwb.de/mkin/reference/nlme.html","id":null,"dir":"Reference","previous_headings":"","what":"Helper functions to create nlme models from mmkin row objects — nlme_function","title":"Helper functions to create nlme models from mmkin row objects — nlme_function","text":"functions facilitate setting nonlinear mixed effects model mmkin row object. mmkin row object essentially list mkinfit objects obtained fitting model list datasets. used internally nlme.mmkin() method.","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/nlme.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Helper functions to create nlme models from mmkin row objects — nlme_function","text":"","code":"nlme_function(object) nlme_data(object)"},{"path":"https://pkgdown.jrwb.de/mkin/reference/nlme.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Helper functions to create nlme models from mmkin row objects — nlme_function","text":"object mmkin row object containing several fits model different datasets","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/nlme.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Helper functions to create nlme models from mmkin row objects — nlme_function","text":"function can used nlme groupedData object","code":""},{"path":[]},{"path":"https://pkgdown.jrwb.de/mkin/reference/nlme.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Helper functions to create nlme models from mmkin row objects — nlme_function","text":"","code":"sampling_times = c(0, 1, 3, 7, 14, 28, 60, 90, 120) m_SFO <- mkinmod(parent = mkinsub(\"SFO\")) d_SFO_1 <- mkinpredict(m_SFO, c(k_parent = 0.1), c(parent = 98), sampling_times) d_SFO_1_long <- mkin_wide_to_long(d_SFO_1, time = \"time\") d_SFO_2 <- mkinpredict(m_SFO, c(k_parent = 0.05), c(parent = 102), sampling_times) d_SFO_2_long <- mkin_wide_to_long(d_SFO_2, time = \"time\") d_SFO_3 <- mkinpredict(m_SFO, c(k_parent = 0.02), c(parent = 103), sampling_times) d_SFO_3_long <- mkin_wide_to_long(d_SFO_3, time = \"time\") d1 <- add_err(d_SFO_1, function(value) 3, n = 1) d2 <- add_err(d_SFO_2, function(value) 2, n = 1) d3 <- add_err(d_SFO_3, function(value) 4, n = 1) ds <- c(d1 = d1, d2 = d2, d3 = d3) f <- mmkin(\"SFO\", ds, cores = 1, quiet = TRUE) mean_dp <- mean_degparms(f) grouped_data <- nlme_data(f) nlme_f <- nlme_function(f) # These assignments are necessary for these objects to be # visible to nlme and augPred when evaluation is done by # pkgdown to generate the html docs. assign(\"nlme_f\", nlme_f, globalenv()) assign(\"grouped_data\", grouped_data, globalenv()) library(nlme) m_nlme <- nlme(value ~ nlme_f(name, time, parent_0, log_k_parent_sink), data = grouped_data, fixed = parent_0 + log_k_parent_sink ~ 1, random = pdDiag(parent_0 + log_k_parent_sink ~ 1), start = mean_dp) summary(m_nlme) #> Nonlinear mixed-effects model fit by maximum likelihood #> Model: value ~ nlme_f(name, time, parent_0, log_k_parent_sink) #> Data: grouped_data #> AIC BIC logLik #> 266.6428 275.8935 -128.3214 #> #> Random effects: #> Formula: list(parent_0 ~ 1, log_k_parent_sink ~ 1) #> Level: ds #> Structure: Diagonal #> parent_0 log_k_parent_sink Residual #> StdDev: 0.0003775775 0.7058039 3.065183 #> #> Fixed effects: parent_0 + log_k_parent_sink ~ 1 #> Value Std.Error DF t-value p-value #> parent_0 101.18323 0.7900461 43 128.07257 0 #> log_k_parent_sink -3.08708 0.4171755 43 -7.39995 0 #> Correlation: #> prnt_0 #> log_k_parent_sink 0.031 #> #> Standardized Within-Group Residuals: #> Min Q1 Med Q3 Max #> -2.38427070 -0.52059848 0.03593021 0.39987268 2.73188969 #> #> Number of Observations: 47 #> Number of Groups: 3 plot(augPred(m_nlme, level = 0:1), layout = c(3, 1)) # augPred does not work on fits with more than one state # variable # # The procedure is greatly simplified by the nlme.mmkin function f_nlme <- nlme(f) plot(f_nlme)"},{"path":"https://pkgdown.jrwb.de/mkin/reference/nlme.mmkin.html","id":null,"dir":"Reference","previous_headings":"","what":"Create an nlme model for an mmkin row object — nlme.mmkin","title":"Create an nlme model for an mmkin row object — nlme.mmkin","text":"functions sets nonlinear mixed effects model mmkin row object. mmkin row object essentially list mkinfit objects obtained fitting model list datasets.","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/nlme.mmkin.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create an nlme model for an mmkin row object — nlme.mmkin","text":"","code":"# S3 method for mmkin nlme( model, data = \"auto\", fixed = lapply(as.list(names(mean_degparms(model))), function(el) eval(parse(text = paste(el, 1, sep = \"~\")))), random = pdDiag(fixed), groups, start = mean_degparms(model, random = TRUE, test_log_parms = TRUE), correlation = NULL, weights = NULL, subset, method = c(\"ML\", \"REML\"), na.action = na.fail, naPattern, control = list(), verbose = FALSE ) # S3 method for nlme.mmkin print(x, digits = max(3, getOption(\"digits\") - 3), ...) # S3 method for nlme.mmkin update(object, ...)"},{"path":"https://pkgdown.jrwb.de/mkin/reference/nlme.mmkin.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create an nlme model for an mmkin row object — nlme.mmkin","text":"model mmkin row object. data Ignored, data taken mmkin model fixed Ignored, degradation parameters fitted mmkin model used fixed parameters random specified, correlations random effects set optimised degradation model parameters. achieved using nlme::pdDiag method. groups See documentation nlme start specified, mean values fitted degradation parameters taken mmkin object used correlation See documentation nlme weights passed nlme subset passed nlme method passed nlme na.action passed nlme naPattern passed nlme control passed nlme verbose passed nlme x nlme.mmkin object print digits Number digits use printing ... Update specifications passed update.nlme object nlme.mmkin object update","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/nlme.mmkin.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create an nlme model for an mmkin row object — nlme.mmkin","text":"Upon success, fitted 'nlme.mmkin' object, nlme object additional elements. also inherits 'mixed.mmkin'.","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/nlme.mmkin.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Create an nlme model for an mmkin row object — nlme.mmkin","text":"Note convergence nlme algorithms depends quality data. degradation kinetics, often datasets (e.g. data soils) complicated degradation models, may make impossible obtain convergence nlme.","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/nlme.mmkin.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Create an nlme model for an mmkin row object — nlme.mmkin","text":"object inherits nlme::nlme, wealth methods automatically work 'nlme.mmkin' objects, nlme::intervals(), nlme::anova.lme() nlme::coef.lme().","code":""},{"path":[]},{"path":"https://pkgdown.jrwb.de/mkin/reference/nlme.mmkin.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Create an nlme model for an mmkin row object — nlme.mmkin","text":"","code":"ds <- lapply(experimental_data_for_UBA_2019[6:10], function(x) subset(x$data[c(\"name\", \"time\", \"value\")], name == \"parent\")) # \\dontrun{ f <- mmkin(c(\"SFO\", \"DFOP\"), ds, quiet = TRUE, cores = 1) library(nlme) f_nlme_sfo <- nlme(f[\"SFO\", ]) f_nlme_dfop <- nlme(f[\"DFOP\", ]) anova(f_nlme_sfo, f_nlme_dfop) #> Model df AIC BIC logLik Test L.Ratio p-value #> f_nlme_sfo 1 5 625.0539 637.5529 -307.5269 #> f_nlme_dfop 2 9 495.1270 517.6253 -238.5635 1 vs 2 137.9269 <.0001 print(f_nlme_dfop) #> Kinetic nonlinear mixed-effects model fit by maximum likelihood #> #> Structural model: #> d_parent/dt = - ((k1 * g * exp(-k1 * time) + k2 * (1 - g) * exp(-k2 * #> time)) / (g * exp(-k1 * time) + (1 - g) * exp(-k2 * time))) #> * parent #> #> Data: #> 90 observations of 1 variable(s) grouped in 5 datasets #> #> Log-likelihood: -238.6 #> #> Fixed effects: #> list(parent_0 ~ 1, log_k1 ~ 1, log_k2 ~ 1, g_qlogis ~ 1) #> parent_0 log_k1 log_k2 g_qlogis #> 94.1702 -1.8002 -4.1474 0.0324 #> #> Random effects: #> Formula: list(parent_0 ~ 1, log_k1 ~ 1, log_k2 ~ 1, g_qlogis ~ 1) #> Level: ds #> Structure: Diagonal #> parent_0 log_k1 log_k2 g_qlogis Residual #> StdDev: 2.488 0.8447 1.33 0.4652 2.321 #> plot(f_nlme_dfop) endpoints(f_nlme_dfop) #> $distimes #> DT50 DT90 DT50back DT50_k1 DT50_k2 #> parent 10.79857 100.7937 30.34192 4.193937 43.85442 #> ds_2 <- lapply(experimental_data_for_UBA_2019[6:10], function(x) x$data[c(\"name\", \"time\", \"value\")]) m_sfo_sfo <- mkinmod(parent = mkinsub(\"SFO\", \"A1\"), A1 = mkinsub(\"SFO\"), use_of_ff = \"min\", quiet = TRUE) m_sfo_sfo_ff <- mkinmod(parent = mkinsub(\"SFO\", \"A1\"), A1 = mkinsub(\"SFO\"), use_of_ff = \"max\", quiet = TRUE) m_dfop_sfo <- mkinmod(parent = mkinsub(\"DFOP\", \"A1\"), A1 = mkinsub(\"SFO\"), quiet = TRUE) f_2 <- mmkin(list(\"SFO-SFO\" = m_sfo_sfo, \"SFO-SFO-ff\" = m_sfo_sfo_ff, \"DFOP-SFO\" = m_dfop_sfo), ds_2, quiet = TRUE) f_nlme_sfo_sfo <- nlme(f_2[\"SFO-SFO\", ]) plot(f_nlme_sfo_sfo) # With formation fractions this does not coverge with defaults # f_nlme_sfo_sfo_ff <- nlme(f_2[\"SFO-SFO-ff\", ]) #plot(f_nlme_sfo_sfo_ff) # For the following, we need to increase pnlsMaxIter and the tolerance # to get convergence f_nlme_dfop_sfo <- nlme(f_2[\"DFOP-SFO\", ], control = list(pnlsMaxIter = 120, tolerance = 5e-4)) plot(f_nlme_dfop_sfo) anova(f_nlme_dfop_sfo, f_nlme_sfo_sfo) #> Model df AIC BIC logLik Test L.Ratio p-value #> f_nlme_dfop_sfo 1 13 843.8547 884.620 -408.9273 #> f_nlme_sfo_sfo 2 9 1085.1821 1113.404 -533.5910 1 vs 2 249.3274 <.0001 endpoints(f_nlme_sfo_sfo) #> $ff #> parent_sink parent_A1 A1_sink #> 0.5912432 0.4087568 1.0000000 #> #> $distimes #> DT50 DT90 #> parent 19.13518 63.5657 #> A1 66.02155 219.3189 #> endpoints(f_nlme_dfop_sfo) #> $ff #> parent_A1 parent_sink #> 0.2768574 0.7231426 #> #> $distimes #> DT50 DT90 DT50back DT50_k1 DT50_k2 #> parent 11.07091 104.6320 31.49737 4.462383 46.20825 #> A1 162.30550 539.1672 NA NA NA #> if (length(findFunction(\"varConstProp\")) > 0) { # tc error model for nlme available # Attempts to fit metabolite kinetics with the tc error model are possible, # but need tweeking of control values and sometimes do not converge f_tc <- mmkin(c(\"SFO\", \"DFOP\"), ds, quiet = TRUE, error_model = \"tc\") f_nlme_sfo_tc <- nlme(f_tc[\"SFO\", ]) f_nlme_dfop_tc <- nlme(f_tc[\"DFOP\", ]) AIC(f_nlme_sfo, f_nlme_sfo_tc, f_nlme_dfop, f_nlme_dfop_tc) print(f_nlme_dfop_tc) } #> Kinetic nonlinear mixed-effects model fit by maximum likelihood #> #> Structural model: #> d_parent/dt = - ((k1 * g * exp(-k1 * time) + k2 * (1 - g) * exp(-k2 * #> time)) / (g * exp(-k1 * time) + (1 - g) * exp(-k2 * time))) #> * parent #> #> Data: #> 90 observations of 1 variable(s) grouped in 5 datasets #> #> Log-likelihood: -238.4 #> #> Fixed effects: #> list(parent_0 ~ 1, log_k1 ~ 1, log_k2 ~ 1, g_qlogis ~ 1) #> parent_0 log_k1 log_k2 g_qlogis #> 94.04774 -1.82340 -4.16716 0.05685 #> #> Random effects: #> Formula: list(parent_0 ~ 1, log_k1 ~ 1, log_k2 ~ 1, g_qlogis ~ 1) #> Level: ds #> Structure: Diagonal #> parent_0 log_k1 log_k2 g_qlogis Residual #> StdDev: 2.474 0.85 1.337 0.4659 1 #> #> Variance function: #> Structure: Constant plus proportion of variance covariate #> Formula: ~fitted(.) #> Parameter estimates: #> const prop #> 2.23222933 0.01262399 f_2_obs <- update(f_2, error_model = \"obs\") f_nlme_sfo_sfo_obs <- nlme(f_2_obs[\"SFO-SFO\", ]) print(f_nlme_sfo_sfo_obs) #> Kinetic nonlinear mixed-effects model fit by maximum likelihood #> #> Structural model: #> d_parent/dt = - k_parent_sink * parent - k_parent_A1 * parent #> d_A1/dt = + k_parent_A1 * parent - k_A1_sink * A1 #> #> Data: #> 170 observations of 2 variable(s) grouped in 5 datasets #> #> Log-likelihood: -473 #> #> Fixed effects: #> list(parent_0 ~ 1, log_k_parent_sink ~ 1, log_k_parent_A1 ~ 1, log_k_A1_sink ~ 1) #> parent_0 log_k_parent_sink log_k_parent_A1 log_k_A1_sink #> 87.976 -3.670 -4.164 -4.645 #> #> Random effects: #> Formula: list(parent_0 ~ 1, log_k_parent_sink ~ 1, log_k_parent_A1 ~ 1, log_k_A1_sink ~ 1) #> Level: ds #> Structure: Diagonal #> parent_0 log_k_parent_sink log_k_parent_A1 log_k_A1_sink Residual #> StdDev: 3.992 1.777 1.055 0.4821 6.483 #> #> Variance function: #> Structure: Different standard deviations per stratum #> Formula: ~1 | name #> Parameter estimates: #> parent A1 #> 1.0000000 0.2050005 f_nlme_dfop_sfo_obs <- nlme(f_2_obs[\"DFOP-SFO\", ], control = list(pnlsMaxIter = 120, tolerance = 5e-4)) f_2_tc <- update(f_2, error_model = \"tc\") # f_nlme_sfo_sfo_tc <- nlme(f_2_tc[\"SFO-SFO\", ]) # No convergence with 50 iterations # f_nlme_dfop_sfo_tc <- nlme(f_2_tc[\"DFOP-SFO\", ], # control = list(pnlsMaxIter = 120, tolerance = 5e-4)) # Error in X[, fmap[[nm]]] <- gradnm anova(f_nlme_dfop_sfo, f_nlme_dfop_sfo_obs) #> Model df AIC BIC logLik Test L.Ratio p-value #> f_nlme_dfop_sfo 1 13 843.8547 884.620 -408.9273 #> f_nlme_dfop_sfo_obs 2 14 817.5338 861.435 -394.7669 1 vs 2 28.32084 <.0001 # }"},{"path":"https://pkgdown.jrwb.de/mkin/reference/nobs.mkinfit.html","id":null,"dir":"Reference","previous_headings":"","what":"Number of observations on which an mkinfit object was fitted — nobs.mkinfit","title":"Number of observations on which an mkinfit object was fitted — nobs.mkinfit","text":"Number observations mkinfit object fitted","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/nobs.mkinfit.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Number of observations on which an mkinfit object was fitted — nobs.mkinfit","text":"","code":"# S3 method for mkinfit nobs(object, ...)"},{"path":"https://pkgdown.jrwb.de/mkin/reference/nobs.mkinfit.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Number of observations on which an mkinfit object was fitted — nobs.mkinfit","text":"object mkinfit object ... compatibility generic method","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/nobs.mkinfit.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Number of observations on which an mkinfit object was fitted — nobs.mkinfit","text":"number rows data included mkinfit object","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/parms.html","id":null,"dir":"Reference","previous_headings":"","what":"Extract model parameters — parms","title":"Extract model parameters — parms","text":"function returns degradation model parameters well error model parameters per default, order avoid working fitted model without considering error structure assumed fit.","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/parms.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Extract model parameters — parms","text":"","code":"parms(object, ...) # S3 method for mkinfit parms(object, transformed = FALSE, errparms = TRUE, ...) # S3 method for mmkin parms(object, transformed = FALSE, errparms = TRUE, ...) # S3 method for multistart parms(object, exclude_failed = TRUE, ...) # S3 method for saem.mmkin parms(object, ci = FALSE, covariates = NULL, ...)"},{"path":"https://pkgdown.jrwb.de/mkin/reference/parms.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Extract model parameters — parms","text":"object fitted model object. ... used transformed parameters returned used internally optimisation? errparms error model parameters returned addition degradation parameters? exclude_failed multistart objects, rows failed fits removed returned parameter matrix? ci matrix estimates confidence interval boundaries returned? FALSE (default), vector estimates returned covariates given, otherwise matrix estimates returned, column corresponding row data frame holding covariates covariates data frame holding covariate values return parameter values. effect 'ci' FALSE.","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/parms.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Extract model parameters — parms","text":"Depending object, numeric vector fitted model parameters, matrix (e.g. mmkin row objects), list matrices (e.g. mmkin objects one row).","code":""},{"path":[]},{"path":"https://pkgdown.jrwb.de/mkin/reference/parms.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Extract model parameters — parms","text":"","code":"# mkinfit objects fit <- mkinfit(\"SFO\", FOCUS_2006_C, quiet = TRUE) parms(fit) #> parent_0 k_parent sigma #> 82.4921598 0.3060633 4.6730124 parms(fit, transformed = TRUE) #> parent_0 log_k_parent sigma #> 82.492160 -1.183963 4.673012 # mmkin objects ds <- lapply(experimental_data_for_UBA_2019[6:10], function(x) subset(x$data[c(\"name\", \"time\", \"value\")])) names(ds) <- paste(\"Dataset\", 6:10) # \\dontrun{ fits <- mmkin(c(\"SFO\", \"FOMC\", \"DFOP\"), ds, quiet = TRUE, cores = 1) parms(fits[\"SFO\", ]) #> Dataset 6 Dataset 7 Dataset 8 Dataset 9 Dataset 10 #> parent_0 88.52275400 82.666781678 86.8547308 91.7779306 82.14809450 #> k_parent 0.05794659 0.009647805 0.2102974 0.1232258 0.00720421 #> sigma 5.15274487 7.040168584 3.6769645 6.4669234 6.50457673 parms(fits[, 2]) #> $SFO #> Dataset 7 #> parent_0 82.666781678 #> k_parent 0.009647805 #> sigma 7.040168584 #> #> $FOMC #> Dataset 7 #> parent_0 92.6837649 #> alpha 0.4967832 #> beta 14.1451255 #> sigma 1.9167519 #> #> $DFOP #> Dataset 7 #> parent_0 91.058971584 #> k1 0.044946770 #> k2 0.002868336 #> g 0.526942414 #> sigma 2.221302196 #> parms(fits) #> $SFO #> Dataset 6 Dataset 7 Dataset 8 Dataset 9 Dataset 10 #> parent_0 88.52275400 82.666781678 86.8547308 91.7779306 82.14809450 #> k_parent 0.05794659 0.009647805 0.2102974 0.1232258 0.00720421 #> sigma 5.15274487 7.040168584 3.6769645 6.4669234 6.50457673 #> #> $FOMC #> Dataset 6 Dataset 7 Dataset 8 Dataset 9 Dataset 10 #> parent_0 95.558575 92.6837649 90.719787 98.383939 94.8481458 #> alpha 1.338667 0.4967832 1.639099 1.074460 0.2805272 #> beta 13.033315 14.1451255 5.007077 4.397126 6.9052224 #> sigma 1.847671 1.9167519 1.066063 3.146056 1.6222778 #> #> $DFOP #> Dataset 6 Dataset 7 Dataset 8 Dataset 9 Dataset 10 #> parent_0 96.55213663 91.058971584 90.34509493 98.14858820 94.311323735 #> k1 0.21954588 0.044946770 0.41232288 0.31697588 0.080663857 #> k2 0.02957934 0.002868336 0.07581766 0.03260384 0.003425417 #> g 0.44845068 0.526942414 0.66091967 0.65322767 0.342652880 #> sigma 1.35690468 2.221302196 1.34169076 2.87159846 1.942067831 #> parms(fits, transformed = TRUE) #> $SFO #> Dataset 6 Dataset 7 Dataset 8 Dataset 9 Dataset 10 #> parent_0 88.522754 82.666782 86.854731 91.777931 82.148095 #> log_k_parent -2.848234 -4.641025 -1.559232 -2.093737 -4.933090 #> sigma 5.152745 7.040169 3.676964 6.466923 6.504577 #> #> $FOMC #> Dataset 6 Dataset 7 Dataset 8 Dataset 9 Dataset 10 #> parent_0 95.5585751 92.6837649 90.7197870 98.38393898 94.848146 #> log_alpha 0.2916741 -0.6996015 0.4941466 0.07181816 -1.271085 #> log_beta 2.5675088 2.6493701 1.6108523 1.48095106 1.932278 #> sigma 1.8476712 1.9167519 1.0660627 3.14605557 1.622278 #> #> $DFOP #> Dataset 6 Dataset 7 Dataset 8 Dataset 9 Dataset 10 #> parent_0 96.5521366 91.0589716 90.3450949 98.1485882 94.3113237 #> log_k1 -1.5161940 -3.1022764 -0.8859486 -1.1489296 -2.5174647 #> log_k2 -3.5206791 -5.8540232 -2.5794240 -3.4233253 -5.6765322 #> g_qlogis -0.2069326 0.1078741 0.6673953 0.6332573 -0.6514943 #> sigma 1.3569047 2.2213022 1.3416908 2.8715985 1.9420678 #> # }"},{"path":"https://pkgdown.jrwb.de/mkin/reference/parplot.html","id":null,"dir":"Reference","previous_headings":"","what":"Plot parameter variability of multistart objects — parplot","title":"Plot parameter variability of multistart objects — parplot","text":"Produces boxplot parameters multiple runs, scaled either parameters run highest likelihood, medians proposed paper Duchesne et al. (2021).","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/parplot.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Plot parameter variability of multistart objects — parplot","text":"","code":"parplot(object, ...) # S3 method for multistart.saem.mmkin parplot( object, llmin = -Inf, llquant = NA, scale = c(\"best\", \"median\"), lpos = \"bottomleft\", main = \"\", ... )"},{"path":"https://pkgdown.jrwb.de/mkin/reference/parplot.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Plot parameter variability of multistart objects — parplot","text":"object multistart object ... Passed boxplot llmin minimum likelihood objects shown llquant Fractional value selecting fits higher likelihoods. Overrides 'llmin'. scale default, scale parameters using best available fit. 'median', parameters scaled using median parameters fits. lpos Positioning legend. main Title plot","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/parplot.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Plot parameter variability of multistart objects — parplot","text":"Starting values degradation model parameters error model parameters shown green circles. results obtained original run shown red circles.","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/parplot.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Plot parameter variability of multistart objects — parplot","text":"Duchesne R, Guillemin , Gandrillon O, Crauste F. Practical identifiability frame nonlinear mixed effects models: example vitro erythropoiesis. BMC Bioinformatics. 2021 Oct 4;22(1):478. doi: 10.1186/s12859-021-04373-4.","code":""},{"path":[]},{"path":"https://pkgdown.jrwb.de/mkin/reference/plot.mixed.mmkin.html","id":null,"dir":"Reference","previous_headings":"","what":"Plot predictions from a fitted nonlinear mixed model obtained via an mmkin row object — plot.mixed.mmkin","title":"Plot predictions from a fitted nonlinear mixed model obtained via an mmkin row object — plot.mixed.mmkin","text":"Plot predictions fitted nonlinear mixed model obtained via mmkin row object","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/plot.mixed.mmkin.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Plot predictions from a fitted nonlinear mixed model obtained via an mmkin row object — plot.mixed.mmkin","text":"","code":"# S3 method for mixed.mmkin plot( x, i = 1:ncol(x$mmkin), obs_vars = names(x$mkinmod$map), standardized = TRUE, covariates = NULL, covariate_quantiles = c(0.5, 0.05, 0.95), xlab = \"Time\", xlim = range(x$data$time), resplot = c(\"predicted\", \"time\"), pop_curves = \"auto\", pred_over = NULL, test_log_parms = FALSE, conf.level = 0.6, default_log_parms = NA, ymax = \"auto\", maxabs = \"auto\", ncol.legend = ifelse(length(i) <= 3, length(i) + 1, ifelse(length(i) <= 8, 3, 4)), nrow.legend = ceiling((length(i) + 1)/ncol.legend), rel.height.legend = 0.02 + 0.07 * nrow.legend, rel.height.bottom = 1.1, pch_ds = 1:length(i), col_ds = pch_ds + 1, lty_ds = col_ds, frame = TRUE, ... )"},{"path":"https://pkgdown.jrwb.de/mkin/reference/plot.mixed.mmkin.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Plot predictions from a fitted nonlinear mixed model obtained via an mmkin row object — plot.mixed.mmkin","text":"x object class mixed.mmkin, saem.mmkin nlme.mmkin numeric index select datasets plot individual predictions, case plots get large obs_vars character vector names observed variables data model plotted. Defauls observed variables model. standardized residuals standardized? takes effect resplot = \"time\". covariates Data frame covariate values variables covariate models object. given, overrides 'covariate_quantiles'. line data frame result line drawn population. Rownames used legend label lines. covariate_quantiles argument effect fitted object covariate models. , default show three population curves, 5th percentile, 50th percentile 95th percentile covariate values used fitting model. xlab Label x axis. xlim Plot range x direction. resplot residuals plotted time predicted values? pop_curves Per default, one population curve drawn case population parameters fitted model, e.g. saem objects. case covariate model, behaviour depends value 'covariates' pred_over Named list alternative predictions obtained mkinpredict compatible mkinmod. test_log_parms Passed mean_degparms case mixed.mmkin object conf.level Passed mean_degparms case mixed.mmkin object default_log_parms Passed mean_degparms case mixed.mmkin object ymax Vector maximum y axis values maxabs Maximum absolute value residuals. used scaling y axis defaults \"auto\". ncol.legend Number columns use legend nrow.legend Number rows use legend rel.height.legend relative height legend shown top rel.height.bottom relative height bottom plot row pch_ds Symbols used plotting data. col_ds Colors used plotting observed data corresponding model prediction lines different datasets. lty_ds Line types used model predictions. frame frame drawn around plots? ... arguments passed plot.","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/plot.mixed.mmkin.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Plot predictions from a fitted nonlinear mixed model obtained via an mmkin row object — plot.mixed.mmkin","text":"function called side effect.","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/plot.mixed.mmkin.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Plot predictions from a fitted nonlinear mixed model obtained via an mmkin row object — plot.mixed.mmkin","text":"Covariate models currently supported saem.mmkin objects.","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/plot.mixed.mmkin.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Plot predictions from a fitted nonlinear mixed model obtained via an mmkin row object — plot.mixed.mmkin","text":"Johannes Ranke","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/plot.mixed.mmkin.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Plot predictions from a fitted nonlinear mixed model obtained via an mmkin row object — plot.mixed.mmkin","text":"","code":"ds <- lapply(experimental_data_for_UBA_2019[6:10], function(x) x$data[c(\"name\", \"time\", \"value\")]) names(ds) <- paste0(\"ds \", 6:10) dfop_sfo <- mkinmod(parent = mkinsub(\"DFOP\", \"A1\"), A1 = mkinsub(\"SFO\"), quiet = TRUE) # \\dontrun{ f <- mmkin(list(\"DFOP-SFO\" = dfop_sfo), ds, quiet = TRUE) plot(f[, 3:4], standardized = TRUE) # For this fit we need to increase pnlsMaxiter, and we increase the # tolerance in order to speed up the fit for this example evaluation # It still takes 20 seconds to run f_nlme <- nlme(f, control = list(pnlsMaxIter = 120, tolerance = 1e-3)) plot(f_nlme) f_saem <- saem(f, transformations = \"saemix\") plot(f_saem) f_obs <- mmkin(list(\"DFOP-SFO\" = dfop_sfo), ds, quiet = TRUE, error_model = \"obs\") f_nlmix <- nlmix(f_obs) #> Error in nlmix(f_obs): could not find function \"nlmix\" plot(f_nlmix) #> Error in eval(expr, envir, enclos): object 'f_nlmix' not found # We can overlay the two variants if we generate predictions pred_nlme <- mkinpredict(dfop_sfo, f_nlme$bparms.optim[-1], c(parent = f_nlme$bparms.optim[[1]], A1 = 0), seq(0, 180, by = 0.2)) plot(f_saem, pred_over = list(nlme = pred_nlme)) # }"},{"path":"https://pkgdown.jrwb.de/mkin/reference/plot.mkinfit.html","id":null,"dir":"Reference","previous_headings":"","what":"Plot the observed data and the fitted model of an mkinfit object — plot.mkinfit","title":"Plot the observed data and the fitted model of an mkinfit object — plot.mkinfit","text":"Solves differential equations optimised fixed parameters previous successful call mkinfit plots observed data together solution fitted model.","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/plot.mkinfit.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Plot the observed data and the fitted model of an mkinfit object — plot.mkinfit","text":"","code":"# S3 method for mkinfit plot( x, fit = x, obs_vars = names(fit$mkinmod$map), xlab = \"Time\", ylab = \"Residue\", 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, ...)"},{"path":"https://pkgdown.jrwb.de/mkin/reference/plot.mkinfit.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Plot the observed data and the fitted model of an mkinfit object — plot.mkinfit","text":"x Alias fit introduced compatibility generic S3 method. fit object class mkinfit. obs_vars character vector names observed variables data model plotted. Defauls observed variables model. xlab Label x axis. ylab Label y axis. xlim Plot range x direction. ylim Plot range y direction. given list, plot ranges different plot rows can given row layout. col_obs Colors used plotting observed data corresponding model prediction lines. pch_obs Symbols used plotting data. lty_obs Line types used model predictions. add plot added existing plot? legend legend added plot? show_residuals residuals shown? one plot fits shown, residual plot lower third plot. Otherwise, .e. \"sep_obs\" given, residual plots located right plots fitted curves. set 'standardized', plot residuals divided standard deviation given fitted error model shown. show_errplot squared residuals error model shown? one plot fits shown, plot lower third plot. Otherwise, .e. \"sep_obs\" given, residual plots located right plots fitted curves. maxabs Maximum absolute value residuals. used scaling y axis defaults \"auto\". sep_obs observed variables shown separate subplots? yes, residual plots requested \"show_residuals\" shown next , plot fits. rel.height.middle relative height middle plot, two rows plots shown. row_layout use row layout residual plot error model plot shown right? lpos Position(s) legend(s). Passed legend first argument. length one, length obs_var argument. inset Passed legend applicable. show_errmin FOCUS chi2 error value shown upper margin plot? errmin_digits number significant digits rounding FOCUS chi2 error percentage. frame frame drawn around plots? ... arguments passed plot. standardized calling 'plot_res', residuals standardized residual plot?","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/plot.mkinfit.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Plot the observed data and the fitted model of an mkinfit object — plot.mkinfit","text":"function called side effect.","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/plot.mkinfit.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Plot the observed data and the fitted model of an mkinfit object — plot.mkinfit","text":"current plot device tikz device, latex used formatting chi2 error level, show_errmin = TRUE.","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/plot.mkinfit.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Plot the observed data and the fitted model of an mkinfit object — plot.mkinfit","text":"Johannes Ranke","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/plot.mkinfit.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Plot the observed data and the fitted model of an mkinfit object — plot.mkinfit","text":"","code":"# One parent compound, one metabolite, both single first order, path from # parent to sink included # \\dontrun{ SFO_SFO <- mkinmod(parent = mkinsub(\"SFO\", \"m1\", full = \"Parent\"), m1 = mkinsub(\"SFO\", full = \"Metabolite M1\" )) #> Temporary DLL for differentials generated and loaded fit <- mkinfit(SFO_SFO, FOCUS_2006_D, quiet = TRUE) #> Warning: Observations with value of zero were removed from the data fit <- mkinfit(SFO_SFO, FOCUS_2006_D, quiet = TRUE, error_model = \"tc\") #> Warning: Observations with value of zero were removed from the data plot(fit) plot_res(fit) plot_res(fit, standardized = FALSE) plot_err(fit) # Show the observed variables separately, with residuals plot(fit, sep_obs = TRUE, show_residuals = TRUE, lpos = c(\"topright\", \"bottomright\"), show_errmin = TRUE) # The same can be obtained with less typing, using the convenience function plot_sep plot_sep(fit, lpos = c(\"topright\", \"bottomright\")) # Show the observed variables separately, with the error model plot(fit, sep_obs = TRUE, show_errplot = TRUE, lpos = c(\"topright\", \"bottomright\"), show_errmin = TRUE) # }"},{"path":"https://pkgdown.jrwb.de/mkin/reference/plot.mmkin.html","id":null,"dir":"Reference","previous_headings":"","what":"Plot model fits (observed and fitted) and the residuals for a row or column\nof an mmkin object — plot.mmkin","title":"Plot model fits (observed and fitted) and the residuals for a row or column\nof an mmkin object — plot.mmkin","text":"x row selected mmkin object ([.mmkin), model fitted least one dataset shown. column, fit least one model dataset shown.","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/plot.mmkin.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Plot model fits (observed and fitted) and the residuals for a row or column\nof an mmkin object — plot.mmkin","text":"","code":"# S3 method for mmkin plot( x, main = \"auto\", legends = 1, resplot = c(\"time\", \"errmod\"), ylab = \"Residue\", standardized = FALSE, show_errmin = TRUE, errmin_var = \"All data\", errmin_digits = 3, cex = 0.7, rel.height.middle = 0.9, ymax = \"auto\", ... )"},{"path":"https://pkgdown.jrwb.de/mkin/reference/plot.mmkin.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Plot model fits (observed and fitted) and the residuals for a row or column\nof an mmkin object — plot.mmkin","text":"x object class mmkin, either one row one column. main main title placed outer margin plot. legends index fits legends shown. resplot residuals plotted time, using mkinresplot, squared residuals predicted values, error model, using mkinerrplot. ylab Label y axis. standardized residuals standardized? option passed mkinresplot, takes effect resplot = \"time\". show_errmin chi2 error level shown top plots left? errmin_var variable FOCUS chi2 error value shown. errmin_digits number significant digits rounding FOCUS chi2 error percentage. cex Passed plot functions mtext. rel.height.middle relative height middle plot, two rows plots shown. ymax Maximum y axis value plot.mkinfit. ... arguments passed plot.mkinfit mkinresplot.","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/plot.mmkin.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Plot model fits (observed and fitted) and the residuals for a row or column\nof an mmkin object — plot.mmkin","text":"function called side effect.","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/plot.mmkin.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Plot model fits (observed and fitted) and the residuals for a row or column\nof an mmkin object — plot.mmkin","text":"current plot device tikz device, latex used formatting chi2 error level.","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/plot.mmkin.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Plot model fits (observed and fitted) and the residuals for a row or column\nof an mmkin object — plot.mmkin","text":"Johannes Ranke","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/plot.mmkin.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Plot model fits (observed and fitted) and the residuals for a row or column\nof an mmkin object — plot.mmkin","text":"","code":"# \\dontrun{ # Only use one core not to offend CRAN checks fits <- mmkin(c(\"FOMC\", \"HS\"), list(\"FOCUS B\" = FOCUS_2006_B, \"FOCUS C\" = FOCUS_2006_C), # named list for titles cores = 1, quiet = TRUE, error_model = \"tc\") #> Warning: Optimisation did not converge: #> iteration limit reached without convergence (10) plot(fits[, \"FOCUS C\"]) plot(fits[\"FOMC\", ]) plot(fits[\"FOMC\", ], show_errmin = FALSE) # We can also plot a single fit, if we like the way plot.mmkin works, but then the plot # height should be smaller than the plot width (this is not possible for the html pages # generated by pkgdown, as far as I know). plot(fits[\"FOMC\", \"FOCUS C\"]) # same as plot(fits[1, 2]) # Show the error models plot(fits[\"FOMC\", ], resplot = \"errmod\") # }"},{"path":"https://pkgdown.jrwb.de/mkin/reference/plot.nafta.html","id":null,"dir":"Reference","previous_headings":"","what":"Plot the results of the three models used in the NAFTA scheme. — plot.nafta","title":"Plot the results of the three models used in the NAFTA scheme. — plot.nafta","text":"plots ordered increasing complexity model function (SFO, IORE, DFOP).","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/plot.nafta.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Plot the results of the three models used in the NAFTA scheme. — plot.nafta","text":"","code":"# S3 method for nafta plot(x, legend = FALSE, main = \"auto\", ...)"},{"path":"https://pkgdown.jrwb.de/mkin/reference/plot.nafta.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Plot the results of the three models used in the NAFTA scheme. — plot.nafta","text":"x object class nafta. legend legend added? main Possibility override main title plot. ... arguments passed plot.mmkin.","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/plot.nafta.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Plot the results of the three models used in the NAFTA scheme. — plot.nafta","text":"function called side effect.","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/plot.nafta.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Plot the results of the three models used in the NAFTA scheme. — plot.nafta","text":"Calls plot.mmkin.","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/plot.nafta.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Plot the results of the three models used in the NAFTA scheme. — plot.nafta","text":"Johannes Ranke","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/read_spreadsheet.html","id":null,"dir":"Reference","previous_headings":"","what":"Read datasets and relevant meta information from a spreadsheet file — read_spreadsheet","title":"Read datasets and relevant meta information from a spreadsheet file — read_spreadsheet","text":"function imports one dataset sheet spreadsheet file. sheets selected based contents sheet 'Datasets', column called 'Dataset Number', containing numbers identifying dataset sheets read . second column must grouping variable, often named 'Soil'. Optionally, time normalization factors can given columns named 'Temperature' 'Moisture'.","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/read_spreadsheet.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Read datasets and relevant meta information from a spreadsheet file — read_spreadsheet","text":"","code":"read_spreadsheet( path, valid_datasets = \"all\", parent_only = FALSE, normalize = TRUE )"},{"path":"https://pkgdown.jrwb.de/mkin/reference/read_spreadsheet.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Read datasets and relevant meta information from a spreadsheet file — read_spreadsheet","text":"path Absolute relative path spreadsheet file valid_datasets Optional numeric index valid datasets, default use datasets parent_only parent data used? normalize time scale normalized using temperature moisture normalisation factors sheet 'Datasets'?","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/read_spreadsheet.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Read datasets and relevant meta information from a spreadsheet file — read_spreadsheet","text":"must sheet 'Compounds', columns 'Name' 'Acronym'. first row read header read sheet assumed contain name acronym parent compound. dataset sheets named using dataset numbers read 'Datasets' sheet, .e. '1', '2', ... . dataset sheet, name observed variable (e.g. acronym parent compound one transformation products) first column, time values second colum, observed value third column. case relevant covariate data available, given sheet 'Covariates', containing one line value grouping variable specified 'Datasets'. values first column column must name second column 'Datasets'. Covariates read columns four higher. names preferably contain special characters like spaces, can easily used specifying covariate models. similar data structure defined R6 class mkindsg, probably complicated use.","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/reexports.html","id":null,"dir":"Reference","previous_headings":"","what":"Objects exported from other packages — reexports","title":"Objects exported from other packages — reexports","text":"objects imported packages. Follow links see documentation. lmtest lrtest nlme intervals, nlme","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/residuals.mkinfit.html","id":null,"dir":"Reference","previous_headings":"","what":"Extract residuals from an mkinfit model — residuals.mkinfit","title":"Extract residuals from an mkinfit model — residuals.mkinfit","text":"Extract residuals mkinfit model","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/residuals.mkinfit.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Extract residuals from an mkinfit model — residuals.mkinfit","text":"","code":"# S3 method for mkinfit residuals(object, standardized = FALSE, ...)"},{"path":"https://pkgdown.jrwb.de/mkin/reference/residuals.mkinfit.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Extract residuals from an mkinfit model — residuals.mkinfit","text":"object mkinfit object standardized residuals standardized dividing standard deviation obtained fitted error model? ... used","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/residuals.mkinfit.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Extract residuals from an mkinfit model — residuals.mkinfit","text":"","code":"f <- mkinfit(\"DFOP\", FOCUS_2006_C, quiet = TRUE) residuals(f) #> [1] 0.09726374 -0.13912142 -0.15351210 0.73388322 -0.08657004 -0.93204702 #> [7] -0.03269080 1.45347823 -0.88423697 residuals(f, standardized = TRUE) #> [1] 0.13969917 -0.19981904 -0.22048826 1.05407091 -0.12433989 -1.33869208 #> [7] -0.04695355 2.08761977 -1.27002287"},{"path":"https://pkgdown.jrwb.de/mkin/reference/saem.html","id":null,"dir":"Reference","previous_headings":"","what":"Fit nonlinear mixed models with SAEM — saem","title":"Fit nonlinear mixed models with SAEM — saem","text":"function uses saemix::saemix() backend fitting nonlinear mixed effects models created mmkin row objects using Stochastic Approximation Expectation Maximisation algorithm (SAEM).","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/saem.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Fit nonlinear mixed models with SAEM — saem","text":"","code":"saem(object, ...) # S3 method for mmkin saem( object, transformations = c(\"mkin\", \"saemix\"), error_model = \"auto\", degparms_start = numeric(), test_log_parms = TRUE, conf.level = 0.6, solution_type = \"auto\", covariance.model = \"auto\", omega.init = \"auto\", covariates = NULL, covariate_models = NULL, no_random_effect = NULL, error.init = c(1, 1), nbiter.saemix = c(300, 100), control = list(displayProgress = FALSE, print = FALSE, nbiter.saemix = nbiter.saemix, save = FALSE, save.graphs = FALSE), verbose = FALSE, quiet = FALSE, ... ) # S3 method for saem.mmkin print(x, digits = max(3, getOption(\"digits\") - 3), ...) saemix_model( object, solution_type = \"auto\", transformations = c(\"mkin\", \"saemix\"), error_model = \"auto\", degparms_start = numeric(), covariance.model = \"auto\", no_random_effect = NULL, omega.init = \"auto\", covariates = NULL, covariate_models = NULL, error.init = numeric(), test_log_parms = FALSE, conf.level = 0.6, verbose = FALSE, ... ) saemix_data(object, covariates = NULL, verbose = FALSE, ...)"},{"path":"https://pkgdown.jrwb.de/mkin/reference/saem.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Fit nonlinear mixed models with SAEM — saem","text":"object mmkin row object containing several fits mkinmod model different datasets ... parameters passed saemix::saemixModel. transformations Per default, parameter transformations done mkin. argument set 'saemix', parameter transformations done 'saemix' supported cases, .e. (version 1.1.2) SFO, FOMC, DFOP HS without fixing parent_0, SFO DFOP one SFO metabolite. error_model Possibility override error model used mmkin object degparms_start Parameter values given named numeric vector used override starting values obtained 'mmkin' object. test_log_parms TRUE, attempt made use robust starting values population parameters fitted log parameters mkin (like rate constants) considering rate constants pass t-test calculating mean degradation parameters using mean_degparms. conf.level Possibility adjust required confidence level parameter tested requested 'test_log_parms'. solution_type Possibility specify solution type case automatic choice desired covariance.model passed saemix::saemixModel(). Per default, uncorrelated random effects specified degradation parameters. omega.init passed saemix::saemixModel(). using mkin transformations default covariance model optionally excluded random effects, variances degradation parameters estimated using mean_degparms, testing untransformed log parameters significant difference zero. using mkin transformations custom covariance model, default initialisation saemix::saemixModel used omega.init. covariates data frame covariate data use 'covariate_models', dataset names row names. covariate_models list containing linear model formulas one explanatory variable, .e. type 'parameter ~ covariate'. Covariates must available 'covariates' data frame. no_random_effect Character vector degradation parameters variability groups. used covariance model explicitly specified. error.init passed saemix::saemixModel(). nbiter.saemix Convenience option increase number iterations control Passed saemix::saemix. verbose print information created objects type saemix::SaemixModel saemix::SaemixData? quiet suppress messages saemix prints beginning end optimisation process? x saem.mmkin object print digits Number digits use printing","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/saem.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Fit nonlinear mixed models with SAEM — saem","text":"S3 object class 'saem.mmkin', containing fitted saemix::SaemixObject list component named ''. object also inherits 'mixed.mmkin'. saemix::SaemixModel object. saemix::SaemixData object.","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/saem.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Fit nonlinear mixed models with SAEM — saem","text":"mmkin row object essentially list mkinfit objects obtained fitting model list datasets using mkinfit. Starting values fixed effects (population mean parameters, argument psi0 saemix::saemixModel() mean values parameters found using mmkin.","code":""},{"path":[]},{"path":"https://pkgdown.jrwb.de/mkin/reference/saem.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Fit nonlinear mixed models with SAEM — saem","text":"","code":"# \\dontrun{ ds <- lapply(experimental_data_for_UBA_2019[6:10], function(x) subset(x$data[c(\"name\", \"time\", \"value\")])) names(ds) <- paste(\"Dataset\", 6:10) f_mmkin_parent_p0_fixed <- mmkin(\"FOMC\", ds, state.ini = c(parent = 100), fixed_initials = \"parent\", quiet = TRUE) f_saem_p0_fixed <- saem(f_mmkin_parent_p0_fixed) f_mmkin_parent <- mmkin(c(\"SFO\", \"FOMC\", \"DFOP\"), ds, quiet = TRUE) f_saem_sfo <- saem(f_mmkin_parent[\"SFO\", ]) f_saem_fomc <- saem(f_mmkin_parent[\"FOMC\", ]) f_saem_dfop <- saem(f_mmkin_parent[\"DFOP\", ]) anova(f_saem_sfo, f_saem_fomc, f_saem_dfop) #> Data: 90 observations of 1 variable(s) grouped in 5 datasets #> #> npar AIC BIC Lik #> f_saem_sfo 5 624.33 622.38 -307.17 #> f_saem_fomc 7 467.85 465.11 -226.92 #> f_saem_dfop 9 493.76 490.24 -237.88 anova(f_saem_sfo, f_saem_dfop, test = TRUE) #> Data: 90 observations of 1 variable(s) grouped in 5 datasets #> #> npar AIC BIC Lik Chisq Df Pr(>Chisq) #> f_saem_sfo 5 624.33 622.38 -307.17 #> f_saem_dfop 9 493.76 490.24 -237.88 138.57 4 < 2.2e-16 *** #> --- #> Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 illparms(f_saem_dfop) #> [1] \"sd(g_qlogis)\" f_saem_dfop_red <- update(f_saem_dfop, no_random_effect = \"g_qlogis\") anova(f_saem_dfop, f_saem_dfop_red, test = TRUE) #> Data: 90 observations of 1 variable(s) grouped in 5 datasets #> #> npar AIC BIC Lik Chisq Df Pr(>Chisq) #> f_saem_dfop_red 8 488.68 485.55 -236.34 #> f_saem_dfop 9 493.76 490.24 -237.88 0 1 1 anova(f_saem_sfo, f_saem_fomc, f_saem_dfop) #> Data: 90 observations of 1 variable(s) grouped in 5 datasets #> #> npar AIC BIC Lik #> f_saem_sfo 5 624.33 622.38 -307.17 #> f_saem_fomc 7 467.85 465.11 -226.92 #> f_saem_dfop 9 493.76 490.24 -237.88 # The returned saem.mmkin object contains an SaemixObject, therefore we can use # functions from saemix library(saemix) #> Loading required package: npde #> Package saemix, version 3.2 #> please direct bugs, questions and feedback to emmanuelle.comets@inserm.fr #> #> Attaching package: ‘saemix’ #> The following objects are masked from ‘package:npde’: #> #> kurtosis, skewness compare.saemix(f_saem_sfo$so, f_saem_fomc$so, f_saem_dfop$so) #> Likelihoods calculated by importance sampling #> AIC BIC #> 1 624.3316 622.3788 #> 2 467.8472 465.1132 #> 3 493.7592 490.2441 plot(f_saem_fomc$so, plot.type = \"convergence\") plot(f_saem_fomc$so, plot.type = \"individual.fit\") #> Simulating data using nsim = 1000 simulated datasets #> Computing WRES and npde . plot(f_saem_fomc$so, plot.type = \"npde\") #> Simulating data using nsim = 1000 simulated datasets #> Computing WRES and npde . #> Please use npdeSaemix to obtain VPC and npde plot(f_saem_fomc$so, plot.type = \"vpc\") f_mmkin_parent_tc <- update(f_mmkin_parent, error_model = \"tc\") f_saem_fomc_tc <- saem(f_mmkin_parent_tc[\"FOMC\", ]) anova(f_saem_fomc, f_saem_fomc_tc, test = TRUE) #> Data: 90 observations of 1 variable(s) grouped in 5 datasets #> #> npar AIC BIC Lik Chisq Df Pr(>Chisq) #> f_saem_fomc 7 467.85 465.11 -226.92 #> f_saem_fomc_tc 8 469.90 466.77 -226.95 0 1 1 sfo_sfo <- mkinmod(parent = mkinsub(\"SFO\", \"A1\"), A1 = mkinsub(\"SFO\")) #> Temporary DLL for differentials generated and loaded fomc_sfo <- mkinmod(parent = mkinsub(\"FOMC\", \"A1\"), A1 = mkinsub(\"SFO\")) #> Temporary DLL for differentials generated and loaded dfop_sfo <- mkinmod(parent = mkinsub(\"DFOP\", \"A1\"), A1 = mkinsub(\"SFO\")) #> Temporary DLL for differentials generated and loaded # The following fit uses analytical solutions for SFO-SFO and DFOP-SFO, # and compiled ODEs for FOMC that are much slower f_mmkin <- mmkin(list( \"SFO-SFO\" = sfo_sfo, \"FOMC-SFO\" = fomc_sfo, \"DFOP-SFO\" = dfop_sfo), ds, quiet = TRUE) # saem fits of SFO-SFO and DFOP-SFO to these data take about five seconds # each on this system, as we use analytical solutions written for saemix. # When using the analytical solutions written for mkin this took around # four minutes f_saem_sfo_sfo <- saem(f_mmkin[\"SFO-SFO\", ]) f_saem_dfop_sfo <- saem(f_mmkin[\"DFOP-SFO\", ]) # We can use print, plot and summary methods to check the results print(f_saem_dfop_sfo) #> Kinetic nonlinear mixed-effects model fit by SAEM #> Structural model: #> d_parent/dt = - ((k1 * g * exp(-k1 * time) + k2 * (1 - g) * exp(-k2 * #> time)) / (g * exp(-k1 * time) + (1 - g) * exp(-k2 * time))) #> * parent #> d_A1/dt = + f_parent_to_A1 * ((k1 * g * exp(-k1 * time) + k2 * (1 - g) #> * exp(-k2 * time)) / (g * exp(-k1 * time) + (1 - g) * #> exp(-k2 * time))) * parent - k_A1 * A1 #> #> Data: #> 170 observations of 2 variable(s) grouped in 5 datasets #> #> Likelihood computed by importance sampling #> AIC BIC logLik #> 839.2 834.1 -406.6 #> #> Fitted parameters: #> estimate lower upper #> parent_0 93.70402 91.04104 96.3670 #> log_k_A1 -5.83760 -7.66452 -4.0107 #> f_parent_qlogis -0.95718 -1.35955 -0.5548 #> log_k1 -2.35514 -3.39402 -1.3163 #> log_k2 -3.79634 -5.64009 -1.9526 #> g_qlogis -0.02108 -0.66463 0.6225 #> a.1 1.88191 1.66491 2.0989 #> SD.parent_0 2.81628 0.78922 4.8433 #> SD.log_k_A1 1.78751 0.42105 3.1540 #> SD.f_parent_qlogis 0.45016 0.16116 0.7391 #> SD.log_k1 1.06923 0.31676 1.8217 #> SD.log_k2 2.03768 0.70938 3.3660 #> SD.g_qlogis 0.44024 -0.09262 0.9731 plot(f_saem_dfop_sfo) summary(f_saem_dfop_sfo, data = TRUE) #> saemix version used for fitting: 3.2 #> mkin version used for pre-fitting: 1.2.6 #> R version used for fitting: 4.3.2 #> Date of fit: Thu Nov 16 04:17:34 2023 #> Date of summary: Thu Nov 16 04:17:34 2023 #> #> Equations: #> d_parent/dt = - ((k1 * g * exp(-k1 * time) + k2 * (1 - g) * exp(-k2 * #> time)) / (g * exp(-k1 * time) + (1 - g) * exp(-k2 * time))) #> * parent #> d_A1/dt = + f_parent_to_A1 * ((k1 * g * exp(-k1 * time) + k2 * (1 - g) #> * exp(-k2 * time)) / (g * exp(-k1 * time) + (1 - g) * #> exp(-k2 * time))) * parent - k_A1 * A1 #> #> Data: #> 170 observations of 2 variable(s) grouped in 5 datasets #> #> Model predictions using solution type analytical #> #> Fitted in 3.385 s #> Using 300, 100 iterations and 10 chains #> #> Variance model: Constant variance #> #> Starting values for degradation parameters: #> parent_0 log_k_A1 f_parent_qlogis log_k1 log_k2 #> 93.8102 -5.3734 -0.9711 -1.8799 -4.2708 #> g_qlogis #> 0.1356 #> #> Fixed degradation parameter values: #> None #> #> Starting values for random effects (square root of initial entries in omega): #> parent_0 log_k_A1 f_parent_qlogis log_k1 log_k2 g_qlogis #> parent_0 4.941 0.000 0.0000 0.000 0.000 0.0000 #> log_k_A1 0.000 2.551 0.0000 0.000 0.000 0.0000 #> f_parent_qlogis 0.000 0.000 0.7251 0.000 0.000 0.0000 #> log_k1 0.000 0.000 0.0000 1.449 0.000 0.0000 #> log_k2 0.000 0.000 0.0000 0.000 2.228 0.0000 #> g_qlogis 0.000 0.000 0.0000 0.000 0.000 0.7814 #> #> Starting values for error model parameters: #> a.1 #> 1 #> #> Results: #> #> Likelihood computed by importance sampling #> AIC BIC logLik #> 839.2 834.1 -406.6 #> #> Optimised parameters: #> est. lower upper #> parent_0 93.70402 91.04104 96.3670 #> log_k_A1 -5.83760 -7.66452 -4.0107 #> f_parent_qlogis -0.95718 -1.35955 -0.5548 #> log_k1 -2.35514 -3.39402 -1.3163 #> log_k2 -3.79634 -5.64009 -1.9526 #> g_qlogis -0.02108 -0.66463 0.6225 #> a.1 1.88191 1.66491 2.0989 #> SD.parent_0 2.81628 0.78922 4.8433 #> SD.log_k_A1 1.78751 0.42105 3.1540 #> SD.f_parent_qlogis 0.45016 0.16116 0.7391 #> SD.log_k1 1.06923 0.31676 1.8217 #> SD.log_k2 2.03768 0.70938 3.3660 #> SD.g_qlogis 0.44024 -0.09262 0.9731 #> #> Correlation: #> parnt_0 lg_k_A1 f_prnt_ log_k1 log_k2 #> log_k_A1 -0.0147 #> f_parent_qlogis -0.0269 0.0573 #> log_k1 0.0263 -0.0011 -0.0040 #> log_k2 0.0020 0.0065 -0.0002 -0.0776 #> g_qlogis -0.0248 -0.0180 -0.0004 -0.0903 -0.0603 #> #> Random effects: #> est. lower upper #> SD.parent_0 2.8163 0.78922 4.8433 #> SD.log_k_A1 1.7875 0.42105 3.1540 #> SD.f_parent_qlogis 0.4502 0.16116 0.7391 #> SD.log_k1 1.0692 0.31676 1.8217 #> SD.log_k2 2.0377 0.70938 3.3660 #> SD.g_qlogis 0.4402 -0.09262 0.9731 #> #> Variance model: #> est. lower upper #> a.1 1.882 1.665 2.099 #> #> Backtransformed parameters: #> est. lower upper #> parent_0 93.704015 9.104e+01 96.36699 #> k_A1 0.002916 4.692e-04 0.01812 #> f_parent_to_A1 0.277443 2.043e-01 0.36475 #> k1 0.094880 3.357e-02 0.26813 #> k2 0.022453 3.553e-03 0.14191 #> g 0.494731 3.397e-01 0.65078 #> #> Resulting formation fractions: #> ff #> parent_A1 0.2774 #> parent_sink 0.7226 #> #> Estimated disappearance times: #> DT50 DT90 DT50back DT50_k1 DT50_k2 #> parent 14.0 72.38 21.79 7.306 30.87 #> A1 237.7 789.68 NA NA NA #> #> Data: #> ds name time observed predicted residual std standardized #> Dataset 6 parent 0 97.2 95.70025 1.49975 1.882 0.79693 #> Dataset 6 parent 0 96.4 95.70025 0.69975 1.882 0.37183 #> Dataset 6 parent 3 71.1 71.44670 -0.34670 1.882 -0.18423 #> Dataset 6 parent 3 69.2 71.44670 -2.24670 1.882 -1.19384 #> Dataset 6 parent 6 58.1 56.59283 1.50717 1.882 0.80087 #> Dataset 6 parent 6 56.6 56.59283 0.00717 1.882 0.00381 #> Dataset 6 parent 10 44.4 44.56648 -0.16648 1.882 -0.08847 #> Dataset 6 parent 10 43.4 44.56648 -1.16648 1.882 -0.61984 #> Dataset 6 parent 20 33.3 29.76020 3.53980 1.882 1.88096 #> Dataset 6 parent 20 29.2 29.76020 -0.56020 1.882 -0.29767 #> Dataset 6 parent 34 17.6 19.39208 -1.79208 1.882 -0.95226 #> Dataset 6 parent 34 18.0 19.39208 -1.39208 1.882 -0.73971 #> Dataset 6 parent 55 10.5 10.55761 -0.05761 1.882 -0.03061 #> Dataset 6 parent 55 9.3 10.55761 -1.25761 1.882 -0.66826 #> Dataset 6 parent 90 4.5 3.84742 0.65258 1.882 0.34676 #> Dataset 6 parent 90 4.7 3.84742 0.85258 1.882 0.45304 #> Dataset 6 parent 112 3.0 2.03997 0.96003 1.882 0.51013 #> Dataset 6 parent 112 3.4 2.03997 1.36003 1.882 0.72268 #> Dataset 6 parent 132 2.3 1.14585 1.15415 1.882 0.61328 #> Dataset 6 parent 132 2.7 1.14585 1.55415 1.882 0.82583 #> Dataset 6 A1 3 4.3 4.86054 -0.56054 1.882 -0.29786 #> Dataset 6 A1 3 4.6 4.86054 -0.26054 1.882 -0.13844 #> Dataset 6 A1 6 7.0 7.74179 -0.74179 1.882 -0.39417 #> Dataset 6 A1 6 7.2 7.74179 -0.54179 1.882 -0.28789 #> Dataset 6 A1 10 8.2 9.94048 -1.74048 1.882 -0.92485 #> Dataset 6 A1 10 8.0 9.94048 -1.94048 1.882 -1.03112 #> Dataset 6 A1 20 11.0 12.19109 -1.19109 1.882 -0.63291 #> Dataset 6 A1 20 13.7 12.19109 1.50891 1.882 0.80180 #> Dataset 6 A1 34 11.5 13.10706 -1.60706 1.882 -0.85395 #> Dataset 6 A1 34 12.7 13.10706 -0.40706 1.882 -0.21630 #> Dataset 6 A1 55 14.9 13.06131 1.83869 1.882 0.97703 #> Dataset 6 A1 55 14.5 13.06131 1.43869 1.882 0.76448 #> Dataset 6 A1 90 12.1 11.54495 0.55505 1.882 0.29494 #> Dataset 6 A1 90 12.3 11.54495 0.75505 1.882 0.40122 #> Dataset 6 A1 112 9.9 10.31533 -0.41533 1.882 -0.22070 #> Dataset 6 A1 112 10.2 10.31533 -0.11533 1.882 -0.06128 #> Dataset 6 A1 132 8.8 9.20222 -0.40222 1.882 -0.21373 #> Dataset 6 A1 132 7.8 9.20222 -1.40222 1.882 -0.74510 #> Dataset 7 parent 0 93.6 90.82357 2.77643 1.882 1.47532 #> Dataset 7 parent 0 92.3 90.82357 1.47643 1.882 0.78453 #> Dataset 7 parent 3 87.0 84.73448 2.26552 1.882 1.20384 #> Dataset 7 parent 3 82.2 84.73448 -2.53448 1.882 -1.34675 #> Dataset 7 parent 7 74.0 77.65013 -3.65013 1.882 -1.93958 #> Dataset 7 parent 7 73.9 77.65013 -3.75013 1.882 -1.99272 #> Dataset 7 parent 14 64.2 67.60639 -3.40639 1.882 -1.81007 #> Dataset 7 parent 14 69.5 67.60639 1.89361 1.882 1.00621 #> Dataset 7 parent 30 54.0 52.53663 1.46337 1.882 0.77760 #> Dataset 7 parent 30 54.6 52.53663 2.06337 1.882 1.09642 #> Dataset 7 parent 60 41.1 39.42728 1.67272 1.882 0.88884 #> Dataset 7 parent 60 38.4 39.42728 -1.02728 1.882 -0.54587 #> Dataset 7 parent 90 32.5 33.76360 -1.26360 1.882 -0.67144 #> Dataset 7 parent 90 35.5 33.76360 1.73640 1.882 0.92268 #> Dataset 7 parent 120 28.1 30.39975 -2.29975 1.882 -1.22203 #> Dataset 7 parent 120 29.0 30.39975 -1.39975 1.882 -0.74379 #> Dataset 7 parent 180 26.5 25.62379 0.87621 1.882 0.46559 #> Dataset 7 parent 180 27.6 25.62379 1.97621 1.882 1.05010 #> Dataset 7 A1 3 3.9 2.70005 1.19995 1.882 0.63762 #> Dataset 7 A1 3 3.1 2.70005 0.39995 1.882 0.21252 #> Dataset 7 A1 7 6.9 5.83475 1.06525 1.882 0.56605 #> Dataset 7 A1 7 6.6 5.83475 0.76525 1.882 0.40663 #> Dataset 7 A1 14 10.4 10.26142 0.13858 1.882 0.07364 #> Dataset 7 A1 14 8.3 10.26142 -1.96142 1.882 -1.04225 #> Dataset 7 A1 30 14.4 16.82999 -2.42999 1.882 -1.29123 #> Dataset 7 A1 30 13.7 16.82999 -3.12999 1.882 -1.66319 #> Dataset 7 A1 60 22.1 22.32486 -0.22486 1.882 -0.11949 #> Dataset 7 A1 60 22.3 22.32486 -0.02486 1.882 -0.01321 #> Dataset 7 A1 90 27.5 24.45927 3.04073 1.882 1.61576 #> Dataset 7 A1 90 25.4 24.45927 0.94073 1.882 0.49988 #> Dataset 7 A1 120 28.0 25.54862 2.45138 1.882 1.30260 #> Dataset 7 A1 120 26.6 25.54862 1.05138 1.882 0.55868 #> Dataset 7 A1 180 25.8 26.82277 -1.02277 1.882 -0.54347 #> Dataset 7 A1 180 25.3 26.82277 -1.52277 1.882 -0.80916 #> Dataset 8 parent 0 91.9 91.16791 0.73209 1.882 0.38901 #> Dataset 8 parent 0 90.8 91.16791 -0.36791 1.882 -0.19550 #> Dataset 8 parent 1 64.9 67.58358 -2.68358 1.882 -1.42598 #> Dataset 8 parent 1 66.2 67.58358 -1.38358 1.882 -0.73520 #> Dataset 8 parent 3 43.5 41.62086 1.87914 1.882 0.99853 #> Dataset 8 parent 3 44.1 41.62086 2.47914 1.882 1.31735 #> Dataset 8 parent 8 18.3 19.60116 -1.30116 1.882 -0.69140 #> Dataset 8 parent 8 18.1 19.60116 -1.50116 1.882 -0.79768 #> Dataset 8 parent 14 10.2 10.63101 -0.43101 1.882 -0.22903 #> Dataset 8 parent 14 10.8 10.63101 0.16899 1.882 0.08980 #> Dataset 8 parent 27 4.9 3.12435 1.77565 1.882 0.94354 #> Dataset 8 parent 27 3.3 3.12435 0.17565 1.882 0.09334 #> Dataset 8 parent 48 1.6 0.43578 1.16422 1.882 0.61864 #> Dataset 8 parent 48 1.5 0.43578 1.06422 1.882 0.56550 #> Dataset 8 parent 70 1.1 0.05534 1.04466 1.882 0.55510 #> Dataset 8 parent 70 0.9 0.05534 0.84466 1.882 0.44883 #> Dataset 8 A1 1 9.6 7.63450 1.96550 1.882 1.04442 #> Dataset 8 A1 1 7.7 7.63450 0.06550 1.882 0.03481 #> Dataset 8 A1 3 15.0 15.52593 -0.52593 1.882 -0.27947 #> Dataset 8 A1 3 15.1 15.52593 -0.42593 1.882 -0.22633 #> Dataset 8 A1 8 21.2 20.32192 0.87808 1.882 0.46659 #> Dataset 8 A1 8 21.1 20.32192 0.77808 1.882 0.41345 #> Dataset 8 A1 14 19.7 20.09721 -0.39721 1.882 -0.21107 #> Dataset 8 A1 14 18.9 20.09721 -1.19721 1.882 -0.63617 #> Dataset 8 A1 27 17.5 16.37477 1.12523 1.882 0.59792 #> Dataset 8 A1 27 15.9 16.37477 -0.47477 1.882 -0.25228 #> Dataset 8 A1 48 9.5 10.13141 -0.63141 1.882 -0.33551 #> Dataset 8 A1 48 9.8 10.13141 -0.33141 1.882 -0.17610 #> Dataset 8 A1 70 6.2 5.81827 0.38173 1.882 0.20284 #> Dataset 8 A1 70 6.1 5.81827 0.28173 1.882 0.14970 #> Dataset 9 parent 0 99.8 97.48728 2.31272 1.882 1.22892 #> Dataset 9 parent 0 98.3 97.48728 0.81272 1.882 0.43186 #> Dataset 9 parent 1 77.1 79.29476 -2.19476 1.882 -1.16624 #> Dataset 9 parent 1 77.2 79.29476 -2.09476 1.882 -1.11310 #> Dataset 9 parent 3 59.0 55.67060 3.32940 1.882 1.76915 #> Dataset 9 parent 3 58.1 55.67060 2.42940 1.882 1.29092 #> Dataset 9 parent 8 27.4 31.57871 -4.17871 1.882 -2.22046 #> Dataset 9 parent 8 29.2 31.57871 -2.37871 1.882 -1.26398 #> Dataset 9 parent 14 19.1 22.51546 -3.41546 1.882 -1.81489 #> Dataset 9 parent 14 29.6 22.51546 7.08454 1.882 3.76454 #> Dataset 9 parent 27 10.1 14.09074 -3.99074 1.882 -2.12057 #> Dataset 9 parent 27 18.2 14.09074 4.10926 1.882 2.18355 #> Dataset 9 parent 48 4.5 6.95747 -2.45747 1.882 -1.30584 #> Dataset 9 parent 48 9.1 6.95747 2.14253 1.882 1.13848 #> Dataset 9 parent 70 2.3 3.32472 -1.02472 1.882 -0.54451 #> Dataset 9 parent 70 2.9 3.32472 -0.42472 1.882 -0.22569 #> Dataset 9 parent 91 2.0 1.64300 0.35700 1.882 0.18970 #> Dataset 9 parent 91 1.8 1.64300 0.15700 1.882 0.08343 #> Dataset 9 parent 120 2.0 0.62073 1.37927 1.882 0.73291 #> Dataset 9 parent 120 2.2 0.62073 1.57927 1.882 0.83918 #> Dataset 9 A1 1 4.2 3.64568 0.55432 1.882 0.29455 #> Dataset 9 A1 1 3.9 3.64568 0.25432 1.882 0.13514 #> Dataset 9 A1 3 7.4 8.30173 -0.90173 1.882 -0.47916 #> Dataset 9 A1 3 7.9 8.30173 -0.40173 1.882 -0.21347 #> Dataset 9 A1 8 14.5 12.71589 1.78411 1.882 0.94803 #> Dataset 9 A1 8 13.7 12.71589 0.98411 1.882 0.52293 #> Dataset 9 A1 14 14.2 13.90452 0.29548 1.882 0.15701 #> Dataset 9 A1 14 12.2 13.90452 -1.70452 1.882 -0.90574 #> Dataset 9 A1 27 13.7 14.15523 -0.45523 1.882 -0.24190 #> Dataset 9 A1 27 13.2 14.15523 -0.95523 1.882 -0.50759 #> Dataset 9 A1 48 13.6 13.31038 0.28962 1.882 0.15389 #> Dataset 9 A1 48 15.4 13.31038 2.08962 1.882 1.11037 #> Dataset 9 A1 70 10.4 11.85965 -1.45965 1.882 -0.77562 #> Dataset 9 A1 70 11.6 11.85965 -0.25965 1.882 -0.13797 #> Dataset 9 A1 91 10.0 10.36294 -0.36294 1.882 -0.19286 #> Dataset 9 A1 91 9.5 10.36294 -0.86294 1.882 -0.45855 #> Dataset 9 A1 120 9.1 8.43003 0.66997 1.882 0.35601 #> Dataset 9 A1 120 9.0 8.43003 0.56997 1.882 0.30287 #> Dataset 10 parent 0 96.1 93.95603 2.14397 1.882 1.13925 #> Dataset 10 parent 0 94.3 93.95603 0.34397 1.882 0.18278 #> Dataset 10 parent 8 73.9 77.70592 -3.80592 1.882 -2.02237 #> Dataset 10 parent 8 73.9 77.70592 -3.80592 1.882 -2.02237 #> Dataset 10 parent 14 69.4 70.04570 -0.64570 1.882 -0.34311 #> Dataset 10 parent 14 73.1 70.04570 3.05430 1.882 1.62298 #> Dataset 10 parent 21 65.6 64.01710 1.58290 1.882 0.84111 #> Dataset 10 parent 21 65.3 64.01710 1.28290 1.882 0.68170 #> Dataset 10 parent 41 55.9 54.98434 0.91566 1.882 0.48656 #> Dataset 10 parent 41 54.4 54.98434 -0.58434 1.882 -0.31050 #> Dataset 10 parent 63 47.0 49.87137 -2.87137 1.882 -1.52577 #> Dataset 10 parent 63 49.3 49.87137 -0.57137 1.882 -0.30361 #> Dataset 10 parent 91 44.7 45.06727 -0.36727 1.882 -0.19516 #> Dataset 10 parent 91 46.7 45.06727 1.63273 1.882 0.86759 #> Dataset 10 parent 120 42.1 40.76402 1.33598 1.882 0.70991 #> Dataset 10 parent 120 41.3 40.76402 0.53598 1.882 0.28481 #> Dataset 10 A1 8 3.3 4.14599 -0.84599 1.882 -0.44954 #> Dataset 10 A1 8 3.4 4.14599 -0.74599 1.882 -0.39640 #> Dataset 10 A1 14 3.9 6.08478 -2.18478 1.882 -1.16093 #> Dataset 10 A1 14 2.9 6.08478 -3.18478 1.882 -1.69231 #> Dataset 10 A1 21 6.4 7.59411 -1.19411 1.882 -0.63452 #> Dataset 10 A1 21 7.2 7.59411 -0.39411 1.882 -0.20942 #> Dataset 10 A1 41 9.1 9.78292 -0.68292 1.882 -0.36289 #> Dataset 10 A1 41 8.5 9.78292 -1.28292 1.882 -0.68171 #> Dataset 10 A1 63 11.7 10.93274 0.76726 1.882 0.40770 #> Dataset 10 A1 63 12.0 10.93274 1.06726 1.882 0.56711 #> Dataset 10 A1 91 13.3 11.93986 1.36014 1.882 0.72274 #> Dataset 10 A1 91 13.2 11.93986 1.26014 1.882 0.66961 #> Dataset 10 A1 120 14.3 12.79238 1.50762 1.882 0.80111 #> Dataset 10 A1 120 12.1 12.79238 -0.69238 1.882 -0.36791 # The following takes about 6 minutes f_saem_dfop_sfo_deSolve <- saem(f_mmkin[\"DFOP-SFO\", ], solution_type = \"deSolve\", nbiter.saemix = c(200, 80)) #> DINTDY- T (=R1) illegal #> In above message, R1 = 70 #> #> T not in interval TCUR - HU (= R1) to TCUR (=R2) #> In above message, R1 = 53.1042, R2 = 56.6326 #> #> DINTDY- T (=R1) illegal #> In above message, R1 = 91 #> #> T not in interval TCUR - HU (= R1) to TCUR (=R2) #> In above message, R1 = 53.1042, R2 = 56.6326 #> #> DLSODA- Trouble in DINTDY. ITASK = I1, TOUT = R1 #> In above message, I1 = 1 #> #> In above message, R1 = 91 #> #> Error in deSolve::lsoda(y = odeini, times = outtimes, func = lsoda_func, : #> illegal input detected before taking any integration steps - see written message #anova( # f_saem_dfop_sfo, # f_saem_dfop_sfo_deSolve)) # If the model supports it, we can also use eigenvalue based solutions, which # take a similar amount of time #f_saem_sfo_sfo_eigen <- saem(f_mmkin[\"SFO-SFO\", ], solution_type = \"eigen\", # control = list(nbiter.saemix = c(200, 80), nbdisplay = 10)) # }"},{"path":"https://pkgdown.jrwb.de/mkin/reference/schaefer07_complex_case.html","id":null,"dir":"Reference","previous_headings":"","what":"Metabolism data set used for checking the software quality of KinGUI — schaefer07_complex_case","title":"Metabolism data set used for checking the software quality of KinGUI — schaefer07_complex_case","text":"dataset used comparison KinGUI ModelMaker check software quality KinGUI original publication (Schäfer et al., 2007). results fitting also included.","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/schaefer07_complex_case.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Metabolism data set used for checking the software quality of KinGUI — schaefer07_complex_case","text":"","code":"schaefer07_complex_case"},{"path":"https://pkgdown.jrwb.de/mkin/reference/schaefer07_complex_case.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Metabolism data set used for checking the software quality of KinGUI — schaefer07_complex_case","text":"data set data frame 8 observations following 6 variables. time numeric vector parent numeric vector A1 numeric vector B1 numeric vector C1 numeric vector A2 numeric vector results data frame 14 results different parameter values","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/schaefer07_complex_case.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Metabolism data set used for checking the software quality of KinGUI — schaefer07_complex_case","text":"Schäfer D, Mikolasch B, Rainbird P Harvey B (2007). KinGUI: new kinetic software tool evaluations according FOCUS degradation kinetics. : Del Re AAM, Capri E, Fragoulis G Trevisan M (Eds.). Proceedings XIII Symposium Pesticide Chemistry, Piacenza, 2007, p. 916-923.","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/schaefer07_complex_case.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Metabolism data set used for checking the software quality of KinGUI — schaefer07_complex_case","text":"","code":"data <- mkin_wide_to_long(schaefer07_complex_case, time = \"time\") model <- mkinmod( parent = list(type = \"SFO\", to = c(\"A1\", \"B1\", \"C1\"), sink = FALSE), A1 = list(type = \"SFO\", to = \"A2\"), B1 = list(type = \"SFO\"), C1 = list(type = \"SFO\"), A2 = list(type = \"SFO\"), use_of_ff = \"max\") #> Temporary DLL for differentials generated and loaded # \\dontrun{ fit <- mkinfit(model, data, quiet = TRUE) plot(fit) endpoints(fit) #> $ff #> parent_A1 parent_B1 parent_C1 parent_sink A1_A2 A1_sink #> 0.3809618 0.1954668 0.4235714 0.0000000 0.4479540 0.5520460 #> #> $distimes #> DT50 DT90 #> parent 13.95078 46.34349 #> A1 49.75347 165.27745 #> B1 37.26905 123.80511 #> C1 11.23129 37.30955 #> A2 28.50690 94.69789 #> # } # Compare with the results obtained in the original publication print(schaefer07_complex_results) #> compound parameter KinGUI ModelMaker deviation #> 1 parent degradation rate 0.0496 0.0506 2.0 #> 2 parent DT50 13.9900 13.6900 2.2 #> 3 metabolite A1 formation fraction 0.3803 0.3696 2.9 #> 4 metabolite A1 degradation rate 0.0139 0.0136 2.2 #> 5 metabolite A1 DT50 49.9600 50.8900 1.8 #> 6 metabolite B1 formation fraction 0.1866 0.1818 2.6 #> 7 metabolite B1 degradation rate 0.0175 0.0172 1.7 #> 8 metabolite B1 DT50 39.6100 40.2400 1.6 #> 9 metabolite C1 formation fraction 0.4331 0.4486 3.5 #> 10 metabolite C1 degradation rate 0.0638 0.0700 8.9 #> 11 metabolite C1 DT50 10.8700 9.9000 9.8 #> 12 metabolite A2 formation fraction 0.4529 0.4559 0.7 #> 13 metabolite A2 degradation rate 0.0245 0.0244 0.4 #> 14 metabolite A2 DT50 28.2400 28.4500 0.7"},{"path":"https://pkgdown.jrwb.de/mkin/reference/set_nd_nq.html","id":null,"dir":"Reference","previous_headings":"","what":"Set non-detects and unquantified values in residue series without replicates — set_nd_nq","title":"Set non-detects and unquantified values in residue series without replicates — set_nd_nq","text":"function automates replacing unquantified values residue time depth series. time series, function performs part residue processing proposed FOCUS kinetics guidance parent compounds metabolites. two-dimensional residue series time depth, automates proposal Boesten et al (2015).","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/set_nd_nq.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Set non-detects and unquantified values in residue series without replicates — set_nd_nq","text":"","code":"set_nd_nq(res_raw, lod, loq = NA, time_zero_presence = FALSE) set_nd_nq_focus( res_raw, lod, loq = NA, set_first_sample_nd = TRUE, first_sample_nd_value = 0, ignore_below_loq_after_first_nd = TRUE )"},{"path":"https://pkgdown.jrwb.de/mkin/reference/set_nd_nq.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Set non-detects and unquantified values in residue series without replicates — set_nd_nq","text":"res_raw Character vector residue time series, matrix residue values rows representing depth profiles specific sampling time, columns representing time series residues depth. Values limit detection (lod) coded \"nd\", values limit detection limit quantification, , coded \"nq\". Samples analysed coded \"na\". values \"na\", \"nd\" \"nq\" coercible numeric lod Limit detection (numeric) loq Limit quantification(numeric). Must specified FOCUS rule stop first non-detection applied time_zero_presence assume residues occur time zero? affects samples first sampling time reported \"nd\" (detected). set_first_sample_nd first sample set \"first_sample_nd_value\" case non-detection? first_sample_nd_value Value used first sample non-detection ignore_below_loq_after_first_nd ignore values LOQ first non-detection occurs quantified values?","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/set_nd_nq.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Set non-detects and unquantified values in residue series without replicates — set_nd_nq","text":"numeric vector, vector supplied, numeric matrix otherwise","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/set_nd_nq.html","id":"functions","dir":"Reference","previous_headings":"","what":"Functions","title":"Set non-detects and unquantified values in residue series without replicates — set_nd_nq","text":"set_nd_nq_focus(): Set non-detects residue time series according FOCUS rules","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/set_nd_nq.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Set non-detects and unquantified values in residue series without replicates — set_nd_nq","text":"Boesten, J. J. T. ., van der Linden, . M. ., Beltman, W. H. J. Pol, J. W. (2015). Leaching plant protection products transformation products; Proposals improving assessment leaching groundwater Netherlands — Version 2. Alterra report 2630, Alterra Wageningen UR (University & Research centre) FOCUS (2014) Generic Guidance Estimating Persistence Degradation Kinetics Environmental Fate Studies Pesticides EU Registration, Version 1.1, 18 December 2014, p. 251","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/set_nd_nq.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Set non-detects and unquantified values in residue series without replicates — set_nd_nq","text":"","code":"# FOCUS (2014) p. 75/76 and 131/132 parent_1 <- c(.12, .09, .05, .03, \"nd\", \"nd\", \"nd\", \"nd\", \"nd\", \"nd\") set_nd_nq(parent_1, 0.02) #> [1] 0.12 0.09 0.05 0.03 0.01 NA NA NA NA NA parent_2 <- c(.12, .09, .05, .03, \"nd\", \"nd\", .03, \"nd\", \"nd\", \"nd\") set_nd_nq(parent_2, 0.02) #> [1] 0.12 0.09 0.05 0.03 0.01 0.01 0.03 0.01 NA NA set_nd_nq_focus(parent_2, 0.02, loq = 0.05) #> [1] 0.12 0.09 0.05 0.03 0.01 NA NA NA NA NA parent_3 <- c(.12, .09, .05, .03, \"nd\", \"nd\", .06, \"nd\", \"nd\", \"nd\") set_nd_nq(parent_3, 0.02) #> [1] 0.12 0.09 0.05 0.03 0.01 0.01 0.06 0.01 NA NA set_nd_nq_focus(parent_3, 0.02, loq = 0.05) #> [1] 0.12 0.09 0.05 0.03 0.01 0.01 0.06 0.01 NA NA metabolite <- c(\"nd\", \"nd\", \"nd\", 0.03, 0.06, 0.10, 0.11, 0.10, 0.09, 0.05, 0.03, \"nd\", \"nd\") set_nd_nq(metabolite, 0.02) #> [1] NA NA 0.01 0.03 0.06 0.10 0.11 0.10 0.09 0.05 0.03 0.01 NA set_nd_nq_focus(metabolite, 0.02, 0.05) #> [1] 0.00 NA 0.01 0.03 0.06 0.10 0.11 0.10 0.09 0.05 0.03 0.01 NA # # Boesten et al. (2015), p. 57/58 table_8 <- matrix( c(10, 10, rep(\"nd\", 4), 10, 10, rep(\"nq\", 2), rep(\"nd\", 2), 10, 10, 10, \"nq\", \"nd\", \"nd\", \"nq\", 10, \"nq\", rep(\"nd\", 3), \"nd\", \"nq\", \"nq\", rep(\"nd\", 3), rep(\"nd\", 6), rep(\"nd\", 6)), ncol = 6, byrow = TRUE) set_nd_nq(table_8, 0.5, 1.5, time_zero_presence = TRUE) #> [,1] [,2] [,3] [,4] [,5] [,6] #> [1,] 10.00 10.00 0.25 0.25 NA NA #> [2,] 10.00 10.00 1.00 1.00 0.25 NA #> [3,] 10.00 10.00 10.00 1.00 0.25 NA #> [4,] 1.00 10.00 1.00 0.25 NA NA #> [5,] 0.25 1.00 1.00 0.25 NA NA #> [6,] NA 0.25 0.25 NA NA NA #> [7,] NA NA NA NA NA NA table_10 <- matrix( c(10, 10, rep(\"nd\", 4), 10, 10, rep(\"nd\", 4), 10, 10, 10, rep(\"nd\", 3), \"nd\", 10, rep(\"nd\", 4), rep(\"nd\", 18)), ncol = 6, byrow = TRUE) set_nd_nq(table_10, 0.5, time_zero_presence = TRUE) #> [,1] [,2] [,3] [,4] [,5] [,6] #> [1,] 10.00 10.00 0.25 NA NA NA #> [2,] 10.00 10.00 0.25 NA NA NA #> [3,] 10.00 10.00 10.00 0.25 NA NA #> [4,] 0.25 10.00 0.25 NA NA NA #> [5,] NA 0.25 NA NA NA NA #> [6,] NA NA NA NA NA NA #> [7,] NA NA NA NA NA NA"},{"path":"https://pkgdown.jrwb.de/mkin/reference/sigma_twocomp.html","id":null,"dir":"Reference","previous_headings":"","what":"Two-component error model — sigma_twocomp","title":"Two-component error model — sigma_twocomp","text":"Function describing standard deviation measurement error dependence measured value \\(y\\):","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/sigma_twocomp.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Two-component error model — sigma_twocomp","text":"","code":"sigma_twocomp(y, sigma_low, rsd_high)"},{"path":"https://pkgdown.jrwb.de/mkin/reference/sigma_twocomp.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Two-component error model — sigma_twocomp","text":"y magnitude observed value sigma_low asymptotic minimum standard deviation low observed values rsd_high coefficient describing increase standard deviation magnitude observed value","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/sigma_twocomp.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Two-component error model — sigma_twocomp","text":"standard deviation response variable.","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/sigma_twocomp.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Two-component error model — sigma_twocomp","text":"$$\\sigma = \\sqrt{ \\sigma_{low}^2 + y^2 * {rsd}_{high}^2}$$ sigma = sqrt(sigma_low^2 + y^2 * rsd_high^2) error model used example Werner et al. (1978). model proposed Rocke Lorenzato (1995) can written form well, assumes approximate lognormal distribution errors high values y.","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/sigma_twocomp.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Two-component error model — sigma_twocomp","text":"Werner, Mario, Brooks, Samuel H., Knott, Lancaster B. (1978) Additive, Multiplicative, Mixed Analytical Errors. Clinical Chemistry 24(11), 1895-1898. Rocke, David M. Lorenzato, Stefan (1995) two-component model measurement error analytical chemistry. Technometrics 37(2), 176-184. Ranke J Meinecke S (2019) Error Models Kinetic Evaluation Chemical Degradation Data. Environments 6(12) 124 doi:10.3390/environments6120124 .","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/sigma_twocomp.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Two-component error model — sigma_twocomp","text":"","code":"times <- c(0, 1, 3, 7, 14, 28, 60, 90, 120) d_pred <- data.frame(time = times, parent = 100 * exp(- 0.03 * times)) set.seed(123456) d_syn <- add_err(d_pred, function(y) sigma_twocomp(y, 1, 0.07), reps = 2, n = 1)[[1]] f_nls <- nls(value ~ SSasymp(time, 0, parent_0, lrc), data = d_syn, start = list(parent_0 = 100, lrc = -3)) library(nlme) f_gnls <- gnls(value ~ SSasymp(time, 0, parent_0, lrc), data = d_syn, na.action = na.omit, start = list(parent_0 = 100, lrc = -3)) if (length(findFunction(\"varConstProp\")) > 0) { f_gnls_tc <- update(f_gnls, weights = varConstProp()) f_gnls_tc_sf <- update(f_gnls_tc, control = list(sigma = 1)) } f_mkin <- mkinfit(\"SFO\", d_syn, error_model = \"const\", quiet = TRUE) f_mkin_tc <- mkinfit(\"SFO\", d_syn, error_model = \"tc\", quiet = TRUE) plot_res(f_mkin_tc, standardized = TRUE) AIC(f_nls, f_gnls, f_gnls_tc, f_gnls_tc_sf, f_mkin, f_mkin_tc) #> df AIC #> f_nls 3 114.4817 #> f_gnls 3 114.4817 #> f_gnls_tc 5 103.6447 #> f_gnls_tc_sf 4 101.6447 #> f_mkin 3 114.4817 #> f_mkin_tc 4 101.6446"},{"path":"https://pkgdown.jrwb.de/mkin/reference/status.html","id":null,"dir":"Reference","previous_headings":"","what":"Method to get status information for fit array objects — status","title":"Method to get status information for fit array objects — status","text":"Method get status information fit array objects","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/status.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Method to get status information for fit array objects — status","text":"","code":"status(object, ...) # S3 method for mmkin status(object, ...) # S3 method for status.mmkin print(x, ...) # S3 method for mhmkin status(object, ...) # S3 method for status.mhmkin print(x, ...)"},{"path":"https://pkgdown.jrwb.de/mkin/reference/status.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Method to get status information for fit array objects — status","text":"object object investigate ... potential future extensions x object printed","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/status.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Method to get status information for fit array objects — status","text":"object dimensions fit array suitable printing method.","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/status.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Method to get status information for fit array objects — status","text":"","code":"# \\dontrun{ fits <- mmkin( c(\"SFO\", \"FOMC\"), list(\"FOCUS A\" = FOCUS_2006_A, \"FOCUS B\" = FOCUS_2006_C), quiet = TRUE) status(fits) #> dataset #> model FOCUS A FOCUS B #> SFO OK OK #> FOMC C OK #> #> C: Optimisation did not converge: #> false convergence (8) #> OK: No warnings # }"},{"path":"https://pkgdown.jrwb.de/mkin/reference/summary.mkinfit.html","id":null,"dir":"Reference","previous_headings":"","what":"Summary method for class ","title":"Summary method for class ","text":"Lists model equations, initial parameter values, optimised parameters uncertainty statistics, chi2 error levels calculated according FOCUS guidance (2006) defined therein, formation fractions, DT50 values optionally data, consisting observed, predicted residual values.","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/summary.mkinfit.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Summary method for class ","text":"","code":"# S3 method for mkinfit summary(object, data = TRUE, distimes = TRUE, alpha = 0.05, ...) # S3 method for summary.mkinfit print(x, digits = max(3, getOption(\"digits\") - 3), ...)"},{"path":"https://pkgdown.jrwb.de/mkin/reference/summary.mkinfit.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Summary method for class ","text":"object object class mkinfit. data logical, indicating whether data included summary. distimes logical, indicating whether DT50 DT90 values included. alpha error level confidence interval estimation t distribution ... optional arguments passed methods like print. x object class summary.mkinfit. digits Number digits use printing","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/summary.mkinfit.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Summary method for class ","text":"summary function returns list components, among others version, Rversion mkin R versions used date.fit, date.summary dates fit summary produced diffs differential equations used model use_of_ff maximum minimum use made formation fractions bpar Optimised backtransformed parameters data data (see Description ). start starting values bounds, applicable, optimised parameters. fixed values fixed parameters. errmin chi2 error levels observed variable. bparms.ode backtransformed ODE parameters, use starting parameters related models. errparms Error model parameters. ff estimated formation fractions derived fitted model. distimes DT50 DT90 values observed variable. SFORB applicable, eigenvalues fractional eigenvector component g SFORB systems model. print method called side effect, .e. printing summary.","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/summary.mkinfit.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Summary method for class ","text":"FOCUS (2006) “Guidance Document Estimating Persistence Degradation Kinetics Environmental Fate Studies Pesticides EU Registration” Report FOCUS Work Group Degradation Kinetics, EC Document Reference Sanco/10058/2005 version 2.0, 434 pp, http://esdac.jrc.ec.europa.eu/projects/degradation-kinetics","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/summary.mkinfit.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Summary method for class ","text":"Johannes Ranke","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/summary.mkinfit.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Summary method for class ","text":"","code":"summary(mkinfit(\"SFO\", FOCUS_2006_A, quiet = TRUE)) #> mkin version used for fitting: 1.2.6 #> R version used for fitting: 4.3.2 #> Date of fit: Thu Nov 16 04:19:39 2023 #> Date of summary: Thu Nov 16 04:19:39 2023 #> #> Equations: #> d_parent/dt = - k_parent * parent #> #> Model predictions using solution type analytical #> #> Fitted using 131 model solutions performed in 0.009 s #> #> Error model: Constant variance #> #> Error model algorithm: OLS #> #> Starting values for parameters to be optimised: #> value type #> parent_0 101.24 state #> k_parent 0.10 deparm #> #> Starting values for the transformed parameters actually optimised: #> value lower upper #> parent_0 101.240000 -Inf Inf #> log_k_parent -2.302585 -Inf Inf #> #> Fixed parameter values: #> None #> #> Results: #> #> AIC BIC logLik #> 55.28197 55.5203 -24.64099 #> #> Optimised, transformed parameters with symmetric confidence intervals: #> Estimate Std. Error Lower Upper #> parent_0 109.200 3.70400 99.630 118.700 #> log_k_parent -3.291 0.09176 -3.527 -3.055 #> sigma 5.266 1.31600 1.882 8.649 #> #> Parameter correlation: #> parent_0 log_k_parent sigma #> parent_0 1.000e+00 5.428e-01 1.642e-07 #> log_k_parent 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. #> t-test (unrealistically) based on the assumption of normal distribution #> for estimators of untransformed parameters. #> Estimate t value Pr(>t) Lower Upper #> parent_0 109.20000 29.47 4.218e-07 99.6300 118.70000 #> k_parent 0.03722 10.90 5.650e-05 0.0294 0.04712 #> sigma 5.26600 4.00 5.162e-03 1.8820 8.64900 #> #> FOCUS Chi2 error levels in percent: #> err.min n.optim df #> All data 8.385 2 6 #> parent 8.385 2 6 #> #> Estimated disappearance times: #> DT50 DT90 #> parent 18.62 61.87 #> #> Data: #> time variable observed predicted residual #> 0 parent 101.24 109.153 -7.9132 #> 3 parent 99.27 97.622 1.6484 #> 7 parent 90.11 84.119 5.9913 #> 14 parent 72.19 64.826 7.3641 #> 30 parent 29.71 35.738 -6.0283 #> 62 parent 5.98 10.862 -4.8818 #> 90 parent 1.54 3.831 -2.2911 #> 118 parent 0.39 1.351 -0.9613"},{"path":"https://pkgdown.jrwb.de/mkin/reference/summary.mmkin.html","id":null,"dir":"Reference","previous_headings":"","what":"Summary method for class ","title":"Summary method for class ","text":"Shows status information mkinfit objects contained object gives overview ill-defined parameters calculated illparms.","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/summary.mmkin.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Summary method for class ","text":"","code":"# S3 method for mmkin summary(object, conf.level = 0.95, ...) # S3 method for summary.mmkin print(x, digits = max(3, getOption(\"digits\") - 3), ...)"},{"path":"https://pkgdown.jrwb.de/mkin/reference/summary.mmkin.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Summary method for class ","text":"object object class mmkin conf.level confidence level testing parameters ... optional arguments passed methods like print. x object class summary.mmkin. digits number digits use printing","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/summary.mmkin.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Summary method for class ","text":"","code":"fits <- mmkin( c(\"SFO\", \"FOMC\"), list(\"FOCUS A\" = FOCUS_2006_A, \"FOCUS C\" = FOCUS_2006_C), quiet = TRUE, cores = 1) #> Warning: Optimisation did not converge: #> false convergence (8) summary(fits) #> Error model: Constant variance #> Fitted in 0.454 s #> #> Status: #> dataset #> model FOCUS A FOCUS C #> SFO OK OK #> FOMC C OK #> #> C: Optimisation did not converge: #> false convergence (8) #> OK: No warnings #> #> Ill-defined parameters: #> dataset #> model FOCUS A FOCUS C #> SFO #> FOMC parent_0, alpha, beta, sigma"},{"path":"https://pkgdown.jrwb.de/mkin/reference/summary.nlme.mmkin.html","id":null,"dir":"Reference","previous_headings":"","what":"Summary method for class ","title":"Summary method for class ","text":"Lists model equations, initial parameter values, optimised parameters fixed effects (population), random effects (deviations population mean) residual error model, well resulting endpoints formation fractions DT50 values. Optionally (default FALSE), data listed full.","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/summary.nlme.mmkin.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Summary method for class ","text":"","code":"# S3 method for nlme.mmkin summary( object, data = FALSE, verbose = FALSE, distimes = TRUE, alpha = 0.05, ... ) # S3 method for summary.nlme.mmkin print(x, digits = max(3, getOption(\"digits\") - 3), verbose = x$verbose, ...)"},{"path":"https://pkgdown.jrwb.de/mkin/reference/summary.nlme.mmkin.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Summary method for class ","text":"object object class nlme.mmkin data logical, indicating whether full data included summary. verbose summary verbose? distimes logical, indicating whether DT50 DT90 values included. alpha error level confidence interval estimation t distribution ... optional arguments passed methods like print. x object class summary.nlme.mmkin digits Number digits use printing","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/summary.nlme.mmkin.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Summary method for class ","text":"summary function returns list based nlme object obtained fit, least following additional components nlmeversion, mkinversion, Rversion nlme, mkin R versions used date.fit, date.summary dates fit summary produced diffs differential equations used degradation model use_of_ff maximum minimum use made formation fractions data data confint_trans Transformed parameters used optimisation, confidence intervals confint_back Backtransformed parameters, confidence intervals available ff estimated formation fractions derived fitted model. distimes DT50 DT90 values observed variable. SFORB applicable, eigenvalues SFORB components model. print method called side effect, .e. printing summary.","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/summary.nlme.mmkin.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Summary method for class ","text":"Johannes Ranke mkin specific parts José Pinheiro Douglas Bates components inherited nlme","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/summary.nlme.mmkin.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Summary method for class ","text":"","code":"# Generate five datasets following SFO kinetics sampling_times = c(0, 1, 3, 7, 14, 28, 60, 90, 120) dt50_sfo_in_pop <- 50 k_in_pop <- log(2) / dt50_sfo_in_pop set.seed(1234) k_in <- rlnorm(5, log(k_in_pop), 0.5) SFO <- mkinmod(parent = mkinsub(\"SFO\")) pred_sfo <- function(k) { mkinpredict(SFO, c(k_parent = k), c(parent = 100), sampling_times) } ds_sfo_mean <- lapply(k_in, pred_sfo) names(ds_sfo_mean) <- paste(\"ds\", 1:5) set.seed(12345) ds_sfo_syn <- lapply(ds_sfo_mean, function(ds) { add_err(ds, sdfunc = function(value) sqrt(1^2 + value^2 * 0.07^2), n = 1)[[1]] }) # \\dontrun{ # Evaluate using mmkin and nlme library(nlme) f_mmkin <- mmkin(\"SFO\", ds_sfo_syn, quiet = TRUE, error_model = \"tc\", cores = 1) #> Warning: Optimisation did not converge: #> iteration limit reached without convergence (10) f_nlme <- nlme(f_mmkin) summary(f_nlme, data = TRUE) #> nlme version used for fitting: 3.1.163 #> mkin version used for pre-fitting: 1.2.6 #> R version used for fitting: 4.3.2 #> Date of fit: Thu Nov 16 04:19:41 2023 #> Date of summary: Thu Nov 16 04:19:41 2023 #> #> Equations: #> d_parent/dt = - k_parent * parent #> #> Data: #> 90 observations of 1 variable(s) grouped in 5 datasets #> #> Model predictions using solution type analytical #> #> Fitted in 0.182 s using 4 iterations #> #> Variance model: Two-component variance function #> #> Mean of starting values for individual parameters: #> parent_0 log_k_parent #> 101.569 -4.454 #> #> Fixed degradation parameter values: #> None #> #> Results: #> #> AIC BIC logLik #> 584.5 599.5 -286.2 #> #> Optimised, transformed parameters with symmetric confidence intervals: #> lower est. upper #> parent_0 99.371 101.592 103.814 #> log_k_parent -4.973 -4.449 -3.926 #> #> Correlation: #> parnt_0 #> log_k_parent 0.0507 #> #> Random effects: #> Formula: list(parent_0 ~ 1, log_k_parent ~ 1) #> Level: ds #> Structure: Diagonal #> parent_0 log_k_parent Residual #> StdDev: 6.921e-05 0.5863 1 #> #> Variance function: #> Structure: Constant plus proportion of variance covariate #> Formula: ~fitted(.) #> Parameter estimates: #> const prop #> 0.0001208313 0.0789967985 #> #> Backtransformed parameters with asymmetric confidence intervals: #> lower est. upper #> parent_0 99.370882 101.59243 103.81398 #> k_parent 0.006923 0.01168 0.01972 #> #> Estimated disappearance times: #> DT50 DT90 #> parent 59.32 197.1 #> #> Data: #> ds name time observed predicted residual std standardized #> ds 1 parent 0 104.1 101.592 2.50757 8.0255 0.312451 #> ds 1 parent 0 105.0 101.592 3.40757 8.0255 0.424594 #> ds 1 parent 1 98.5 100.796 -2.29571 7.9625 -0.288313 #> ds 1 parent 1 96.1 100.796 -4.69571 7.9625 -0.589725 #> ds 1 parent 3 101.9 99.221 2.67904 7.8381 0.341796 #> ds 1 parent 3 85.2 99.221 -14.02096 7.8381 -1.788812 #> ds 1 parent 7 99.1 96.145 2.95512 7.5951 0.389081 #> ds 1 parent 7 93.0 96.145 -3.14488 7.5951 -0.414065 #> ds 1 parent 14 88.1 90.989 -2.88944 7.1879 -0.401987 #> ds 1 parent 14 84.1 90.989 -6.88944 7.1879 -0.958480 #> ds 1 parent 28 80.2 81.493 -1.29305 6.4377 -0.200857 #> ds 1 parent 28 91.3 81.493 9.80695 6.4377 1.523364 #> ds 1 parent 60 65.1 63.344 1.75642 5.0039 0.351008 #> ds 1 parent 60 65.8 63.344 2.45642 5.0039 0.490898 #> ds 1 parent 90 47.8 50.018 -2.21764 3.9512 -0.561252 #> ds 1 parent 90 53.5 50.018 3.48236 3.9512 0.881335 #> ds 1 parent 120 37.6 39.495 -1.89515 3.1200 -0.607423 #> ds 1 parent 120 39.3 39.495 -0.19515 3.1200 -0.062549 #> ds 2 parent 0 107.9 101.592 6.30757 8.0255 0.785943 #> ds 2 parent 0 102.1 101.592 0.50757 8.0255 0.063245 #> ds 2 parent 1 103.8 100.058 3.74159 7.9043 0.473361 #> ds 2 parent 1 108.6 100.058 8.54159 7.9043 1.080626 #> ds 2 parent 3 91.0 97.060 -6.05952 7.6674 -0.790297 #> ds 2 parent 3 84.9 97.060 -12.15952 7.6674 -1.585874 #> ds 2 parent 7 79.3 91.329 -12.02867 7.2147 -1.667251 #> ds 2 parent 7 100.9 91.329 9.57133 7.2147 1.326647 #> ds 2 parent 14 77.3 82.102 -4.80185 6.4858 -0.740366 #> ds 2 parent 14 83.5 82.102 1.39815 6.4858 0.215571 #> ds 2 parent 28 66.8 66.351 0.44945 5.2415 0.085748 #> ds 2 parent 28 63.3 66.351 -3.05055 5.2415 -0.582002 #> ds 2 parent 60 40.8 40.775 0.02474 3.2211 0.007679 #> ds 2 parent 60 44.8 40.775 4.02474 3.2211 1.249485 #> ds 2 parent 90 27.8 25.832 1.96762 2.0407 0.964198 #> ds 2 parent 90 27.0 25.832 1.16762 2.0407 0.572171 #> ds 2 parent 120 15.2 16.366 -1.16561 1.2928 -0.901595 #> ds 2 parent 120 15.5 16.366 -0.86561 1.2928 -0.669547 #> ds 3 parent 0 97.7 101.592 -3.89243 8.0255 -0.485009 #> ds 3 parent 0 88.2 101.592 -13.39243 8.0255 -1.668740 #> ds 3 parent 1 109.9 99.218 10.68196 7.8379 1.362858 #> ds 3 parent 1 97.8 99.218 -1.41804 7.8379 -0.180921 #> ds 3 parent 3 100.5 94.634 5.86555 7.4758 0.784603 #> ds 3 parent 3 77.4 94.634 -17.23445 7.4758 -2.305360 #> ds 3 parent 7 78.3 86.093 -7.79273 6.8011 -1.145813 #> ds 3 parent 7 90.3 86.093 4.20727 6.8011 0.618620 #> ds 3 parent 14 76.0 72.958 3.04222 5.7634 0.527848 #> ds 3 parent 14 79.1 72.958 6.14222 5.7634 1.065722 #> ds 3 parent 28 46.0 52.394 -6.39404 4.1390 -1.544842 #> ds 3 parent 28 53.4 52.394 1.00596 4.1390 0.243046 #> ds 3 parent 60 25.1 24.582 0.51786 1.9419 0.266676 #> ds 3 parent 60 21.4 24.582 -3.18214 1.9419 -1.638664 #> ds 3 parent 90 11.0 12.092 -1.09202 0.9552 -1.143199 #> ds 3 parent 90 14.2 12.092 2.10798 0.9552 2.206777 #> ds 3 parent 120 5.8 5.948 -0.14810 0.4699 -0.315178 #> ds 3 parent 120 6.1 5.948 0.15190 0.4699 0.323282 #> ds 4 parent 0 95.3 101.592 -6.29243 8.0255 -0.784057 #> ds 4 parent 0 102.0 101.592 0.40757 8.0255 0.050784 #> ds 4 parent 1 104.4 101.125 3.27549 7.9885 0.410025 #> ds 4 parent 1 105.4 101.125 4.27549 7.9885 0.535205 #> ds 4 parent 3 113.7 100.195 13.50487 7.9151 1.706218 #> ds 4 parent 3 82.3 100.195 -17.89513 7.9151 -2.260886 #> ds 4 parent 7 98.1 98.362 -0.26190 7.7703 -0.033706 #> ds 4 parent 7 87.8 98.362 -10.56190 7.7703 -1.359270 #> ds 4 parent 14 97.9 95.234 2.66590 7.5232 0.354357 #> ds 4 parent 14 104.8 95.234 9.56590 7.5232 1.271521 #> ds 4 parent 28 85.0 89.274 -4.27372 7.0523 -0.606001 #> ds 4 parent 28 77.2 89.274 -12.07372 7.0523 -1.712017 #> ds 4 parent 60 82.2 77.013 5.18661 6.0838 0.852526 #> ds 4 parent 60 86.1 77.013 9.08661 6.0838 1.493571 #> ds 4 parent 90 70.5 67.053 3.44692 5.2970 0.650733 #> ds 4 parent 90 61.7 67.053 -5.35308 5.2970 -1.010591 #> ds 4 parent 120 60.0 58.381 1.61905 4.6119 0.351058 #> ds 4 parent 120 56.4 58.381 -1.98095 4.6119 -0.429530 #> ds 5 parent 0 92.6 101.592 -8.99243 8.0255 -1.120485 #> ds 5 parent 0 116.5 101.592 14.90757 8.0255 1.857531 #> ds 5 parent 1 108.0 99.914 8.08560 7.8929 1.024413 #> ds 5 parent 1 104.9 99.914 4.98560 7.8929 0.631655 #> ds 5 parent 3 100.5 96.641 3.85898 7.6343 0.505477 #> ds 5 parent 3 89.5 96.641 -7.14102 7.6343 -0.935383 #> ds 5 parent 7 91.7 90.412 1.28752 7.1423 0.180267 #> ds 5 parent 7 95.1 90.412 4.68752 7.1423 0.656304 #> ds 5 parent 14 82.2 80.463 1.73715 6.3563 0.273295 #> ds 5 parent 14 84.5 80.463 4.03715 6.3563 0.635141 #> ds 5 parent 28 60.5 63.728 -3.22788 5.0343 -0.641178 #> ds 5 parent 28 72.8 63.728 9.07212 5.0343 1.802062 #> ds 5 parent 60 38.3 37.399 0.90061 2.9544 0.304835 #> ds 5 parent 60 40.7 37.399 3.30061 2.9544 1.117174 #> ds 5 parent 90 22.5 22.692 -0.19165 1.7926 -0.106913 #> ds 5 parent 90 20.8 22.692 -1.89165 1.7926 -1.055273 #> ds 5 parent 120 13.4 13.768 -0.36790 1.0876 -0.338259 #> ds 5 parent 120 13.8 13.768 0.03210 1.0876 0.029517 # }"},{"path":"https://pkgdown.jrwb.de/mkin/reference/summary.saem.mmkin.html","id":null,"dir":"Reference","previous_headings":"","what":"Summary method for class ","title":"Summary method for class ","text":"Lists model equations, initial parameter values, optimised parameters fixed effects (population), random effects (deviations population mean) residual error model, well resulting endpoints formation fractions DT50 values. Optionally (default FALSE), data listed full.","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/summary.saem.mmkin.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Summary method for class ","text":"","code":"# S3 method for saem.mmkin summary( object, data = FALSE, verbose = FALSE, covariates = NULL, covariate_quantile = 0.5, distimes = TRUE, ... ) # S3 method for summary.saem.mmkin print(x, digits = max(3, getOption(\"digits\") - 3), verbose = x$verbose, ...)"},{"path":"https://pkgdown.jrwb.de/mkin/reference/summary.saem.mmkin.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Summary method for class ","text":"object object class saem.mmkin data logical, indicating whether full data included summary. verbose summary verbose? covariates Numeric vector covariate values variables covariate models object. given, overrides 'covariate_quantile'. covariate_quantile argument effect fitted object covariate models. , default show endpoints median covariate values (50th percentile). distimes logical, indicating whether DT50 DT90 values included. ... optional arguments passed methods like print. x object class summary.saem.mmkin digits Number digits use printing","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/summary.saem.mmkin.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Summary method for class ","text":"summary function returns list based saemix::SaemixObject obtained fit, least following additional components saemixversion, mkinversion, Rversion saemix, mkin R versions used date.fit, date.summary dates fit summary produced diffs differential equations used degradation model use_of_ff maximum minimum use made formation fractions data data confint_trans Transformed parameters used optimisation, confidence intervals confint_back Backtransformed parameters, confidence intervals available confint_errmod Error model parameters confidence intervals ff estimated formation fractions derived fitted model. distimes DT50 DT90 values observed variable. SFORB applicable, eigenvalues SFORB components model. print method called side effect, .e. printing summary.","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/summary.saem.mmkin.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Summary method for class ","text":"Johannes Ranke mkin specific parts saemix authors parts inherited saemix.","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/summary.saem.mmkin.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Summary method for class ","text":"","code":"# Generate five datasets following DFOP-SFO kinetics sampling_times = c(0, 1, 3, 7, 14, 28, 60, 90, 120) dfop_sfo <- mkinmod(parent = mkinsub(\"DFOP\", \"m1\"), m1 = mkinsub(\"SFO\"), quiet = TRUE) set.seed(1234) k1_in <- rlnorm(5, log(0.1), 0.3) k2_in <- rlnorm(5, log(0.02), 0.3) g_in <- plogis(rnorm(5, qlogis(0.5), 0.3)) f_parent_to_m1_in <- plogis(rnorm(5, qlogis(0.3), 0.3)) k_m1_in <- rlnorm(5, log(0.02), 0.3) pred_dfop_sfo <- function(k1, k2, g, f_parent_to_m1, k_m1) { mkinpredict(dfop_sfo, c(k1 = k1, k2 = k2, g = g, f_parent_to_m1 = f_parent_to_m1, k_m1 = k_m1), c(parent = 100, m1 = 0), sampling_times) } ds_mean_dfop_sfo <- lapply(1:5, function(i) { mkinpredict(dfop_sfo, c(k1 = k1_in[i], k2 = k2_in[i], g = g_in[i], f_parent_to_m1 = f_parent_to_m1_in[i], k_m1 = k_m1_in[i]), c(parent = 100, m1 = 0), sampling_times) }) names(ds_mean_dfop_sfo) <- paste(\"ds\", 1:5) ds_syn_dfop_sfo <- lapply(ds_mean_dfop_sfo, function(ds) { add_err(ds, sdfunc = function(value) sqrt(1^2 + value^2 * 0.07^2), n = 1)[[1]] }) # \\dontrun{ # Evaluate using mmkin and saem f_mmkin_dfop_sfo <- mmkin(list(dfop_sfo), ds_syn_dfop_sfo, quiet = TRUE, error_model = \"tc\", cores = 5) f_saem_dfop_sfo <- saem(f_mmkin_dfop_sfo) print(f_saem_dfop_sfo) #> Kinetic nonlinear mixed-effects model fit by SAEM #> Structural model: #> d_parent/dt = - ((k1 * g * exp(-k1 * time) + k2 * (1 - g) * exp(-k2 * #> time)) / (g * exp(-k1 * time) + (1 - g) * exp(-k2 * time))) #> * parent #> d_m1/dt = + f_parent_to_m1 * ((k1 * g * exp(-k1 * time) + k2 * (1 - g) #> * exp(-k2 * time)) / (g * exp(-k1 * time) + (1 - g) * #> exp(-k2 * time))) * parent - k_m1 * m1 #> #> Data: #> 171 observations of 2 variable(s) grouped in 5 datasets #> #> Likelihood computed by importance sampling #> AIC BIC logLik #> 810.8 805.4 -391.4 #> #> Fitted parameters: #> estimate lower upper #> parent_0 100.966822 97.90584 104.0278 #> log_k_m1 -4.076164 -4.17485 -3.9775 #> f_parent_qlogis -0.940902 -1.35358 -0.5282 #> log_k1 -2.363988 -2.71690 -2.0111 #> log_k2 -4.060016 -4.21743 -3.9026 #> g_qlogis -0.029999 -0.44766 0.3877 #> a.1 0.876272 0.67308 1.0795 #> b.1 0.079594 0.06399 0.0952 #> SD.parent_0 0.076322 -76.47330 76.6259 #> SD.log_k_m1 0.005052 -1.09071 1.1008 #> SD.f_parent_qlogis 0.446968 0.16577 0.7282 #> SD.log_k1 0.348786 0.09502 0.6025 #> SD.log_k2 0.147456 0.03111 0.2638 #> SD.g_qlogis 0.348244 0.02794 0.6686 illparms(f_saem_dfop_sfo) #> [1] \"sd(parent_0)\" \"sd(log_k_m1)\" f_saem_dfop_sfo_2 <- update(f_saem_dfop_sfo, no_random_effect = c(\"parent_0\", \"log_k_m1\")) illparms(f_saem_dfop_sfo_2) intervals(f_saem_dfop_sfo_2) #> Approximate 95% confidence intervals #> #> Fixed effects: #> lower est. upper #> parent_0 98.04247057 101.09950884 104.15654711 #> k_m1 0.01528983 0.01687734 0.01862969 #> f_parent_to_m1 0.20447650 0.27932896 0.36887691 #> k1 0.06779844 0.09638524 0.13702550 #> k2 0.01495629 0.01741775 0.02028431 #> g 0.37669311 0.48368409 0.59219202 #> #> Random effects: #> lower est. upper #> sd(f_parent_qlogis) 0.16515100 0.4448330 0.7245149 #> sd(log_k1) 0.08982372 0.3447403 0.5996568 #> sd(log_k2) 0.02806589 0.1419560 0.2558462 #> sd(g_qlogis) 0.04908160 0.3801993 0.7113170 #> #> #> lower est. upper #> a.1 0.67539922 0.87630147 1.07720371 #> b.1 0.06401324 0.07920531 0.09439739 summary(f_saem_dfop_sfo_2, data = TRUE) #> saemix version used for fitting: 3.2 #> mkin version used for pre-fitting: 1.2.6 #> R version used for fitting: 4.3.2 #> Date of fit: Thu Nov 16 04:19:57 2023 #> Date of summary: Thu Nov 16 04:19:57 2023 #> #> Equations: #> d_parent/dt = - ((k1 * g * exp(-k1 * time) + k2 * (1 - g) * exp(-k2 * #> time)) / (g * exp(-k1 * time) + (1 - g) * exp(-k2 * time))) #> * parent #> d_m1/dt = + f_parent_to_m1 * ((k1 * g * exp(-k1 * time) + k2 * (1 - g) #> * exp(-k2 * time)) / (g * exp(-k1 * time) + (1 - g) * #> exp(-k2 * time))) * parent - k_m1 * m1 #> #> Data: #> 171 observations of 2 variable(s) grouped in 5 datasets #> #> Model predictions using solution type analytical #> #> Fitted in 9.193 s #> Using 300, 100 iterations and 10 chains #> #> Variance model: Two-component variance function #> #> Starting values for degradation parameters: #> parent_0 log_k_m1 f_parent_qlogis log_k1 log_k2 #> 101.65645 -4.05368 -0.94311 -2.35943 -4.07006 #> g_qlogis #> -0.01133 #> #> Fixed degradation parameter values: #> None #> #> Starting values for random effects (square root of initial entries in omega): #> parent_0 log_k_m1 f_parent_qlogis log_k1 log_k2 g_qlogis #> parent_0 6.742 0.0000 0.0000 0.0000 0.0000 0.000 #> log_k_m1 0.000 0.2236 0.0000 0.0000 0.0000 0.000 #> f_parent_qlogis 0.000 0.0000 0.5572 0.0000 0.0000 0.000 #> log_k1 0.000 0.0000 0.0000 0.8031 0.0000 0.000 #> log_k2 0.000 0.0000 0.0000 0.0000 0.2931 0.000 #> g_qlogis 0.000 0.0000 0.0000 0.0000 0.0000 0.807 #> #> Starting values for error model parameters: #> a.1 b.1 #> 1 1 #> #> Results: #> #> Likelihood computed by importance sampling #> AIC BIC logLik #> 806.9 802.2 -391.5 #> #> Optimised parameters: #> est. lower upper #> parent_0 101.09951 98.04247 104.1565 #> log_k_m1 -4.08178 -4.18057 -3.9830 #> f_parent_qlogis -0.94779 -1.35855 -0.5370 #> log_k1 -2.33940 -2.69122 -1.9876 #> log_k2 -4.05027 -4.20262 -3.8979 #> g_qlogis -0.06529 -0.50361 0.3730 #> a.1 0.87630 0.67540 1.0772 #> b.1 0.07921 0.06401 0.0944 #> SD.f_parent_qlogis 0.44483 0.16515 0.7245 #> SD.log_k1 0.34474 0.08982 0.5997 #> SD.log_k2 0.14196 0.02807 0.2558 #> SD.g_qlogis 0.38020 0.04908 0.7113 #> #> Correlation: #> parnt_0 lg_k_m1 f_prnt_ log_k1 log_k2 #> log_k_m1 -0.4716 #> f_parent_qlogis -0.2394 0.2617 #> log_k1 0.1677 -0.1566 -0.0659 #> log_k2 0.0165 0.0638 0.0045 0.2013 #> g_qlogis 0.1118 -0.1118 -0.0340 -0.2324 -0.3419 #> #> Random effects: #> est. lower upper #> SD.f_parent_qlogis 0.4448 0.16515 0.7245 #> SD.log_k1 0.3447 0.08982 0.5997 #> SD.log_k2 0.1420 0.02807 0.2558 #> SD.g_qlogis 0.3802 0.04908 0.7113 #> #> Variance model: #> est. lower upper #> a.1 0.87630 0.67540 1.0772 #> b.1 0.07921 0.06401 0.0944 #> #> Backtransformed parameters: #> est. lower upper #> parent_0 101.09951 98.04247 104.15655 #> k_m1 0.01688 0.01529 0.01863 #> f_parent_to_m1 0.27933 0.20448 0.36888 #> k1 0.09639 0.06780 0.13703 #> k2 0.01742 0.01496 0.02028 #> g 0.48368 0.37669 0.59219 #> #> Resulting formation fractions: #> ff #> parent_m1 0.2793 #> parent_sink 0.7207 #> #> Estimated disappearance times: #> DT50 DT90 DT50back DT50_k1 DT50_k2 #> parent 15.66 94.28 28.38 7.191 39.8 #> m1 41.07 136.43 NA NA NA #> #> Data: #> ds name time observed predicted residual std standardized #> ds 1 parent 0 89.8 1.011e+02 -11.29951 8.0554 -1.402721 #> ds 1 parent 0 104.1 1.011e+02 3.00049 8.0554 0.372481 #> ds 1 parent 1 88.7 9.624e+01 -7.53600 7.6726 -0.982195 #> ds 1 parent 1 95.5 9.624e+01 -0.73600 7.6726 -0.095925 #> ds 1 parent 3 81.8 8.736e+01 -5.55672 6.9744 -0.796732 #> ds 1 parent 3 94.5 8.736e+01 7.14328 6.9744 1.024217 #> ds 1 parent 7 71.5 7.251e+01 -1.00511 5.8093 -0.173019 #> ds 1 parent 7 70.3 7.251e+01 -2.20511 5.8093 -0.379585 #> ds 1 parent 14 54.2 5.356e+01 0.63921 4.3319 0.147560 #> ds 1 parent 14 49.6 5.356e+01 -3.96079 4.3319 -0.914340 #> ds 1 parent 28 31.5 3.175e+01 -0.25429 2.6634 -0.095475 #> ds 1 parent 28 28.8 3.175e+01 -2.95429 2.6634 -1.109218 #> ds 1 parent 60 12.1 1.281e+01 -0.71388 1.3409 -0.532390 #> ds 1 parent 60 13.6 1.281e+01 0.78612 1.3409 0.586271 #> ds 1 parent 90 6.2 6.405e+00 -0.20462 1.0125 -0.202083 #> ds 1 parent 90 8.3 6.405e+00 1.89538 1.0125 1.871910 #> ds 1 parent 120 2.2 3.329e+00 -1.12941 0.9151 -1.234165 #> ds 1 parent 120 2.4 3.329e+00 -0.92941 0.9151 -1.015615 #> ds 1 m1 1 0.3 1.177e+00 -0.87699 0.8812 -0.995168 #> ds 1 m1 1 0.2 1.177e+00 -0.97699 0.8812 -1.108644 #> ds 1 m1 3 2.2 3.268e+00 -1.06821 0.9137 -1.169063 #> ds 1 m1 3 3.0 3.268e+00 -0.26821 0.9137 -0.293536 #> ds 1 m1 7 6.5 6.555e+00 -0.05539 1.0186 -0.054377 #> ds 1 m1 7 5.0 6.555e+00 -1.55539 1.0186 -1.527022 #> ds 1 m1 14 10.2 1.017e+01 0.03108 1.1902 0.026117 #> ds 1 m1 14 9.5 1.017e+01 -0.66892 1.1902 -0.562010 #> ds 1 m1 28 12.2 1.270e+01 -0.50262 1.3342 -0.376708 #> ds 1 m1 28 13.4 1.270e+01 0.69738 1.3342 0.522686 #> ds 1 m1 60 11.8 1.078e+01 1.01734 1.2236 0.831403 #> ds 1 m1 60 13.2 1.078e+01 2.41734 1.2236 1.975530 #> ds 1 m1 90 6.6 7.686e+00 -1.08586 1.0670 -1.017675 #> ds 1 m1 90 9.3 7.686e+00 1.61414 1.0670 1.512779 #> ds 1 m1 120 3.5 5.205e+00 -1.70467 0.9684 -1.760250 #> ds 1 m1 120 5.4 5.205e+00 0.19533 0.9684 0.201701 #> ds 2 parent 0 118.0 1.011e+02 16.90049 8.0554 2.098026 #> ds 2 parent 0 99.8 1.011e+02 -1.29951 8.0554 -0.161321 #> ds 2 parent 1 90.2 9.574e+01 -5.53784 7.6334 -0.725473 #> ds 2 parent 1 94.6 9.574e+01 -1.13784 7.6334 -0.149060 #> ds 2 parent 3 96.1 8.638e+01 9.72233 6.8975 1.409551 #> ds 2 parent 3 78.4 8.638e+01 -7.97767 6.8975 -1.156610 #> ds 2 parent 7 77.9 7.194e+01 5.95854 5.7651 1.033547 #> ds 2 parent 7 77.7 7.194e+01 5.75854 5.7651 0.998856 #> ds 2 parent 14 56.0 5.558e+01 0.42141 4.4885 0.093888 #> ds 2 parent 14 54.7 5.558e+01 -0.87859 4.4885 -0.195742 #> ds 2 parent 28 36.6 3.852e+01 -1.92382 3.1746 -0.605999 #> ds 2 parent 28 36.8 3.852e+01 -1.72382 3.1746 -0.543000 #> ds 2 parent 60 22.1 2.108e+01 1.02043 1.8856 0.541168 #> ds 2 parent 60 24.7 2.108e+01 3.62043 1.8856 1.920034 #> ds 2 parent 90 12.4 1.250e+01 -0.09675 1.3220 -0.073184 #> ds 2 parent 90 10.8 1.250e+01 -1.69675 1.3220 -1.283492 #> ds 2 parent 120 6.8 7.426e+00 -0.62587 1.0554 -0.593027 #> ds 2 parent 120 7.9 7.426e+00 0.47413 1.0554 0.449242 #> ds 2 m1 1 1.3 1.417e+00 -0.11735 0.8835 -0.132825 #> ds 2 m1 3 3.7 3.823e+00 -0.12301 0.9271 -0.132673 #> ds 2 m1 3 4.7 3.823e+00 0.87699 0.9271 0.945909 #> ds 2 m1 7 8.1 7.288e+00 0.81180 1.0494 0.773619 #> ds 2 m1 7 7.9 7.288e+00 0.61180 1.0494 0.583025 #> ds 2 m1 14 10.1 1.057e+01 -0.46957 1.2119 -0.387459 #> ds 2 m1 14 10.3 1.057e+01 -0.26957 1.2119 -0.222432 #> ds 2 m1 28 10.7 1.234e+01 -1.63555 1.3124 -1.246185 #> ds 2 m1 28 12.2 1.234e+01 -0.13555 1.3124 -0.103281 #> ds 2 m1 60 10.7 1.065e+01 0.04641 1.2165 0.038151 #> ds 2 m1 60 12.5 1.065e+01 1.84641 1.2165 1.517773 #> ds 2 m1 90 9.1 8.177e+00 0.92337 1.0896 0.847403 #> ds 2 m1 90 7.4 8.177e+00 -0.77663 1.0896 -0.712734 #> ds 2 m1 120 6.1 5.966e+00 0.13404 0.9956 0.134631 #> ds 2 m1 120 4.5 5.966e+00 -1.46596 0.9956 -1.472460 #> ds 3 parent 0 106.2 1.011e+02 5.10049 8.0554 0.633175 #> ds 3 parent 0 106.9 1.011e+02 5.80049 8.0554 0.720073 #> ds 3 parent 1 107.4 9.365e+01 13.74627 7.4695 1.840332 #> ds 3 parent 1 96.1 9.365e+01 2.44627 7.4695 0.327504 #> ds 3 parent 3 79.4 8.139e+01 -1.99118 6.5059 -0.306058 #> ds 3 parent 3 82.6 8.139e+01 1.20882 6.5059 0.185803 #> ds 3 parent 7 63.9 6.445e+01 -0.54666 5.1792 -0.105549 #> ds 3 parent 7 62.4 6.445e+01 -2.04666 5.1792 -0.395170 #> ds 3 parent 14 51.0 4.830e+01 2.69944 3.9247 0.687800 #> ds 3 parent 14 47.1 4.830e+01 -1.20056 3.9247 -0.305896 #> ds 3 parent 28 36.1 3.426e+01 1.83885 2.8516 0.644839 #> ds 3 parent 28 36.6 3.426e+01 2.33885 2.8516 0.820177 #> ds 3 parent 60 20.1 1.968e+01 0.42208 1.7881 0.236053 #> ds 3 parent 60 19.8 1.968e+01 0.12208 1.7881 0.068273 #> ds 3 parent 90 11.3 1.194e+01 -0.64013 1.2893 -0.496496 #> ds 3 parent 90 10.7 1.194e+01 -1.24013 1.2893 -0.961865 #> ds 3 parent 120 8.2 7.247e+00 0.95264 1.0476 0.909381 #> ds 3 parent 120 7.3 7.247e+00 0.05264 1.0476 0.050254 #> ds 3 m1 0 0.8 -2.956e-12 0.80000 0.8763 0.912928 #> ds 3 m1 1 1.8 1.757e+00 0.04318 0.8873 0.048666 #> ds 3 m1 1 2.3 1.757e+00 0.54318 0.8873 0.612186 #> ds 3 m1 3 4.2 4.566e+00 -0.36607 0.9480 -0.386149 #> ds 3 m1 3 4.1 4.566e+00 -0.46607 0.9480 -0.491634 #> ds 3 m1 7 6.8 8.157e+00 -1.35680 1.0887 -1.246241 #> ds 3 m1 7 10.1 8.157e+00 1.94320 1.0887 1.784855 #> ds 3 m1 14 11.4 1.085e+01 0.55367 1.2272 0.451182 #> ds 3 m1 14 12.8 1.085e+01 1.95367 1.2272 1.592023 #> ds 3 m1 28 11.5 1.149e+01 0.01098 1.2633 0.008689 #> ds 3 m1 28 10.6 1.149e+01 -0.88902 1.2633 -0.703717 #> ds 3 m1 60 7.5 9.295e+00 -1.79500 1.1445 -1.568351 #> ds 3 m1 60 8.6 9.295e+00 -0.69500 1.1445 -0.607245 #> ds 3 m1 90 7.3 7.017e+00 0.28305 1.0377 0.272775 #> ds 3 m1 90 8.1 7.017e+00 1.08305 1.0377 1.043720 #> ds 3 m1 120 5.3 5.087e+00 0.21272 0.9645 0.220547 #> ds 3 m1 120 3.8 5.087e+00 -1.28728 0.9645 -1.334660 #> ds 4 parent 0 104.7 1.011e+02 3.60049 8.0554 0.446965 #> ds 4 parent 0 88.3 1.011e+02 -12.79951 8.0554 -1.588930 #> ds 4 parent 1 94.2 9.755e+01 -3.35176 7.7762 -0.431030 #> ds 4 parent 1 94.6 9.755e+01 -2.95176 7.7762 -0.379591 #> ds 4 parent 3 78.1 9.095e+01 -12.85198 7.2570 -1.770981 #> ds 4 parent 3 96.5 9.095e+01 5.54802 7.2570 0.764508 #> ds 4 parent 7 76.2 7.949e+01 -3.29267 6.3569 -0.517966 #> ds 4 parent 7 77.8 7.949e+01 -1.69267 6.3569 -0.266272 #> ds 4 parent 14 70.8 6.384e+01 6.95621 5.1321 1.355423 #> ds 4 parent 14 67.3 6.384e+01 3.45621 5.1321 0.673445 #> ds 4 parent 28 43.1 4.345e+01 -0.35291 3.5515 -0.099370 #> ds 4 parent 28 45.1 4.345e+01 1.64709 3.5515 0.463771 #> ds 4 parent 60 21.3 2.137e+01 -0.07478 1.9063 -0.039229 #> ds 4 parent 60 23.5 2.137e+01 2.12522 1.9063 1.114813 #> ds 4 parent 90 11.8 1.205e+01 -0.24925 1.2957 -0.192375 #> ds 4 parent 90 12.1 1.205e+01 0.05075 1.2957 0.039168 #> ds 4 parent 120 7.0 6.967e+00 0.03315 1.0356 0.032013 #> ds 4 parent 120 6.2 6.967e+00 -0.76685 1.0356 -0.740510 #> ds 4 m1 0 1.6 1.421e-13 1.60000 0.8763 1.825856 #> ds 4 m1 1 0.9 7.250e-01 0.17503 0.8782 0.199310 #> ds 4 m1 3 3.7 2.038e+00 1.66201 0.8910 1.865236 #> ds 4 m1 3 2.0 2.038e+00 -0.03799 0.8910 -0.042637 #> ds 4 m1 7 3.6 4.186e+00 -0.58623 0.9369 -0.625692 #> ds 4 m1 7 3.8 4.186e+00 -0.38623 0.9369 -0.412230 #> ds 4 m1 14 7.1 6.752e+00 0.34768 1.0266 0.338666 #> ds 4 m1 14 6.6 6.752e+00 -0.15232 1.0266 -0.148372 #> ds 4 m1 28 9.5 9.034e+00 0.46628 1.1313 0.412159 #> ds 4 m1 28 9.3 9.034e+00 0.26628 1.1313 0.235373 #> ds 4 m1 60 8.3 8.634e+00 -0.33359 1.1115 -0.300112 #> ds 4 m1 60 9.0 8.634e+00 0.36641 1.1115 0.329645 #> ds 4 m1 90 6.6 6.671e+00 -0.07091 1.0233 -0.069295 #> ds 4 m1 90 7.7 6.671e+00 1.02909 1.0233 1.005691 #> ds 4 m1 120 3.7 4.823e+00 -1.12301 0.9559 -1.174763 #> ds 4 m1 120 3.5 4.823e+00 -1.32301 0.9559 -1.383979 #> ds 5 parent 0 110.4 1.011e+02 9.30049 8.0554 1.154563 #> ds 5 parent 0 112.1 1.011e+02 11.00049 8.0554 1.365601 #> ds 5 parent 1 93.5 9.440e+01 -0.90098 7.5282 -0.119681 #> ds 5 parent 1 91.0 9.440e+01 -3.40098 7.5282 -0.451764 #> ds 5 parent 3 71.0 8.287e+01 -11.86698 6.6217 -1.792122 #> ds 5 parent 3 89.7 8.287e+01 6.83302 6.6217 1.031907 #> ds 5 parent 7 60.4 6.562e+01 -5.22329 5.2711 -0.990936 #> ds 5 parent 7 59.1 6.562e+01 -6.52329 5.2711 -1.237566 #> ds 5 parent 14 56.5 4.739e+01 9.10588 3.8548 2.362225 #> ds 5 parent 14 47.0 4.739e+01 -0.39412 3.8548 -0.102240 #> ds 5 parent 28 30.2 3.118e+01 -0.98128 2.6206 -0.374451 #> ds 5 parent 28 23.9 3.118e+01 -7.28128 2.6206 -2.778500 #> ds 5 parent 60 17.0 1.804e+01 -1.03959 1.6761 -0.620224 #> ds 5 parent 60 18.7 1.804e+01 0.66041 1.6761 0.394008 #> ds 5 parent 90 11.3 1.165e+01 -0.35248 1.2727 -0.276958 #> ds 5 parent 90 11.9 1.165e+01 0.24752 1.2727 0.194488 #> ds 5 parent 120 9.0 7.556e+00 1.44368 1.0612 1.360449 #> ds 5 parent 120 8.1 7.556e+00 0.54368 1.0612 0.512338 #> ds 5 m1 0 0.7 -1.421e-14 0.70000 0.8763 0.798812 #> ds 5 m1 1 3.0 3.160e+00 -0.15979 0.9113 -0.175340 #> ds 5 m1 1 2.6 3.160e+00 -0.55979 0.9113 -0.614254 #> ds 5 m1 3 5.1 8.448e+00 -3.34789 1.1026 -3.036487 #> ds 5 m1 3 7.5 8.448e+00 -0.94789 1.1026 -0.859720 #> ds 5 m1 7 16.5 1.581e+01 0.68760 1.5286 0.449839 #> ds 5 m1 7 19.0 1.581e+01 3.18760 1.5286 2.085373 #> ds 5 m1 14 22.9 2.218e+01 0.71983 1.9632 0.366658 #> ds 5 m1 14 23.2 2.218e+01 1.01983 1.9632 0.519469 #> ds 5 m1 28 22.2 2.425e+01 -2.05105 2.1113 -0.971479 #> ds 5 m1 28 24.4 2.425e+01 0.14895 2.1113 0.070552 #> ds 5 m1 60 15.5 1.876e+01 -3.25968 1.7250 -1.889646 #> ds 5 m1 60 19.8 1.876e+01 1.04032 1.7250 0.603074 #> ds 5 m1 90 14.9 1.365e+01 1.25477 1.3914 0.901806 #> ds 5 m1 90 14.2 1.365e+01 0.55477 1.3914 0.398714 #> ds 5 m1 120 10.9 9.726e+00 1.17443 1.1667 1.006587 #> ds 5 m1 120 10.4 9.726e+00 0.67443 1.1667 0.578044 # Add a correlation between random effects of g and k2 cov_model_3 <- f_saem_dfop_sfo_2$so@model@covariance.model cov_model_3[\"log_k2\", \"g_qlogis\"] <- 1 cov_model_3[\"g_qlogis\", \"log_k2\"] <- 1 f_saem_dfop_sfo_3 <- update(f_saem_dfop_sfo, covariance.model = cov_model_3) intervals(f_saem_dfop_sfo_3) #> Approximate 95% confidence intervals #> #> Fixed effects: #> lower est. upper #> parent_0 98.42519529 101.51623115 104.60726702 #> k_m1 0.01505059 0.01662123 0.01835577 #> f_parent_to_m1 0.20100222 0.27477835 0.36332008 #> k1 0.07347479 0.10139028 0.13991179 #> k2 0.01469861 0.01771120 0.02134125 #> g 0.35506898 0.46263682 0.57379888 #> #> Random effects: #> lower est. upper #> sd(f_parent_qlogis) 0.3827416 0.4435866 0.5044315 #> sd(log_k1) 0.1226277 0.2981783 0.4737289 #> sd(log_k2) -0.5457764 0.1912531 0.9282825 #> sd(g_qlogis) 0.1483976 0.3997298 0.6510619 #> corr(log_k2,g_qlogis) -0.8537145 -0.5845703 -0.3154261 #> #> #> lower est. upper #> a.1 0.6732869 0.87421677 1.0751467 #> b.1 0.0640392 0.07925135 0.0944635 # The correlation does not improve the fit judged by AIC and BIC, although # the likelihood is higher with the additional parameter anova(f_saem_dfop_sfo, f_saem_dfop_sfo_2, f_saem_dfop_sfo_3) #> Data: 171 observations of 2 variable(s) grouped in 5 datasets #> #> npar AIC BIC Lik #> f_saem_dfop_sfo_2 12 806.91 802.23 -391.46 #> f_saem_dfop_sfo_3 13 807.96 802.88 -390.98 #> f_saem_dfop_sfo 14 810.83 805.36 -391.41 # }"},{"path":"https://pkgdown.jrwb.de/mkin/reference/summary_listing.html","id":null,"dir":"Reference","previous_headings":"","what":"Display the output of a summary function according to the output format — summary_listing","title":"Display the output of a summary function according to the output format — summary_listing","text":"function intended use R markdown code chunk chunk option results = \"asis\".","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/summary_listing.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Display the output of a summary function according to the output format — summary_listing","text":"","code":"summary_listing(object, caption = NULL, label = NULL, clearpage = TRUE) tex_listing(object, caption = NULL, label = NULL, clearpage = TRUE) html_listing(object, caption = NULL)"},{"path":"https://pkgdown.jrwb.de/mkin/reference/summary_listing.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Display the output of a summary function according to the output format — summary_listing","text":"object object summary listed caption optional caption label optional label, ignored html output clearpage new page started listing? Ignored html output","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/synthetic_data_for_UBA_2014.html","id":null,"dir":"Reference","previous_headings":"","what":"Synthetic datasets for one parent compound with two metabolites — synthetic_data_for_UBA_2014","title":"Synthetic datasets for one parent compound with two metabolites — synthetic_data_for_UBA_2014","text":"12 datasets generated using four different models three different variance components. four models either SFO DFOP model either two sequential two parallel metabolites. Variance component '' based normal distribution standard deviation 3, Variance component 'b' also based normal distribution, standard deviation 7. Variance component 'c' based error model Rocke Lorenzato (1995), minimum standard deviation (small y values) 0.5, proportionality constant 0.07 increase standard deviation y. Note simplified version error model proposed Rocke Lorenzato (1995), model error measured values approximates lognormal distribution high values, whereas using normally distributed error components along. Initial concentrations metabolites values adding variance component resulted value assumed limit detection 0.1 set NA. example, first dataset title SFO_lin_a based SFO model two sequential metabolites (linear pathway), added variance component ''. Compare also code example section see degradation models.","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/synthetic_data_for_UBA_2014.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Synthetic datasets for one parent compound with two metabolites — synthetic_data_for_UBA_2014","text":"","code":"synthetic_data_for_UBA_2014"},{"path":"https://pkgdown.jrwb.de/mkin/reference/synthetic_data_for_UBA_2014.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Synthetic datasets for one parent compound with two metabolites — synthetic_data_for_UBA_2014","text":"list containing twelve datasets R6 class defined mkinds, containing, among others, following components title name dataset, e.g. SFO_lin_a data data frame data form expected mkinfit","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/synthetic_data_for_UBA_2014.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"Synthetic datasets for one parent compound with two metabolites — synthetic_data_for_UBA_2014","text":"Ranke (2014) Prüfung und Validierung von Modellierungssoftware als Alternative zu ModelMaker 4.0, Umweltbundesamt Projektnummer 27452 Rocke, David M. und Lorenzato, Stefan (1995) two-component model measurement error analytical chemistry. Technometrics 37(2), 176-184.","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/synthetic_data_for_UBA_2014.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Synthetic datasets for one parent compound with two metabolites — synthetic_data_for_UBA_2014","text":"","code":"# \\dontrun{ # The data have been generated using the following kinetic models m_synth_SFO_lin <- mkinmod(parent = list(type = \"SFO\", to = \"M1\"), M1 = list(type = \"SFO\", to = \"M2\"), M2 = list(type = \"SFO\"), use_of_ff = \"max\") #> Temporary DLL for differentials generated and loaded m_synth_SFO_par <- mkinmod(parent = list(type = \"SFO\", to = c(\"M1\", \"M2\"), sink = FALSE), M1 = list(type = \"SFO\"), M2 = list(type = \"SFO\"), use_of_ff = \"max\") #> Temporary DLL for differentials generated and loaded m_synth_DFOP_lin <- mkinmod(parent = list(type = \"DFOP\", to = \"M1\"), M1 = list(type = \"SFO\", to = \"M2\"), M2 = list(type = \"SFO\"), use_of_ff = \"max\") #> Temporary DLL for differentials generated and loaded m_synth_DFOP_par <- mkinmod(parent = list(type = \"DFOP\", to = c(\"M1\", \"M2\"), sink = FALSE), M1 = list(type = \"SFO\"), M2 = list(type = \"SFO\"), use_of_ff = \"max\") #> Temporary DLL for differentials generated and loaded # The model predictions without intentional error were generated as follows sampling_times = c(0, 1, 3, 7, 14, 28, 60, 90, 120) d_synth_SFO_lin <- mkinpredict(m_synth_SFO_lin, c(k_parent = 0.7, f_parent_to_M1 = 0.8, k_M1 = 0.3, f_M1_to_M2 = 0.7, k_M2 = 0.02), c(parent = 100, M1 = 0, M2 = 0), sampling_times) d_synth_DFOP_lin <- mkinpredict(m_synth_DFOP_lin, c(k1 = 0.2, k2 = 0.02, g = 0.5, f_parent_to_M1 = 0.5, k_M1 = 0.3, f_M1_to_M2 = 0.7, k_M2 = 0.02), c(parent = 100, M1 = 0, M2 = 0), sampling_times) d_synth_SFO_par <- mkinpredict(m_synth_SFO_par, c(k_parent = 0.2, f_parent_to_M1 = 0.8, k_M1 = 0.01, f_parent_to_M2 = 0.2, k_M2 = 0.02), c(parent = 100, M1 = 0, M2 = 0), sampling_times) d_synth_DFOP_par <- mkinpredict(m_synth_DFOP_par, c(k1 = 0.3, k2 = 0.02, g = 0.7, f_parent_to_M1 = 0.6, k_M1 = 0.04, f_parent_to_M2 = 0.4, k_M2 = 0.01), c(parent = 100, M1 = 0, M2 = 0), sampling_times) # Construct names for datasets with errors d_synth_names = paste0(\"d_synth_\", c(\"SFO_lin\", \"SFO_par\", \"DFOP_lin\", \"DFOP_par\")) # Original function used or adding errors. The add_err function now published # with this package is a slightly generalised version where the names of # secondary compartments that should have an initial value of zero (M1 and M2 # in this case) are not hardcoded any more. # add_err = function(d, sdfunc, LOD = 0.1, reps = 2, seed = 123456789) # { # set.seed(seed) # d_long = mkin_wide_to_long(d, time = \"time\") # d_rep = data.frame(lapply(d_long, rep, each = 2)) # d_rep$value = rnorm(length(d_rep$value), d_rep$value, sdfunc(d_rep$value)) # # d_rep[d_rep$time == 0 & d_rep$name %in% c(\"M1\", \"M2\"), \"value\"] <- 0 # d_NA <- transform(d_rep, value = ifelse(value < LOD, NA, value)) # d_NA$value <- round(d_NA$value, 1) # return(d_NA) # } # The following is the simplified version of the two-component model of Rocke # and Lorenzato (1995) sdfunc_twocomp = function(value, sd_low, rsd_high) { sqrt(sd_low^2 + value^2 * rsd_high^2) } # Add the errors. for (d_synth_name in d_synth_names) { d_synth = get(d_synth_name) assign(paste0(d_synth_name, \"_a\"), add_err(d_synth, function(value) 3)) assign(paste0(d_synth_name, \"_b\"), add_err(d_synth, function(value) 7)) assign(paste0(d_synth_name, \"_c\"), add_err(d_synth, function(value) sdfunc_twocomp(value, 0.5, 0.07))) } d_synth_err_names = c( paste(rep(d_synth_names, each = 3), letters[1:3], sep = \"_\") ) # This is just one example of an evaluation using the kinetic model used for # the generation of the data fit <- mkinfit(m_synth_SFO_lin, synthetic_data_for_UBA_2014[[1]]$data, quiet = TRUE) plot_sep(fit) summary(fit) #> mkin version used for fitting: 1.2.6 #> R version used for fitting: 4.3.2 #> Date of fit: Thu Nov 16 04:20:07 2023 #> Date of summary: Thu Nov 16 04:20:07 2023 #> #> Equations: #> d_parent/dt = - k_parent * parent #> d_M1/dt = + f_parent_to_M1 * k_parent * parent - k_M1 * M1 #> d_M2/dt = + f_M1_to_M2 * k_M1 * M1 - k_M2 * M2 #> #> Model predictions using solution type deSolve #> #> Fitted using 848 model solutions performed in 0.166 s #> #> Error model: Constant variance #> #> Error model algorithm: OLS #> #> Starting values for parameters to be optimised: #> value type #> parent_0 101.3500 state #> k_parent 0.1000 deparm #> k_M1 0.1001 deparm #> k_M2 0.1002 deparm #> f_parent_to_M1 0.5000 deparm #> f_M1_to_M2 0.5000 deparm #> #> Starting values for the transformed parameters actually optimised: #> value lower upper #> parent_0 101.350000 -Inf Inf #> log_k_parent -2.302585 -Inf Inf #> log_k_M1 -2.301586 -Inf Inf #> log_k_M2 -2.300587 -Inf Inf #> f_parent_qlogis 0.000000 -Inf Inf #> f_M1_qlogis 0.000000 -Inf Inf #> #> Fixed parameter values: #> value type #> M1_0 0 state #> M2_0 0 state #> #> Results: #> #> AIC BIC logLik #> 188.7274 200.3723 -87.36368 #> #> Optimised, transformed parameters with symmetric confidence intervals: #> Estimate Std. Error Lower Upper #> parent_0 102.1000 1.57000 98.8600 105.3000 #> log_k_parent -0.3020 0.03885 -0.3812 -0.2229 #> log_k_M1 -1.2070 0.07123 -1.3520 -1.0620 #> log_k_M2 -3.9010 0.06571 -4.0350 -3.7670 #> f_parent_qlogis 1.2010 0.23530 0.7216 1.6800 #> f_M1_qlogis 0.9589 0.24890 0.4520 1.4660 #> sigma 2.2730 0.25740 1.7490 2.7970 #> #> Parameter correlation: #> parent_0 log_k_parent log_k_M1 log_k_M2 f_parent_qlogis #> parent_0 1.000e+00 3.933e-01 -1.605e-01 2.819e-02 -4.624e-01 #> log_k_parent 3.933e-01 1.000e+00 -4.082e-01 7.166e-02 -5.682e-01 #> log_k_M1 -1.605e-01 -4.082e-01 1.000e+00 -3.929e-01 7.478e-01 #> log_k_M2 2.819e-02 7.166e-02 -3.929e-01 1.000e+00 -2.658e-01 #> f_parent_qlogis -4.624e-01 -5.682e-01 7.478e-01 -2.658e-01 1.000e+00 #> f_M1_qlogis 1.614e-01 4.102e-01 -8.109e-01 5.419e-01 -8.605e-01 #> sigma -1.377e-08 7.536e-10 1.089e-08 -4.422e-08 7.124e-09 #> f_M1_qlogis sigma #> parent_0 1.614e-01 -1.377e-08 #> log_k_parent 4.102e-01 7.536e-10 #> log_k_M1 -8.109e-01 1.089e-08 #> log_k_M2 5.419e-01 -4.422e-08 #> f_parent_qlogis -8.605e-01 7.124e-09 #> f_M1_qlogis 1.000e+00 -2.685e-08 #> sigma -2.685e-08 1.000e+00 #> #> 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 102.10000 65.000 7.281e-36 98.86000 105.30000 #> k_parent 0.73930 25.740 2.948e-23 0.68310 0.80020 #> k_M1 0.29920 14.040 1.577e-15 0.25880 0.34590 #> k_M2 0.02023 15.220 1.653e-16 0.01769 0.02312 #> f_parent_to_M1 0.76870 18.370 7.295e-19 0.67300 0.84290 #> f_M1_to_M2 0.72290 14.500 6.418e-16 0.61110 0.81240 #> sigma 2.27300 8.832 2.161e-10 1.74900 2.79700 #> #> FOCUS Chi2 error levels in percent: #> err.min n.optim df #> All data 8.454 6 17 #> parent 8.660 2 6 #> M1 10.583 2 5 #> M2 3.586 2 6 #> #> Resulting formation fractions: #> ff #> parent_M1 0.7687 #> parent_sink 0.2313 #> M1_M2 0.7229 #> M1_sink 0.2771 #> #> Estimated disappearance times: #> DT50 DT90 #> parent 0.9376 3.114 #> M1 2.3170 7.697 #> M2 34.2689 113.839 #> #> Data: #> time variable observed predicted residual #> 0 parent 101.5 1.021e+02 -0.56248 #> 0 parent 101.2 1.021e+02 -0.86248 #> 1 parent 53.9 4.873e+01 5.17118 #> 1 parent 47.5 4.873e+01 -1.22882 #> 3 parent 10.4 1.111e+01 -0.70773 #> 3 parent 7.6 1.111e+01 -3.50773 #> 7 parent 1.1 5.772e-01 0.52283 #> 7 parent 0.3 5.772e-01 -0.27717 #> 14 parent 3.5 3.264e-03 3.49674 #> 28 parent 3.2 1.045e-07 3.20000 #> 90 parent 0.6 9.532e-10 0.60000 #> 120 parent 3.5 -5.940e-10 3.50000 #> 1 M1 36.4 3.479e+01 1.61088 #> 1 M1 37.4 3.479e+01 2.61088 #> 3 M1 34.3 3.937e+01 -5.07027 #> 3 M1 39.8 3.937e+01 0.42973 #> 7 M1 15.1 1.549e+01 -0.38715 #> 7 M1 17.8 1.549e+01 2.31285 #> 14 M1 5.8 1.995e+00 3.80469 #> 14 M1 1.2 1.995e+00 -0.79531 #> 60 M1 0.5 2.111e-06 0.50000 #> 90 M1 3.2 -9.672e-10 3.20000 #> 120 M1 1.5 7.670e-10 1.50000 #> 120 M1 0.6 7.670e-10 0.60000 #> 1 M2 4.8 4.455e+00 0.34517 #> 3 M2 20.9 2.153e+01 -0.62527 #> 3 M2 19.3 2.153e+01 -2.22527 #> 7 M2 42.0 4.192e+01 0.07941 #> 7 M2 43.1 4.192e+01 1.17941 #> 14 M2 49.4 4.557e+01 3.83353 #> 14 M2 44.3 4.557e+01 -1.26647 #> 28 M2 34.6 3.547e+01 -0.87275 #> 28 M2 33.0 3.547e+01 -2.47275 #> 60 M2 18.8 1.858e+01 0.21837 #> 60 M2 17.6 1.858e+01 -0.98163 #> 90 M2 10.6 1.013e+01 0.47130 #> 90 M2 10.8 1.013e+01 0.67130 #> 120 M2 9.8 5.521e+00 4.27893 #> 120 M2 3.3 5.521e+00 -2.22107 # }"},{"path":"https://pkgdown.jrwb.de/mkin/reference/test_data_from_UBA_2014.html","id":null,"dir":"Reference","previous_headings":"","what":"Three experimental datasets from two water sediment systems and one soil — test_data_from_UBA_2014","title":"Three experimental datasets from two water sediment systems and one soil — test_data_from_UBA_2014","text":"datasets used comparative validation several kinetic evaluation software packages (Ranke, 2014).","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/test_data_from_UBA_2014.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Three experimental datasets from two water sediment systems and one soil — test_data_from_UBA_2014","text":"","code":"test_data_from_UBA_2014"},{"path":"https://pkgdown.jrwb.de/mkin/reference/test_data_from_UBA_2014.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Three experimental datasets from two water sediment systems and one soil — test_data_from_UBA_2014","text":"list containing three datasets R6 class defined mkinds. dataset , among others, following components title name dataset, e.g. UBA_2014_WS_river data data frame data form expected mkinfit","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/test_data_from_UBA_2014.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"Three experimental datasets from two water sediment systems and one soil — test_data_from_UBA_2014","text":"Ranke (2014) Prüfung und Validierung von Modellierungssoftware als Alternative zu ModelMaker 4.0, Umweltbundesamt Projektnummer 27452","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/test_data_from_UBA_2014.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Three experimental datasets from two water sediment systems and one soil — test_data_from_UBA_2014","text":"","code":"# \\dontrun{ # This is a level P-II evaluation of the dataset according to the FOCUS kinetics # guidance. Due to the strong correlation of the parameter estimates, the # covariance matrix is not returned. Note that level P-II evaluations are # generally considered deprecated due to the frequent occurrence of such # large parameter correlations, among other reasons (e.g. the adequacy of the # model). m_ws <- mkinmod(parent_w = mkinsub(\"SFO\", \"parent_s\"), parent_s = mkinsub(\"SFO\", \"parent_w\")) #> Temporary DLL for differentials generated and loaded f_river <- mkinfit(m_ws, test_data_from_UBA_2014[[1]]$data, quiet = TRUE) #> Warning: Observations with value of zero were removed from the data plot_sep(f_river) summary(f_river)$bpar #> Warning: Could not calculate correlation; no covariance matrix #> Estimate se_notrans t value Pr(>t) Lower Upper #> parent_w_0 95.91998118 NA NA NA NA NA #> k_parent_w 0.41145375 NA NA NA NA NA #> k_parent_s 0.04663944 NA NA NA NA NA #> f_parent_w_to_parent_s 0.12467894 NA NA NA NA NA #> f_parent_s_to_parent_w 0.50000000 NA NA NA NA NA #> sigma 3.13612618 NA NA NA NA NA mkinerrmin(f_river) #> err.min n.optim df #> All data 0.1090929 5 6 #> parent_w 0.0817436 3 3 #> parent_s 0.1619965 2 3 # This is the evaluation used for the validation of software packages # in the expertise from 2014 m_soil <- mkinmod(parent = mkinsub(\"SFO\", c(\"M1\", \"M2\")), M1 = mkinsub(\"SFO\", \"M3\"), M2 = mkinsub(\"SFO\", \"M3\"), M3 = mkinsub(\"SFO\"), use_of_ff = \"max\") #> Temporary DLL for differentials generated and loaded f_soil <- mkinfit(m_soil, test_data_from_UBA_2014[[3]]$data, quiet = TRUE) #> Warning: Observations with value of zero were removed from the data plot_sep(f_soil, lpos = c(\"topright\", \"topright\", \"topright\", \"bottomright\")) summary(f_soil)$bpar #> Estimate se_notrans t value Pr(>t) Lower #> parent_0 76.55425650 0.859186398 89.1008711 1.113861e-26 74.755959420 #> k_parent 0.12081956 0.004601918 26.2541722 1.077359e-16 0.111561575 #> k_M1 0.84258615 0.806159719 1.0451851 1.545266e-01 0.113779564 #> k_M2 0.04210880 0.017083034 2.4649483 1.170188e-02 0.018013857 #> k_M3 0.01122918 0.007245855 1.5497385 6.885051e-02 0.002909431 #> f_parent_to_M1 0.32240200 0.240783878 1.3389684 9.819070e-02 NA #> f_parent_to_M2 0.16099855 0.033691952 4.7785463 6.531136e-05 NA #> f_M1_to_M3 0.27921507 0.269423709 1.0363419 1.565266e-01 0.022978202 #> f_M2_to_M3 0.55641252 0.595119937 0.9349586 1.807707e-01 0.008002509 #> sigma 1.14005399 0.149696423 7.6157731 1.727024e-07 0.826735778 #> Upper #> parent_0 78.35255358 #> k_parent 0.13084582 #> k_M1 6.23970946 #> k_M2 0.09843260 #> k_M3 0.04333992 #> f_parent_to_M1 NA #> f_parent_to_M2 NA #> f_M1_to_M3 0.86450778 #> f_M2_to_M3 0.99489895 #> sigma 1.45337221 mkinerrmin(f_soil) #> err.min n.optim df #> All data 0.09649963 9 20 #> parent 0.04721283 2 6 #> M1 0.26551208 2 5 #> M2 0.20327575 2 5 #> M3 0.05196550 3 4 # }"},{"path":"https://pkgdown.jrwb.de/mkin/reference/transform_odeparms.html","id":null,"dir":"Reference","previous_headings":"","what":"Functions to transform and backtransform kinetic parameters for fitting — transform_odeparms","title":"Functions to transform and backtransform kinetic parameters for fitting — transform_odeparms","text":"transformations intended map parameters take restricted values full scale real numbers. kinetic rate constants parameters can take positive values, simple log transformation used. compositional parameters, formations fractions always sum 1 can negative, ilr transformation used.","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/transform_odeparms.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Functions to transform and backtransform kinetic parameters for fitting — transform_odeparms","text":"","code":"transform_odeparms( parms, mkinmod, transform_rates = TRUE, transform_fractions = TRUE ) backtransform_odeparms( transparms, mkinmod, transform_rates = TRUE, transform_fractions = TRUE )"},{"path":"https://pkgdown.jrwb.de/mkin/reference/transform_odeparms.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Functions to transform and backtransform kinetic parameters for fitting — transform_odeparms","text":"parms Parameters kinetic models used differential equations. mkinmod kinetic model class mkinmod, containing names model variables needed grouping formation fractions ilr transformation, parameter names information pathway sink included model. transform_rates Boolean specifying kinetic rate constants transformed model specification used fitting better compliance assumption normal distribution estimator. TRUE, also alpha beta parameters FOMC model log-transformed, well k1 k2 rate constants DFOP HS models break point tb HS model. transform_fractions Boolean specifying formation fractions constants transformed model specification used fitting better compliance assumption normal distribution estimator. default (TRUE) transformations. g parameter DFOP model also seen fraction. single fraction transformed (g parameter DFOP single target variable e.g. single metabolite plus pathway sink), logistic transformation used stats::qlogis(). cases, .e. two formation fractions need transformed whose sum exceed one, ilr transformation used. transparms Transformed parameters kinetic models used fitting procedure.","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/transform_odeparms.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Functions to transform and backtransform kinetic parameters for fitting — transform_odeparms","text":"vector transformed backtransformed parameters","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/transform_odeparms.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Functions to transform and backtransform kinetic parameters for fitting — transform_odeparms","text":"transformation sets formation fractions fragile, supposes ordering components forward backward transformation. problem internal use mkinfit.","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/transform_odeparms.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Functions to transform and backtransform kinetic parameters for fitting — transform_odeparms","text":"Johannes Ranke","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/transform_odeparms.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Functions to transform and backtransform kinetic parameters for fitting — transform_odeparms","text":"","code":"SFO_SFO <- mkinmod( parent = list(type = \"SFO\", to = \"m1\", sink = TRUE), m1 = list(type = \"SFO\"), use_of_ff = \"min\") #> Temporary DLL for differentials generated and loaded # Fit the model to the FOCUS example dataset D using defaults FOCUS_D <- subset(FOCUS_2006_D, value != 0) # remove zero values to avoid warning fit <- mkinfit(SFO_SFO, FOCUS_D, quiet = TRUE) fit.s <- summary(fit) # Transformed and backtransformed parameters print(fit.s$par, 3) #> Estimate Std. Error Lower Upper #> parent_0 99.60 1.5702 96.40 102.79 #> log_k_parent_sink -3.04 0.0763 -3.19 -2.88 #> log_k_parent_m1 -2.98 0.0403 -3.06 -2.90 #> log_k_m1_sink -5.25 0.1332 -5.52 -4.98 #> sigma 3.13 0.3585 2.40 3.85 print(fit.s$bpar, 3) #> Estimate se_notrans t value Pr(>t) Lower Upper #> parent_0 99.59848 1.57022 63.43 2.30e-36 96.40384 102.7931 #> k_parent_sink 0.04792 0.00365 13.11 6.13e-15 0.04103 0.0560 #> k_parent_m1 0.05078 0.00205 24.80 3.27e-23 0.04678 0.0551 #> k_m1_sink 0.00526 0.00070 7.51 6.16e-09 0.00401 0.0069 #> sigma 3.12550 0.35852 8.72 2.24e-10 2.39609 3.8549 # \\dontrun{ # Compare to the version without transforming rate parameters (does not work # with analytical solution, we get NA values for m1 in predictions) fit.2 <- mkinfit(SFO_SFO, FOCUS_D, transform_rates = FALSE, solution_type = \"deSolve\", quiet = TRUE) fit.2.s <- summary(fit.2) print(fit.2.s$par, 3) #> Estimate Std. Error Lower Upper #> parent_0 99.59848 1.57022 96.40384 1.03e+02 #> k_parent_sink 0.04792 0.00365 0.04049 5.54e-02 #> k_parent_m1 0.05078 0.00205 0.04661 5.49e-02 #> k_m1_sink 0.00526 0.00070 0.00384 6.69e-03 #> sigma 3.12550 0.35852 2.39609 3.85e+00 print(fit.2.s$bpar, 3) #> Estimate se_notrans t value Pr(>t) Lower Upper #> parent_0 99.59848 1.57022 63.43 2.30e-36 96.40384 1.03e+02 #> k_parent_sink 0.04792 0.00365 13.11 6.13e-15 0.04049 5.54e-02 #> k_parent_m1 0.05078 0.00205 24.80 3.27e-23 0.04661 5.49e-02 #> k_m1_sink 0.00526 0.00070 7.51 6.16e-09 0.00384 6.69e-03 #> sigma 3.12550 0.35852 8.72 2.24e-10 2.39609 3.85e+00 # } initials <- fit$start$value names(initials) <- rownames(fit$start) transformed <- fit$start_transformed$value names(transformed) <- rownames(fit$start_transformed) transform_odeparms(initials, SFO_SFO) #> parent_0 log_k_parent_sink log_k_parent_m1 log_k_m1_sink #> 100.750000 -2.302585 -2.301586 -2.300587 backtransform_odeparms(transformed, SFO_SFO) #> parent_0 k_parent_sink k_parent_m1 k_m1_sink #> 100.7500 0.1000 0.1001 0.1002 # \\dontrun{ # The case of formation fractions (this is now the default) SFO_SFO.ff <- mkinmod( parent = list(type = \"SFO\", to = \"m1\", sink = TRUE), m1 = list(type = \"SFO\"), use_of_ff = \"max\") #> Temporary DLL for differentials generated and loaded fit.ff <- mkinfit(SFO_SFO.ff, FOCUS_D, quiet = TRUE) fit.ff.s <- summary(fit.ff) print(fit.ff.s$par, 3) #> Estimate Std. Error Lower Upper #> parent_0 99.5985 1.5702 96.404 102.79 #> log_k_parent -2.3157 0.0409 -2.399 -2.23 #> log_k_m1 -5.2475 0.1332 -5.518 -4.98 #> f_parent_qlogis 0.0579 0.0893 -0.124 0.24 #> sigma 3.1255 0.3585 2.396 3.85 print(fit.ff.s$bpar, 3) #> Estimate se_notrans t value Pr(>t) Lower Upper #> parent_0 99.59848 1.57022 63.43 2.30e-36 96.40383 102.7931 #> k_parent 0.09870 0.00403 24.47 4.96e-23 0.09082 0.1073 #> k_m1 0.00526 0.00070 7.51 6.16e-09 0.00401 0.0069 #> f_parent_to_m1 0.51448 0.02230 23.07 3.10e-22 0.46912 0.5596 #> sigma 3.12550 0.35852 8.72 2.24e-10 2.39609 3.8549 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 # And without sink SFO_SFO.ff.2 <- mkinmod( parent = list(type = \"SFO\", to = \"m1\", sink = FALSE), m1 = list(type = \"SFO\"), use_of_ff = \"max\") #> Temporary DLL for differentials generated and loaded fit.ff.2 <- mkinfit(SFO_SFO.ff.2, FOCUS_D, quiet = TRUE) fit.ff.2.s <- summary(fit.ff.2) print(fit.ff.2.s$par, 3) #> Estimate Std. Error Lower Upper #> parent_0 84.79 3.012 78.67 90.91 #> log_k_parent -2.76 0.082 -2.92 -2.59 #> log_k_m1 -4.21 0.123 -4.46 -3.96 #> sigma 8.22 0.943 6.31 10.14 print(fit.ff.2.s$bpar, 3) #> Estimate se_notrans t value Pr(>t) Lower Upper #> parent_0 84.7916 3.01203 28.15 1.92e-25 78.6704 90.913 #> k_parent 0.0635 0.00521 12.19 2.91e-14 0.0538 0.075 #> k_m1 0.0148 0.00182 8.13 8.81e-10 0.0115 0.019 #> sigma 8.2229 0.94323 8.72 1.73e-10 6.3060 10.140 # }"},{"path":"https://pkgdown.jrwb.de/mkin/reference/update.mkinfit.html","id":null,"dir":"Reference","previous_headings":"","what":"Update an mkinfit model with different arguments — update.mkinfit","title":"Update an mkinfit model with different arguments — update.mkinfit","text":"function return updated mkinfit object. fitted degradation model parameters old fit used starting values updated fit. Values specified 'parms.ini' /'state.ini' override starting values.","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/update.mkinfit.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Update an mkinfit model with different arguments — update.mkinfit","text":"","code":"# S3 method for mkinfit update(object, ..., evaluate = TRUE)"},{"path":"https://pkgdown.jrwb.de/mkin/reference/update.mkinfit.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Update an mkinfit model with different arguments — update.mkinfit","text":"object mkinfit object updated ... Arguments mkinfit replace arguments original call. Arguments set NULL remove arguments given original call evaluate call evaluated returned call","code":""},{"path":"https://pkgdown.jrwb.de/mkin/reference/update.mkinfit.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Update an mkinfit model with different arguments — update.mkinfit","text":"","code":"# \\dontrun{ fit <- mkinfit(\"SFO\", subset(FOCUS_2006_D, value != 0), quiet = TRUE) parms(fit) #> parent_0 k_parent sigma #> 99.44423885 0.09793574 3.39632469 plot_err(fit) fit_2 <- update(fit, error_model = \"tc\") parms(fit_2) #> parent_0 k_parent sigma_low rsd_high #> 1.008549e+02 1.005665e-01 3.752222e-03 6.763434e-02 plot_err(fit_2) # }"},{"path":"https://pkgdown.jrwb.de/mkin/news/index.html","id":"mkin-126","dir":"Changelog","previous_headings":"","what":"mkin 1.2.6","title":"mkin 1.2.6","text":"‘inst/rmarkdown/templates/hierarchical_kinetics/skeleton/skeleton.Rmd’: Fix erroneous call ‘endpoints()’ function","code":""},{"path":"https://pkgdown.jrwb.de/mkin/news/index.html","id":"mkin-125-2023-08-09","dir":"Changelog","previous_headings":"","what":"mkin 1.2.5 (2023-08-09)","title":"mkin 1.2.5 (2023-08-09)","text":"‘vignettes/mesotrione_parent_2023.rnw’: Prebuilt vignette showing covariate modelling can done relevant parent degradation models. ‘inst/testdata/mesotrione_soil_efsa_2016}.xlsx’: Another example spreadsheets use ‘read_spreadsheet()’, featuring pH dependent degradation R/illparms.R: Fix detection ill-defined slope error model parameters case estimate negative","code":""},{"path":"https://pkgdown.jrwb.de/mkin/news/index.html","id":"mkin-124-2023-05-19","dir":"Changelog","previous_headings":"","what":"mkin 1.2.4 (2023-05-19)","title":"mkin 1.2.4 (2023-05-19)","text":"R/endpoints.R: Fix calculation endpoints user specified covariate values","code":""},{"path":"https://pkgdown.jrwb.de/mkin/news/index.html","id":"mkin-1231-unreleased","dir":"Changelog","previous_headings":"","what":"mkin 1.2.3.1 (unreleased)","title":"mkin 1.2.3.1 (unreleased)","text":"Small fixes get online docs right (example code R/hierarchical_kinetics, cluster setup cyantraniliprole dmta pathway vignettes, graphics model comparison multistart vignette), rebuild online docs","code":""},{"path":"https://pkgdown.jrwb.de/mkin/news/index.html","id":"mkin-123-2023-04-17","dir":"Changelog","previous_headings":"","what":"mkin 1.2.3 (2023-04-17)","title":"mkin 1.2.3 (2023-04-17)","text":"‘R/{endpoints,parms,plot.mixed.mmkin,summary.saem.mmkin}.R’: Calculate parameters endpoints plot population curves specific covariate values, specific percentiles covariate values used saem fits. Depend current deSolve version possibility avoid resolving symbols shared library (compiled models) , thanks Thomas Petzoldt. ‘inst/rmarkdown/templates/hierarchical_kinetics/skeleton/skeleton.Rmd’: Start new cluster creating model stored user specified location, otherwise symbols found worker processes. ‘tests/testthat/test_compiled_symbols.R’: new tests control problems may introduced possibility use pre-resolved symbols. ‘R/mkinerrmin.R’: Fix typo subset (use = instead ==), thanks Sebastian Meyer spotting work R 4.3.0.","code":""},{"path":"https://pkgdown.jrwb.de/mkin/news/index.html","id":"mkin-122-unreleased","dir":"Changelog","previous_headings":"","what":"mkin 1.2.2 (unreleased)","title":"mkin 1.2.2 (unreleased)","text":"‘inst/rmarkdown/templates/hierarchical_kinetics’: R markdown template facilitate application hierarchical kinetic models. ‘inst/testdata/{cyantraniliprole_soil_efsa_2014,lambda-cyhalothrin_soil_efsa_2014}.xlsx’: Example spreadsheets use ‘read_spreadsheet()’. ‘R/mhmkin.R’: Allow ‘illparms.mhmkin’ object list suitable dimensions value argument ‘no_random_effects’, making possible exclude random effects ill-defined simpler variants set degradation models. Remove possibility exclude random effects based separate fits, work well. ‘R/summary.saem.mmkin.R’: List initial parameter values summary, including random effects error model parameters. Avoid redundant warnings occurred calculation correlations fixed effects case Fisher information matrix inverted. List correlations random effects specified user covariance model. ‘R/parplot.R’: Possibility select top ‘llquant’ fraction fits parameter plots, improved legend text. ‘R/illparms.R’: Also check confidence intervals slope parameters covariate models include zero. implemented fits obtained saemix backend. ‘R/parplot.R’: Make function work also case multistart runs failed. ‘R/intervals.R’: Include correlations random effects model case .","code":""},{"path":"https://pkgdown.jrwb.de/mkin/news/index.html","id":"mkin-121-2022-11-19","dir":"Changelog","previous_headings":"","what":"mkin 1.2.1 (2022-11-19)","title":"mkin 1.2.1 (2022-11-19)","text":"‘{data,R}/ds_mixed.rda’: Include test data package instead generating ‘tests/testthat/setup_script.R’. Refactor generating code make consistent update tests. ‘tests/testthat/setup_script.R’: Excluded another ill-defined random effect DFOP fit ‘saem’, attempt avoid platform dependence surfaced Fedora systems CRAN check farm ‘tests/testthat/test_mixed.R’: Round parameters found saemix two significant digits printing, also help avoid platform dependence tests ‘R/saem.R’: Fix bug prevented ‘error.ini’ passed ‘saemix_model’, set default c(1, 1) avoid changing test results ‘R/parplot.R’: Show initial values error model parameters ‘R/loglik.mkinfit.R’: Add ‘nobs’ attribute resulting ‘logLik’ object, order make test_AIC.R succeed current R-devel","code":""},{"path":"https://pkgdown.jrwb.de/mkin/news/index.html","id":"mkin-120-2022-11-17","dir":"Changelog","previous_headings":"","what":"mkin 1.2.0 (2022-11-17)","title":"mkin 1.2.0 (2022-11-17)","text":"‘R/saem.R’: ‘logLik’, ‘update’ ‘anova’ methods ‘saem.mmkin’ objects. ‘R/saem.R’: Automatic estimation start parameters random effects case mkin transformations, nicely improving convergence reducing problems iterative ODE solutions. ‘R/status.R’: New generic show status information fit array objects methods ‘mmkin’, ‘mhmkin’ ‘multistart’ objects. ‘R/mhmkin.R’: New method performing multiple hierarchical mkin fits one function call, optionally parallel. ‘R/mhmkin.R’: ‘anova.mhmkin’ conveniently comparing resulting fits. ‘R/illparms.R’: New generic show ill-defined parameters methods ‘mkinfit’, ‘mmkin’, ‘saem.mmkin’ ‘mhmkin’ objects. ‘R/multistart.R’: New method testing multiple start parameters hierarchical model fits, function ‘llhist’ new generic ‘parplot’ diagnostics, new generics ‘.best’ ‘best’ extracting fit highest likelihood ‘R/summary.mmkin.R’: Summary method mmkin objects. ‘R/saem.R’: Implement test saemix transformations FOMC HS. Also, error saemix transformations requested supported. ‘R/read_spreadsheet.R’: Conveniently read data spreadsheet file. ‘R/tex_listings.R’: Conveniently include summaries fit objects R markdown documents compiled LaTeX.","code":""},{"path":"https://pkgdown.jrwb.de/mkin/news/index.html","id":"mkin-111-2022-07-12","dir":"Changelog","previous_headings":"","what":"mkin 1.1.1 (2022-07-12)","title":"mkin 1.1.1 (2022-07-12)","text":"’R/{mkinmod,mkinpredict}.R: Store DLL information mkinmod objects use information mkinpredict avoid performance regression brought bugfix R 4.2.x. Thanks Tomas Kalibera analysis problem r-package-devel list suggestion fix . ‘vignettes/FOCUS_L.rmd’: Remove outdated note referring failure calculate covariance matrix DFOP L2 dataset. Since 0.9.45.5 covariance matrix available ‘vignettes/web_only/benchmarks.rmd’: Add first benchmark data using laptop system, therefore add CPU showing benchmark results. ‘dimethenamid_2018’: Update example code use saemix ‘CAKE_export’: Check validity map argument, updates ‘saem()’: Slightly improve speed case analytical solution saemix implemented, activate test respective code ‘mean_degparms’: New argument ‘default_log_parms’ makes possible supply surrogate value (default) log parameters fail t-test ‘plot.mixed.mmkin’: Pass frame argument also residual plots, take ‘default_log_parms’ argument ‘mean_degparms’ used constructing approximate population curves, plot population curve last avoid covered data ‘plot.mkinfit’: Respect argument ‘maxabs’ residual plots, make possible give ylim list, row layouts","code":""},{"path":[]},{"path":"https://pkgdown.jrwb.de/mkin/news/index.html","id":"mixed-effects-models-1-1-0","dir":"Changelog","previous_headings":"","what":"Mixed-effects models","title":"mkin 1.1.0 (2022-03-14)","text":"Reintroduce interface saemix version 3.0 (now CRAN), particular generic function ‘saem’ generator ‘saem.mmkin’, currently using ‘saemix_model’ ‘saemix_data’, summary plot methods ‘mean_degparms’: New argument ‘test_log_parms’ makes function consider log-transformed parameters untransformed parameters pass t-test certain confidence level. can used obtain plausible starting parameters different mixed-effects model backends ‘plot.mixed.mmkin’: Gains arguments ‘test_log_parms’ ‘conf.level’ ‘vignettes/web_only/dimethenamid_2018.rmd’: Example evaluations dimethenamid data. ‘intervals’: Provide method nlme function ‘saem.mmkin’ objects.","code":""},{"path":"https://pkgdown.jrwb.de/mkin/news/index.html","id":"mkin-105-2021-09-15","dir":"Changelog","previous_headings":"","what":"mkin 1.0.5 (2021-09-15)","title":"mkin 1.0.5 (2021-09-15)","text":"‘dimethenamid_2018’: Correct data Borstel soil. five observations Staudenmaier (2013) previously stored “Borstel 2” actually just subset 16 observations “Borstel 1” now simply “Borstel”","code":""},{"path":"https://pkgdown.jrwb.de/mkin/news/index.html","id":"mkin-104-2021-04-20","dir":"Changelog","previous_headings":"","what":"mkin 1.0.4 (2021-04-20)","title":"mkin 1.0.4 (2021-04-20)","text":"plotting functions setting graphical parameters: Use .exit() resetting graphical parameters ‘plot.mkinfit’: Use xlab xlim residual plot show_residuals TRUE ‘mmkin’: Use cores = 1 per default Windows make easier first time users","code":""},{"path":"https://pkgdown.jrwb.de/mkin/news/index.html","id":"mkin-103-2021-02-15","dir":"Changelog","previous_headings":"","what":"mkin 1.0.3 (2021-02-15)","title":"mkin 1.0.3 (2021-02-15)","text":"Review update README, ‘Introduction mkin’ vignette help pages","code":""},{"path":"https://pkgdown.jrwb.de/mkin/news/index.html","id":"mkin-102-unreleased","dir":"Changelog","previous_headings":"","what":"mkin 1.0.2 (Unreleased)","title":"mkin 1.0.2 (Unreleased)","text":"‘mkinfit’: Keep model names stored ‘mkinmod’ objects, avoiding loss ‘gmkin’","code":""},{"path":"https://pkgdown.jrwb.de/mkin/news/index.html","id":"mkin-101-2021-02-10","dir":"Changelog","previous_headings":"","what":"mkin 1.0.1 (2021-02-10)","title":"mkin 1.0.1 (2021-02-10)","text":"‘confint.mmkin’, ‘nlme.mmkin’, ‘transform_odeparms’: Fix example code dontrun sections failed current defaults ‘logLik.mkinfit’: Improve example code avoid warnings show convenient syntax ‘mkinresplot’: Re-add Katrin Lindenberger coauthor accidentally removed long ago Remove tests relying non-convergence FOMC fit FOCUS dataset platform dependent (revealed new additional tests CRAN, thanks!) Increase test tolerance parameter comparisons also proved platform dependent","code":""},{"path":[]},{"path":"https://pkgdown.jrwb.de/mkin/news/index.html","id":"general-1-0-0","dir":"Changelog","previous_headings":"","what":"General","title":"mkin 1.0.0 (2021-02-03)","text":"‘mkinmod’ models gain arguments ‘name’ ‘dll_dir’ , conjunction current version ‘inline’ package, make possible still use DLL used fast ODE solutions ‘deSolve’ saving restoring ‘mkinmod’ object. ‘mkindsg’ R6 class groups ‘mkinds’ datasets metadata ‘f_norm_temp_focus’ generic function normalise time intervals using FOCUS method, methods numeric vectors ‘mkindsg’ objects ‘D24_2014’ ‘dimethenamid_2018’ datasets ‘focus_soil_moisture’ FOCUS default soil moisture data ‘update’ method ‘mmkin’ objects ‘transform_odeparms’, ‘backtransform_odeparms’: Use logit transformation solitary fractions like g parameter DFOP model, formation fractions pathway one target variable ‘plot.mmkin’: Add ylab argument, making possible customize y axis label panels left without affecting residual plots. Reduce legend size vertical distance panels ‘plot.mkinfit’: Change default ylab “Observed” “Residue”. Pass xlab residual plot show_residuals TRUE.","code":""},{"path":"https://pkgdown.jrwb.de/mkin/news/index.html","id":"mixed-effects-models-1-0-0","dir":"Changelog","previous_headings":"","what":"Mixed-effects models","title":"mkin 1.0.0 (2021-02-03)","text":"‘mixed.mmkin’ New container mmkin objects plotting ‘plot.mixed.mmkin’ method ‘plot.mixed.mmkin’ method used ‘nlme.mmkin’ inheriting ‘mixed.mmkin’ (currently virtual) ‘plot’, ‘summary’ ‘print’ methods ‘nlme.mmkin’ objects","code":""},{"path":"https://pkgdown.jrwb.de/mkin/news/index.html","id":"mkin-09503-2020-10-08","dir":"Changelog","previous_headings":"","what":"mkin 0.9.50.3 (2020-10-08)","title":"mkin 0.9.50.3 (2020-10-08)","text":"‘parms’: Add method mmkin objects ‘mmkin’ ‘confint(method = ’profile’): Use cores detected parallel::detectCores() per default ‘confint(method = ’profile’): Choose accuracy based ‘rel_tol’ argument, relative bounds obtained quadratic approximation ‘mkinfit’: Make ‘use_of_ff’ = “max” also default models specified using short names like “SFO” “FOMC” ‘mkinfit’: Run ‘stats::shapiro.test()’ standardized residuals warn p < 0.05 ‘mkinfit’: ‘error_model_algorithm’ = ‘d_3’ fail direct fitting fails, reports results threestep algorithm returned ‘mmkin’: fail one fits fails, assign try-error respective position mmkin object ‘mkinfit’: Ignore components state.ini correspond state variables model ‘endpoints’: Back-calculate DT50 value DT90 also biphasic models DFOP, HS SFORB","code":""},{"path":"https://pkgdown.jrwb.de/mkin/news/index.html","id":"mkin-09502-2020-05-12","dir":"Changelog","previous_headings":"","what":"mkin 0.9.50.2 (2020-05-12)","title":"mkin 0.9.50.2 (2020-05-12)","text":"Increase tolerance platform specific test results Solaris test machine CRAN Updates corrections (using spelling package) documentation","code":""},{"path":"https://pkgdown.jrwb.de/mkin/news/index.html","id":"mkin-09501-2020-05-11","dir":"Changelog","previous_headings":"","what":"mkin 0.9.50.1 (2020-05-11)","title":"mkin 0.9.50.1 (2020-05-11)","text":"Support SFORB formation fractions ‘mkinmod’: Make ‘use_of_ff’ = “max” default Improve performance ) avoiding expensive calls cost function like merge() data.frame(), b) implementing analytical solutions SFO-SFO DFOP-SFO","code":""},{"path":"https://pkgdown.jrwb.de/mkin/news/index.html","id":"mkin-094911-2020-04-20","dir":"Changelog","previous_headings":"","what":"mkin 0.9.49.11 (2020-04-20)","title":"mkin 0.9.49.11 (2020-04-20)","text":"Increase test tolerance make pass CRAN check machines","code":""},{"path":"https://pkgdown.jrwb.de/mkin/news/index.html","id":"mkin-094910-2020-04-18","dir":"Changelog","previous_headings":"","what":"mkin 0.9.49.10 (2020-04-18)","title":"mkin 0.9.49.10 (2020-04-18)","text":"‘nlme.mmkin’: nlme method mmkin row objects associated S3 class print, plot, anova endpoint methods ‘mean_degparms, nlme_data, nlme_function’: Three new functions facilitate building nlme models mmkin row objects ‘endpoints’: Don’t return SFORB list component ’s empty. reduces distraction complies documentation Article compiled models: Add platform specific code suppress warnings zero values removed FOCUS D dataset ‘plot.mmkin’: Add argument ‘standardized’ avoid warnings occurred passed part additional arguments captured dots (…) ‘summary.mkinfit’: Add AIC, BIC log likelihood summary","code":""},{"path":"https://pkgdown.jrwb.de/mkin/news/index.html","id":"mkin-09499-2020-03-31","dir":"Changelog","previous_headings":"","what":"mkin 0.9.49.9 (2020-03-31)","title":"mkin 0.9.49.9 (2020-03-31)","text":"‘mkinmod’: Use pkgbuild::has_compiler instead Sys.(‘gcc’), latter often fail even Rtools installed ‘mkinds’: Use roxygen documenting fields methods R6 class","code":""},{"path":"https://pkgdown.jrwb.de/mkin/news/index.html","id":"mkin-09498-2020-01-09","dir":"Changelog","previous_headings":"","what":"mkin 0.9.49.8 (2020-01-09)","title":"mkin 0.9.49.8 (2020-01-09)","text":"‘aw’: Generic function calculating Akaike weights, methods mkinfit objects mmkin columns ‘loftest’: Add lack--fit test ‘plot_res’, ‘plot_sep’ ‘mkinerrplot’: Add possibility show standardized residuals make default fits error models ‘const’ ‘lrtest.mkinfit’: Improve naming compared fits case fixed parameters ‘confint.mkinfit’: Make quadratic approximation default, likelihood profiling takes lot time, especially fit three parameters","code":""},{"path":"https://pkgdown.jrwb.de/mkin/news/index.html","id":"mkin-09497-2019-11-01","dir":"Changelog","previous_headings":"","what":"mkin 0.9.49.7 (2019-11-01)","title":"mkin 0.9.49.7 (2019-11-01)","text":"Fix bug introduced 0.9.49.6 occurred direct optimisation yielded higher likelihood three-step optimisation d_3 algorithm, caused fitted parameters three-step optimisation returned instead parameters direct optimisation Add ‘nobs’ method mkinfit objects, enabling default ‘BIC’ method stats package. Also, add ‘BIC’ method mmkin column objects.","code":""},{"path":"https://pkgdown.jrwb.de/mkin/news/index.html","id":"mkin-09496-2019-10-31","dir":"Changelog","previous_headings":"","what":"mkin 0.9.49.6 (2019-10-31)","title":"mkin 0.9.49.6 (2019-10-31)","text":"Implement likelihood ratio test method ‘lrtest’ lmtest package Add ‘update’ method mkinfit objects remembers fitted parameters appropriate Add ‘residuals’ method mkinfit objects supports scaling based error model Fix bug ‘mkinfit’ prevented summaries objects fitted fixed parameters generated Add ‘parms’ ‘confint’ methods mkinfit objects. Confidence intervals based quadratic approximation summary, based profile likelihood Move long-running tests tests/testthat/slow separate test log. currently take around 7 minutes system ‘mkinfit’: Clean code return functions calculate log-likelihood sum squared residuals Vignette ‘twa.html’: Add maximum time weighted average formulas hockey stick model Support frameless plots (‘frame = FALSE’) Support suppress chi2 error level (‘show_errmin = FALSE’) ‘plot.mmkin’ Update README introductory vignette Report ‘OLS’ error_model_algorithm summary case default error_model (‘const’) used Support summarizing ‘mkinfit’ objects generated versions < 0.9.49.5","code":""},{"path":"https://pkgdown.jrwb.de/mkin/news/index.html","id":"mkin-09495-2019-07-04","dir":"Changelog","previous_headings":"","what":"mkin 0.9.49.5 (2019-07-04)","title":"mkin 0.9.49.5 (2019-07-04)","text":"Several algorithms minimization negative log-likelihood non-constant error models (two-component variance variable). case error model constant variance, least squares used stable. default algorithm ‘d_3’ tries direct minimization three-step procedure, returns model highest likelihood. argument ‘reweight.method’ mkinfit mmkin now obsolete, use ‘error_model’ ‘error_model_algorithm’ instead Add test checks get best known AIC parent fits 12 test datasets. Add test datasets purpose. New function ‘mkinerrplot’. function also used residual plots ‘plot.mmkin’ argument ‘resplot = “errmod”’ given, ‘plot.mkinfit’ ‘show_errplot’ set TRUE. Remove dependency FME, use nlminb optimisation (‘Port’ algorithm). remember cases one optimisation algorithms preferable, except sometime used Levenberg-Marquardt speed cases expect get trapped local minimum. Use numDeriv package calculate hessians. results slightly different confidence intervals, takes bit longer, apparently robust Add simple benchmark vignette document impact performance. code manual weighting removed. functionality might get added later time. time , please use earlier version, e.g. 0.9.48.1 want manual weighting. fitting time reported summary now includes time used calculation hessians Adapt tests Fix error FOCUS chi2 error level calculations occurred parameters specified parms.ini model. warning already issued, fitting parallel via mmkin go unnoticed. Add example datasets obtained risk assessment reports published European Food Safety Agency.","code":""},{"path":"https://pkgdown.jrwb.de/mkin/news/index.html","id":"mkin-09481-2019-03-04","dir":"Changelog","previous_headings":"","what":"mkin 0.9.48.1 (2019-03-04)","title":"mkin 0.9.48.1 (2019-03-04)","text":"Add function ‘logLik.mkinfit’ makes possible calculate AIC mkinfit objects Add function ‘AIC.mmkin’ make easy compare columns mmkin objects ‘add_err’: Respect argument giving number replicates synthetic dataset ‘max_twa_parent’: Support maximum time weighted average concentration calculations hockey stick (HS) model ‘mkinpredict’: Make function generic create method mkinfit objects ‘mkinfit’: Improve correctness fitted two component error model fitting mean absolute deviance observation observed values, weighting current two-component error model ‘tests/testthat/test_irls.R’: Test components error model used generate data can reproduced moderate accuracy Add function ‘CAKE_export’ facilitate cross-checking results Implement logistic model (tested parent fits) ‘nafta’: Add evaluations according NAFTA guidance","code":""},{"path":"https://pkgdown.jrwb.de/mkin/news/index.html","id":"mkin-09475-2018-09-14","dir":"Changelog","previous_headings":"","what":"mkin 0.9.47.5 (2018-09-14)","title":"mkin 0.9.47.5 (2018-09-14)","text":"Make two-component error model stop cases inadequate avoid nls crashes windows Move two vignettes location built CRAN (avoid NOTES long execution times) Exclude example code testing CRAN avoid NOTES long execution times","code":""},{"path":"https://pkgdown.jrwb.de/mkin/news/index.html","id":"mkin-09473","dir":"Changelog","previous_headings":"","what":"mkin 0.9.47.3","title":"mkin 0.9.47.3","text":"‘mkinfit’: Improve fitting error model reweight.method = ‘tc’. Add ‘manual’ possible arguments ‘weight’ Test FOCUS_2006_C can evaluated DFOP reweight.method = ‘tc’","code":""},{"path":"https://pkgdown.jrwb.de/mkin/news/index.html","id":"mkin-09472-2018-07-19","dir":"Changelog","previous_headings":"","what":"mkin 0.9.47.2 (2018-07-19)","title":"mkin 0.9.47.2 (2018-07-19)","text":"‘sigma_twocomp’: Rename ‘sigma_rl’ ‘sigma_twocomp’ Rocke Lorenzato model assumes lognormal distribution large y. Correct references Rocke Lorenzato model accordingly. ‘mkinfit’: Use 1.1 starting value N parameter IORE models obtain convergence difficult cases. Show parameter names ‘trace_parms’ ‘TRUE’.","code":""},{"path":"https://pkgdown.jrwb.de/mkin/news/index.html","id":"mkin-09471-2018-02-06","dir":"Changelog","previous_headings":"","what":"mkin 0.9.47.1 (2018-02-06)","title":"mkin 0.9.47.1 (2018-02-06)","text":"Skip tests CRAN winbuilder avoid timeouts ‘test_data_from_UBA_2014’: Added list datasets containing experimental data used expertise 2014 ‘mkinfit’: Added iterative reweighting method ‘tc’ using two-component error model Rocke Lorenzato. NA values data returned . ‘mkinfit’: Work around bug current FME version prevented convergence message returned case non-convergence. ‘summary.mkinfit’: Improved output regarding weighting method. predictions returned NA values model (see ). ‘summary.mkinfit’: Show versions mkin R used fitting (ones used summary) fit generated mkin >= 0.9.47.1","code":""},{"path":"https://pkgdown.jrwb.de/mkin/news/index.html","id":"mkin-09463-2017-11-16","dir":"Changelog","previous_headings":"","what":"mkin 0.9.46.3 (2017-11-16)","title":"mkin 0.9.46.3 (2017-11-16)","text":"README.md, vignettes/mkin.Rmd: URLs updated synthetic_data_for_UBA: Add code used generate data interest reproducibility","code":""},{"path":"https://pkgdown.jrwb.de/mkin/news/index.html","id":"mkin-09462-2017-10-10","dir":"Changelog","previous_headings":"","what":"mkin 0.9.46.2 (2017-10-10)","title":"mkin 0.9.46.2 (2017-10-10)","text":"Converted vignette FOCUS_Z tex/pdf markdown/html DESCRIPTION: Add ORCID","code":""},{"path":"https://pkgdown.jrwb.de/mkin/news/index.html","id":"mkin-09461-2017-09-14","dir":"Changelog","previous_headings":"","what":"mkin 0.9.46.1 (2017-09-14)","title":"mkin 0.9.46.1 (2017-09-14)","text":"plot.mkinfit: Fix scaling residual plots case separate plots observed variable plot.mkinfit: Use data points fitted curve y axis scaling case separate plots observed variable Documentation updates","code":""},{"path":"https://pkgdown.jrwb.de/mkin/news/index.html","id":"mkin-0946-2017-07-24","dir":"Changelog","previous_headings":"","what":"mkin 0.9.46 (2017-07-24)","title":"mkin 0.9.46 (2017-07-24)","text":"Remove test_FOMC_ill-defined.R platform dependent","code":""},{"path":"https://pkgdown.jrwb.de/mkin/news/index.html","id":"mkin-09452-2017-07-24","dir":"Changelog","previous_headings":"","what":"mkin 0.9.45.2 (2017-07-24)","title":"mkin 0.9.45.2 (2017-07-24)","text":"Rename twa max_twa_parent avoid conflict twa pfm package Update URLs documentation Limit test code one core pass windows Switch microbenchmark rbenchmark former supported platforms","code":""},{"path":[]},{"path":"https://pkgdown.jrwb.de/mkin/news/index.html","id":"new-features-0-9-45-1","dir":"Changelog","previous_headings":"","what":"New features","title":"mkin 0.9.45.1 (2016-12-20)","text":"twa function, calculating maximum time weighted average concentrations parent (SFO, FOMC DFOP).","code":""},{"path":[]},{"path":"https://pkgdown.jrwb.de/mkin/news/index.html","id":"minor-changes-0-9-45","dir":"Changelog","previous_headings":"","what":"Minor changes","title":"mkin 0.9.45 (2016-12-08)","text":"plot.mkinfit plot.mmkin: plotting device tikz, LaTeX markup used chi2 error graphs. Use pkgdown, successor staticdocs generating static HTML documentation. Include example output graphs also dontrun sections. plot.mkinfit: Plotting fail compiled model available, e.g. removed temporary directory. case, uncompiled model now used plotting","code":""},{"path":[]},{"path":"https://pkgdown.jrwb.de/mkin/news/index.html","id":"bug-fixes-0-9-44","dir":"Changelog","previous_headings":"","what":"Bug fixes","title":"mkin 0.9.44 (2016-06-29)","text":"test test_FOMC_ill-defined failed several architectures, test now skipped","code":""},{"path":[]},{"path":"https://pkgdown.jrwb.de/mkin/news/index.html","id":"major-changes-0-9-43","dir":"Changelog","previous_headings":"","what":"Major changes","title":"mkin 0.9.43 (2016-06-28)","text":"title changed Kinetic evaluations chemical degradation data plot.mkinfit: Add possibility show fits (residual plots requested) separately observed variables plot.mkinfit: Add possibility show chi2 error levels plot, similar way shown plot.mmkin plot_sep: Add function convenience wrapper plotting observed variables mkinfit objects separately, chi2 error values residual plots. Vignettes: main vignette mkin converted R markdown updated. vignettes also updated show current improved functionality. function add_err added package, making easy generate simulated data using error model based normal distribution","code":""},{"path":"https://pkgdown.jrwb.de/mkin/news/index.html","id":"minor-changes-0-9-43","dir":"Changelog","previous_headings":"","what":"Minor changes","title":"mkin 0.9.43 (2016-06-28)","text":"Remove outdated reference inline package compiled_models vignette mkinfit: error cases fit converges, Jacobian untransformed model cost can estimated. Give warning instead return NA t-test results. summary.mkinfit: Give warning message covariance matrix can obtained. test added containing corresponding edge case check warnings correctly issued fit terminate. plot.mmkin: Round chi2 error value three significant digits, instead two decimal digits. mkinfit: Return err values used weighted fits column named err. Also include inverse weights column value observed data used, returned observed data component mkinfit object.","code":""},{"path":"https://pkgdown.jrwb.de/mkin/news/index.html","id":"bug-fixes-0-9-43","dir":"Changelog","previous_headings":"","what":"Bug fixes","title":"mkin 0.9.43 (2016-06-28)","text":"endpoints: name substance degrading metabolite (e.g. parent compound) used model formulation ended letter f, rate parameters listed formation fractions mixed names. also appear summary. mkinfit: Check observed variables checking user tried fix formation fractions fitting using ilr transformation. plot.mmkin: Set plot margins correctly, also case single fit plotted, main title placed reasonable way. plot.mkinfit: Correct default values col_obs, pch_obs lty_obs case obs_vars specified.","code":""},{"path":[]},{"path":"https://pkgdown.jrwb.de/mkin/news/index.html","id":"major-changes-0-9-42","dir":"Changelog","previous_headings":"","what":"Major changes","title":"mkin 0.9.42 (2016-03-25)","text":"Add argument from_max_mean mkinfit, fitting decline maximum observed value models single observed variable","code":""},{"path":"https://pkgdown.jrwb.de/mkin/news/index.html","id":"minor-changes-0-9-42","dir":"Changelog","previous_headings":"","what":"Minor changes","title":"mkin 0.9.42 (2016-03-25)","text":"Add plots compiled_models vignette Give explanatory error message mkinmod fails due missing definition target variable print.mkinmod(): Improve formatting printing mkinmod model definitions","code":""},{"path":[]},{"path":"https://pkgdown.jrwb.de/mkin/news/index.html","id":"minor-changes-0-9-41","dir":"Changelog","previous_headings":"","what":"Minor changes","title":"mkin 0.9-41 (2015-11-09)","text":"Add R6 class mkinds representing datasets printing method Add printing method mkinmod objects Make possible specify arbitrary strings names compounds mkinmod, show plot Use index.r file group help topics static documentation","code":""},{"path":"https://pkgdown.jrwb.de/mkin/news/index.html","id":"bug-fixes-0-9-41","dir":"Changelog","previous_headings":"","what":"Bug fixes","title":"mkin 0.9-41 (2015-11-09)","text":"print.summary.mkinfit(): Avoid error occurred printing summaries generated mkin versions 0.9-36","code":""},{"path":[]},{"path":"https://pkgdown.jrwb.de/mkin/news/index.html","id":"bug-fixes-0-9-40","dir":"Changelog","previous_headings":"","what":"Bug fixes","title":"mkin 0.9-40 (2015-07-21)","text":"endpoints(): DFOP SFORB models, optimize() used, make use fact DT50 must DT50_k1 DT50_k2 (DFOP) DT50_b1 DT50_b2 (SFORB), optimize() sometimes find minimum. Likewise finding DT90 values. Also fit log scale make function efficient.","code":""},{"path":"https://pkgdown.jrwb.de/mkin/news/index.html","id":"internal-changes-0-9-40","dir":"Changelog","previous_headings":"","what":"Internal changes","title":"mkin 0.9-40 (2015-07-21)","text":"DESCRIPTION, NAMESPACE, R/*.R: Import () stats, graphics methods packages, qualify function calls non-base packages installed R avoid NOTES made R CMD check –-cran upcoming R versions.","code":""},{"path":[]},{"path":"https://pkgdown.jrwb.de/mkin/news/index.html","id":"major-changes-0-9-39","dir":"Changelog","previous_headings":"","what":"Major changes","title":"mkin 0.9-39 (2015-06-26)","text":"New function mmkin(): function takes character vector model shorthand names, alternatively list mkinmod models, well list dataset main arguments. returns matrix mkinfit objects, row model column dataset. subsetting method single brackets available. Fitting models parallel using parallel package supported. New function plot.mmkin(): Plots single-row single-column mmkin objects including residual plots.","code":""},{"path":"https://pkgdown.jrwb.de/mkin/news/index.html","id":"bug-fixes-0-9-39","dir":"Changelog","previous_headings":"","what":"Bug fixes","title":"mkin 0.9-39 (2015-06-26)","text":"mkinparplot(): Fix x axis scaling rate constants formation fractions got confused introduction t-values transformed parameters.","code":""},{"path":[]},{"path":"https://pkgdown.jrwb.de/mkin/news/index.html","id":"minor-changes-0-9-38","dir":"Changelog","previous_headings":"","what":"Minor changes","title":"mkin 0.9-38 (2015-06-24)","text":"vignettes/compiled_models.html: Show performance improvement factor actually obtained building vignette, well mkin version, system info CPU model used building vignette. GNUMakefile,vignettes/*: Clean vignette generation include table contents HTML vignettes.","code":""},{"path":"https://pkgdown.jrwb.de/mkin/news/index.html","id":"bug-fixes-0-9-38","dir":"Changelog","previous_headings":"","what":"Bug fixes","title":"mkin 0.9-38 (2015-06-24)","text":"mkinmod(): generating C code derivatives, declare time variable needed remove ‘-W--unused-variable’ compiler flag C compiler used CRAN checks Solaris know .","code":""},{"path":[]},{"path":"https://pkgdown.jrwb.de/mkin/news/index.html","id":"major-changes-0-9-36","dir":"Changelog","previous_headings":"","what":"Major changes","title":"mkin 0.9-36 (2015-06-21)","text":"summary.mkinfit(): one-sided t-test significant difference untransformed parameters zero now always shown, based assumption normal distribution estimators untransformed parameters. Use caution, assumption unrealistic e.g. rate constants nonlinear kinetic models. compiler (gcc) installed, use version differential equation model compiled C code, huge performance boost models deSolve method works. mkinmod(): Create list component $cf (class CFuncList) list returned mkinmod, version can compiled autogenerated C code (see ). mkinfit(): Set default solution_type deSolve compiled version model present, except analytical solution possible.","code":""},{"path":"https://pkgdown.jrwb.de/mkin/news/index.html","id":"minor-changes-0-9-36","dir":"Changelog","previous_headings":"","what":"Minor changes","title":"mkin 0.9-36 (2015-06-21)","text":"Added simple showcase vignette evaluation FOCUS example dataset D","code":""},{"path":[]},{"path":"https://pkgdown.jrwb.de/mkin/news/index.html","id":"major-changes-0-9-35","dir":"Changelog","previous_headings":"","what":"Major changes","title":"mkin 0.9-35 (2015-05-15)","text":"Switch RUnit testthat testing","code":""},{"path":"https://pkgdown.jrwb.de/mkin/news/index.html","id":"bug-fixes-0-9-35","dir":"Changelog","previous_headings":"","what":"Bug fixes","title":"mkin 0.9-35 (2015-05-15)","text":"mkinparplot(): Avoid warnings occurred confidence intervals available summary fit print.summary.mkinfit(): Fix printing summary case number iterations available NAMESPACE: export S3 methods plot.mkinfit, summary.mkinfit print.summary.mkinfit satisfy R CMD check R-devel mkinparplot(): Avoid warning R CMD check undeclared global variable Lower","code":""},{"path":"https://pkgdown.jrwb.de/mkin/news/index.html","id":"new-features-0-9-35","dir":"Changelog","previous_headings":"","what":"New features","title":"mkin 0.9-35 (2015-05-15)","text":"mkinfit(): Report successful termination quiet = FALSE. helpful difficult problems fitted reweight.method = obs, progress often indicated reweighting. first test using results established expertise written German Federal Environmental Agency (UBA) added. Add synthetic datasets generated expertise written German Federal Environmental Agency UBA Add tests based datasets","code":""},{"path":[]},{"path":"https://pkgdown.jrwb.de/mkin/news/index.html","id":"new-features-0-9-34","dir":"Changelog","previous_headings":"","what":"New features","title":"mkin 0.9-34 (2014-11-22)","text":"Add convenience function mkinsub() creating lists used mkinmod() Add possibility fit indeterminate order rate equation (IORE) models using analytical solution (parent ) numeric solution. Paths IORE compounds metabolites supported using formation fractions (use_of_ff = ‘max’). Note numerical solution (method.ode = ‘deSolve’) IORE differential equations sometimes fails due numerical problems. Switch using Port algorithm (using model/trust region approach) per default. needing iterations Levenberg-Marquardt algorithm previously used per default, less sensitive starting parameters.","code":""},{"path":"https://pkgdown.jrwb.de/mkin/news/index.html","id":"minor-changes-0-9-34","dir":"Changelog","previous_headings":"","what":"Minor changes","title":"mkin 0.9-34 (2014-11-22)","text":"formatting differential equations summary improved Always include 0 y axis plotting fit","code":""},{"path":[]},{"path":"https://pkgdown.jrwb.de/mkin/news/index.html","id":"new-features-0-9-33","dir":"Changelog","previous_headings":"","what":"New features","title":"mkin 0.9-33 (2014-10-22)","text":"initial value (state.ini) observed variable highest observed residue set 100 case time zero observation state.ini = \"auto\" basic unit test mkinerrmin() written","code":""},{"path":"https://pkgdown.jrwb.de/mkin/news/index.html","id":"bug-fixes-0-9-33","dir":"Changelog","previous_headings":"","what":"Bug fixes","title":"mkin 0.9-33 (2014-10-22)","text":"mkinfit(): internally fitted parameter g named g_ilr even transform_fractions=FALSE mkinfit(): initial value (state.ini) parent compound set parent () variable highest value observed data. mkinerrmin(): checking degrees freedom metabolites, check time zero value fixed instead checking observed value zero. ensures correct calculation degrees freedom also cases metabolite residue time zero greater zero. plot.mkinfit(): Avoid warning message using first component ylim occurred ylim specified explicitly","code":""},{"path":"https://pkgdown.jrwb.de/mkin/news/index.html","id":"minor-changes-0-9-33","dir":"Changelog","previous_headings":"","what":"Minor changes","title":"mkin 0.9-33 (2014-10-22)","text":"formatting differential equations summary improved wrapping overly long lines FOCUS_Z vignette rebuilt improvement using width 70 avoid output outside grey area print.summary.mkinfit(): Avoid warning occurred gmkin showed summaries initial fits without iterations mkinfit(): Avoid warning occurred summarising fit performed maxitmodFit = 0 done gmkin configuring new fits.","code":""},{"path":[]},{"path":"https://pkgdown.jrwb.de/mkin/news/index.html","id":"new-features-0-9-32","dir":"Changelog","previous_headings":"","what":"New features","title":"mkin 0.9-32 (2014-07-24)","text":"number degrees freedom difficult define case ilr transformation formation fractions. Now source compartment number ilr parameters (=number optimised parameters) divided number pathways metabolites (=number affected data series) leads fractional degrees freedom cases. default initial value first state value now taken mean observations time zero, available. kinetic model can alternatively specified shorthand name parent degradation models, e.g. SFO, DFOP. Optimisation method, number model evaluations time elapsed optimisation given summary mkinfit objects. maximum number iterations optimisation algorithm can specified using argument maxit.modFit mkinfit function. mkinfit gives warning fit converge (apply SANN method). warning included summary.","code":""},{"path":"https://pkgdown.jrwb.de/mkin/news/index.html","id":"bug-fixes-0-9-32","dir":"Changelog","previous_headings":"","what":"Bug fixes","title":"mkin 0.9-32 (2014-07-24)","text":"Avoid plotting artificial 0 residual time zero mkinresplot determination degrees freedom mkinerrmin, formation fractions accounted multiple times case parallel formation metabolites. See new feature described solution. transform_rates=FALSE mkinfit now also works FOMC HS models. Initial values formation fractions set cases. warning given fit converge method default Levenberg-Marquardt method Marq used.","code":""},{"path":"https://pkgdown.jrwb.de/mkin/news/index.html","id":"minor-changes-0-9-32","dir":"Changelog","previous_headings":"","what":"Minor changes","title":"mkin 0.9-32 (2014-07-24)","text":"Vignettes rebuilt reflect changes summary method. Algorithm Pseudo excluded needs user-defined parameter limits supported. Algorithm Newton excluded different way specify maximum number iterations appear provide additional benefits.","code":""},{"path":[]},{"path":"https://pkgdown.jrwb.de/mkin/news/index.html","id":"bug-fixes-0-9-31","dir":"Changelog","previous_headings":"","what":"Bug fixes","title":"mkin 0.9-31 (2014-07-14)","text":"internal renaming optimised parameters Version 0.9-30 led errors determination degrees freedom chi2 error level calulations mkinerrmin() used summary function.","code":""},{"path":[]},{"path":"https://pkgdown.jrwb.de/mkin/news/index.html","id":"new-features-0-9-30","dir":"Changelog","previous_headings":"","what":"New features","title":"mkin 0.9-30 (2014-07-11)","text":"now possible use formation fractions combination turning sink mkinmod().","code":""},{"path":"https://pkgdown.jrwb.de/mkin/news/index.html","id":"major-changes-0-9-30","dir":"Changelog","previous_headings":"","what":"Major changes","title":"mkin 0.9-30 (2014-07-11)","text":"original transformed parameters now different names (e.g. k_parent log_k_parent. also differ many formation fractions pathway sink. order information blocks print.summary.mkinfit.R() ordered logical way.","code":""},{"path":"https://pkgdown.jrwb.de/mkin/news/index.html","id":"minor-changes-0-9-30","dir":"Changelog","previous_headings":"","what":"Minor changes","title":"mkin 0.9-30 (2014-07-11)","text":"vignette FOCUS_Z simplified use formation fractions turning sink, slightly amended use new versions DT50 values calculated since mkin 0.9-29. vignettes rebuilt reflect changes. ChangeLog renamed NEWS.md entries converted markdown syntax compatible tools::news() function built R. test suite overhauled. Tests DFOP SFORB models dataset FOCUS_2006_A removed, much dependent optimisation algorithm /starting parameters, dataset SFO (compare kinfit vignette). Also, Schaefer complex case can now fitted using formation fractions, ‘Port’ optimisation method also fit A2 way published Piacenza paper. checks introduced mkinfit(), leading warnings stopping execution unsupported combinations methods parameters requested.","code":""},{"path":"https://pkgdown.jrwb.de/mkin/news/index.html","id":"mkin-09-29-2014-06-27","dir":"Changelog","previous_headings":"","what":"mkin 0.9-29 (2014-06-27)","title":"mkin 0.9-29 (2014-06-27)","text":"R/mkinresplot.R: Make possible specify xlim R/geometric_mean.R, man/geometric_mean.Rd: Add geometric mean function R/endpoints.R, man/endpoints.Rd: Calculate additional (pseudo)-DT50 values FOMC, DFOP, HS SFORB. Avoid calculation formation fractions rate constants directly fitted","code":""},{"path":"https://pkgdown.jrwb.de/mkin/news/index.html","id":"mkin-09-28-2014-05-20","dir":"Changelog","previous_headings":"","what":"mkin 0.9-28 (2014-05-20)","title":"mkin 0.9-28 (2014-05-20)","text":"backtransform confidence intervals formation fractions one compound formed, parameters define pathways set Add historical remarks background main package vignette Correct ‘isotropic’ ‘isometric’ ilr transformation","code":""},{"path":"https://pkgdown.jrwb.de/mkin/news/index.html","id":"mkin-09-27-2014-05-10","dir":"Changelog","previous_headings":"","what":"mkin 0.9-27 (2014-05-10)","title":"mkin 0.9-27 (2014-05-10)","text":"Fork GUI separate package gmkin DESCRIPTION, NAMESPACE, TODO: Adapt add copyright information Remove files belonging GUI Possibility fit without parameter transformations, using bounds implemented FME Add McCall 2,4,5-T dataset Enable selection observed variables plotting Add possibility show residual plot plot.mkinfit R/mkinparplot.R, man/mkinparplot.Rd: plot parameters confidence intervals Change vignette format Sweave knitr Split examples vignette FOCUS_L FOCUS_Z Remove warning constant formation fractions mkinmod based misconception Restrict unit test Schaefer data parent primary metabolites formation fraction DT50 A2 highly correlated passing test platform dependent. example, test fails 1 14 platforms CRAN today. Add Eurofins Regulatory AG copyright notices Import FME deSolve instead depending clean startup Add starter function GUI: gmkin() Change format workspace files gmkin can distributed documented package Add gmkin workspace datasets FOCUS_2006_gmkin FOCUS_2006_Z_gmkin","code":""},{"path":"https://pkgdown.jrwb.de/mkin/news/index.html","id":"mkin-09-24-2013-11-06","dir":"Changelog","previous_headings":"","what":"mkin 0.9-24 (2013-11-06)","title":"mkin 0.9-24 (2013-11-06)","text":"Bugfix re-enabling fixing combination initial values state variables Default values kinetic rate constants 0.1 “salted” small increment avoid numeric artefacts eigenvalue based solutions Backtransform fixed ODE parameters summary","code":""},{"path":"https://pkgdown.jrwb.de/mkin/news/index.html","id":"mkin-09-22-2013-10-26","dir":"Changelog","previous_headings":"","what":"mkin 0.9-22 (2013-10-26)","title":"mkin 0.9-22 (2013-10-26)","text":"Get rid optimisation step mkinerrmin - unnecessary. Thanks KinGUII inspiration - actually equation 6-2 FOCUS kinetics p. 91 overlooked originally Fix plot.mkinfit passed graphical arguments like main solver use plot=TRUE mkinfit() example first successful fits simple GUI Fix iteratively reweighted least squares case many metabolites Unify naming initial values state variables Unify naming dataframes optimised fixed parameters summary Show weighting method residuals summary Correct output data case manual weighting Implement IRLS assuming different variances observed variables use 0 values time zero chi2 error level calculations. way done KinGUII makes sense. impact chi2 error levels output. Generally seem lower metabolites now, presumably mean observed values higher detailed list changes mkin source please consult commit history http://github.com/jranke/mkin","code":""}]