From 5364f037a72863ef5ba81e14ba4417f68fd389f9 Mon Sep 17 00:00:00 2001 From: Johannes Ranke Date: Fri, 18 Nov 2022 19:14:47 +0100 Subject: Make mixed model test data permanent to ensure reproducibility To ensure that tests on different platforms work on the same data, the mixed modelling test data previosly generated in tests/testthat/setup_script.R were generated once using the script in inst/dataset/generation/ds_mixed.R, and are now distributed with the package. --- tests/testthat/summary_saem_dfop_sfo_s.txt | 87 ++++++++++++++++++++++++++++++ 1 file changed, 87 insertions(+) create mode 100644 tests/testthat/summary_saem_dfop_sfo_s.txt (limited to 'tests/testthat/summary_saem_dfop_sfo_s.txt') diff --git a/tests/testthat/summary_saem_dfop_sfo_s.txt b/tests/testthat/summary_saem_dfop_sfo_s.txt new file mode 100644 index 00000000..7c337843 --- /dev/null +++ b/tests/testthat/summary_saem_dfop_sfo_s.txt @@ -0,0 +1,87 @@ +saemix version used for fitting: Dummy 0.0 for testing +mkin version used for pre-fitting: Dummy 0.0 for testing +R version used for fitting: Dummy R version for testing +Date of fit: Dummy date for testing +Date of summary: Dummy date for testing + +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: +510 observations of 2 variable(s) grouped in 15 datasets + +Model predictions using solution type analytical + +Fitted in test time 0 s +Using 300, 100 iterations and 4 chains + +Variance model: Two-component variance function + +Mean of starting values for individual parameters: + parent_0 k_m1 f_parent_to_m1 k1 k2 + 1e+02 7e-03 5e-01 1e-01 2e-02 + g + 5e-01 + +Fixed degradation parameter values: +None + +Results: + +Likelihood computed by importance sampling + AIC BIC logLik + 2334 2344 -1153 + +Optimised parameters: + est. lower upper +parent_0 1e+02 1e+02 1e+02 +k_m1 7e-03 6e-03 7e-03 +f_parent_to_m1 5e-01 4e-01 5e-01 +k1 1e-01 9e-02 1e-01 +k2 2e-02 2e-02 3e-02 +g 5e-01 5e-01 5e-01 +a.1 9e-01 8e-01 1e+00 +b.1 5e-02 5e-02 6e-02 +SD.parent_0 3e-02 -5e+01 5e+01 +SD.k_m1 2e-01 1e-01 3e-01 +SD.f_parent_to_m1 3e-01 2e-01 4e-01 +SD.k1 4e-01 2e-01 5e-01 +SD.k2 3e-01 2e-01 5e-01 +SD.g 2e-01 6e-02 4e-01 + +Correlation: + pr_0 k_m1 f___ k1 k2 +k_m1 -0.2 +f_parent_to_m1 -0.3 0.1 +k1 0.1 0.0 0.0 +k2 0.0 0.0 0.0 0.1 +g 0.1 -0.1 0.0 -0.2 -0.2 + +Random effects: + est. lower upper +SD.parent_0 0.03 -49.24 49.3 +SD.k_m1 0.23 0.13 0.3 +SD.f_parent_to_m1 0.30 0.19 0.4 +SD.k1 0.40 0.25 0.5 +SD.k2 0.34 0.21 0.5 +SD.g 0.21 0.06 0.4 + +Variance model: + est. lower upper +a.1 0.93 0.79 1.06 +b.1 0.05 0.05 0.06 + +Resulting formation fractions: + ff +parent_m1 0.5 +parent_sink 0.5 + +Estimated disappearance times: + DT50 DT90 DT50back DT50_k1 DT50_k2 +parent 13 73 22 6 32 +m1 105 348 NA NA NA -- cgit v1.2.1 From aaa4cab7e0c7212f91147a9789af54b97fe342ca Mon Sep 17 00:00:00 2001 From: Johannes Ranke Date: Tue, 29 Nov 2022 20:23:17 +0100 Subject: Complete starting values in summary for saem.mmkin fits Also update tests to the changes in mhmkin (see NEWS) --- tests/testthat/summary_saem_dfop_sfo_s.txt | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'tests/testthat/summary_saem_dfop_sfo_s.txt') diff --git a/tests/testthat/summary_saem_dfop_sfo_s.txt b/tests/testthat/summary_saem_dfop_sfo_s.txt index 7c337843..6468ff17 100644 --- a/tests/testthat/summary_saem_dfop_sfo_s.txt +++ b/tests/testthat/summary_saem_dfop_sfo_s.txt @@ -22,7 +22,7 @@ Using 300, 100 iterations and 4 chains Variance model: Two-component variance function -Mean of starting values for individual parameters: +Starting values for degradation parameters: parent_0 k_m1 f_parent_to_m1 k1 k2 1e+02 7e-03 5e-01 1e-01 2e-02 g @@ -31,6 +31,19 @@ Mean of starting values for individual parameters: Fixed degradation parameter values: None +Starting values for random effects (square root of initial entries in omega): + parent_0 k_m1 f_parent_to_m1 k1 k2 g +parent_0 101 0 0 0 0 0 +k_m1 0 1 0 0 0 0 +f_parent_to_m1 0 0 1 0 0 0 +k1 0 0 0 1 0 0 +k2 0 0 0 0 1 0 +g 0 0 0 0 0 1 + +Starting values for error model parameters: +a.1 b.1 + 1 1 + Results: Likelihood computed by importance sampling -- cgit v1.2.1