aboutsummaryrefslogtreecommitdiff
path: root/tests/testthat
diff options
context:
space:
mode:
Diffstat (limited to 'tests/testthat')
-rw-r--r--tests/testthat/FOCUS_2006_D.csf2
-rw-r--r--tests/testthat/NAFTA_SOP_Appendix_B.txt18
-rw-r--r--tests/testthat/NAFTA_SOP_Appendix_D.txt18
-rw-r--r--tests/testthat/test_confidence.R4
-rw-r--r--tests/testthat/test_nlme.R6
5 files changed, 24 insertions, 24 deletions
diff --git a/tests/testthat/FOCUS_2006_D.csf b/tests/testthat/FOCUS_2006_D.csf
index 5d946ecd..f845cc1d 100644
--- a/tests/testthat/FOCUS_2006_D.csf
+++ b/tests/testthat/FOCUS_2006_D.csf
@@ -5,7 +5,7 @@ Description:
MeasurementUnits: % AR
TimeUnits: days
Comments: Created using mkin::CAKE_export
-Date: 2020-05-26
+Date: 2020-05-28
Optimiser: IRLS
[Data]
diff --git a/tests/testthat/NAFTA_SOP_Appendix_B.txt b/tests/testthat/NAFTA_SOP_Appendix_B.txt
index 294ea09f..2a23f5da 100644
--- a/tests/testthat/NAFTA_SOP_Appendix_B.txt
+++ b/tests/testthat/NAFTA_SOP_Appendix_B.txt
@@ -7,17 +7,17 @@ Critical sum of squares for checking the SFO model:
Parameters:
$SFO
- Estimate Pr(>t) Lower Upper
-parent_0 51.243 2.12e-10 45.724 56.762
-k_parent_sink 0.253 2.95e-06 0.193 0.332
-sigma 3.529 1.28e-04 2.061 4.997
+ Estimate Pr(>t) Lower Upper
+parent_0 51.243 2.12e-10 45.724 56.762
+k_parent 0.253 2.95e-06 0.193 0.332
+sigma 3.529 1.28e-04 2.061 4.997
$IORE
- Estimate Pr(>t) Lower Upper
-parent_0 51.71053 2.60e-14 4.97e+01 53.68122
-k__iore_parent_sink 0.00135 5.21e-02 3.88e-04 0.00469
-N_parent 2.66147 3.67e-08 2.23e+00 3.08855
-sigma 1.25124 1.76e-04 7.24e-01 1.77811
+ Estimate Pr(>t) Lower Upper
+parent_0 51.71053 2.60e-14 4.97e+01 53.68122
+k__iore_parent 0.00135 5.21e-02 3.88e-04 0.00469
+N_parent 2.66147 3.67e-08 2.23e+00 3.08855
+sigma 1.25124 1.76e-04 7.24e-01 1.77811
$DFOP
Estimate Pr(>t) Lower Upper
diff --git a/tests/testthat/NAFTA_SOP_Appendix_D.txt b/tests/testthat/NAFTA_SOP_Appendix_D.txt
index 375830b7..c0b7035c 100644
--- a/tests/testthat/NAFTA_SOP_Appendix_D.txt
+++ b/tests/testthat/NAFTA_SOP_Appendix_D.txt
@@ -7,17 +7,17 @@ Critical sum of squares for checking the SFO model:
Parameters:
$SFO
- Estimate Pr(>t) Lower Upper
-parent_0 83.7558 1.80e-14 77.18268 90.3288
-k_parent_sink 0.0017 7.43e-05 0.00112 0.0026
-sigma 8.7518 1.22e-05 5.64278 11.8608
+ 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_sink 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
+ 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
diff --git a/tests/testthat/test_confidence.R b/tests/testthat/test_confidence.R
index e85fdb7a..3fdd3f2c 100644
--- a/tests/testthat/test_confidence.R
+++ b/tests/testthat/test_confidence.R
@@ -67,9 +67,9 @@ test_that("Likelihood profile based confidence intervals work", {
f <- fits[["SFO", "FOCUS_C"]]
# negative log-likelihood for use with mle
- f_nll <- function(parent_0, k_parent_sink, sigma) {
+ f_nll <- function(parent_0, k_parent, sigma) {
- f$ll(c(parent_0 = as.numeric(parent_0),
- k_parent_sink = as.numeric(k_parent_sink),
+ k_parent = as.numeric(k_parent),
sigma = as.numeric(sigma)))
}
f_mle <- stats4::mle(f_nll, start = as.list(parms(f)), nobs = nrow(FOCUS_2006_C))
diff --git a/tests/testthat/test_nlme.R b/tests/testthat/test_nlme.R
index 31fb19de..5a8db142 100644
--- a/tests/testthat/test_nlme.R
+++ b/tests/testthat/test_nlme.R
@@ -51,10 +51,10 @@ test_that("nlme_function works correctly", {
m_nlme_mmkin <- nlme(f)
- m_nlme_raw_2 <- nlme(value ~ SSasymp(time, 0, parent_0, log_k_parent_sink),
+ m_nlme_raw_2 <- nlme(value ~ SSasymp(time, 0, parent_0, log_k_parent),
data = grouped_data,
- fixed = parent_0 + log_k_parent_sink ~ 1,
- random = pdDiag(parent_0 + log_k_parent_sink ~ 1),
+ fixed = parent_0 + log_k_parent ~ 1,
+ random = pdDiag(parent_0 + log_k_parent ~ 1),
start = mean_degparms(f, random = TRUE))
expect_equal(m_nlme_raw_2$coefficients, m_nlme_mmkin$coefficients)

Contact - Imprint