aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorJohannes Ranke <jranke@uni-bremen.de>2020-05-28 12:24:32 +0200
committerJohannes Ranke <jranke@uni-bremen.de>2020-05-28 12:24:32 +0200
commit609bfe2fd7ecbdcad5f5d641f0db51541dcd6a4e (patch)
tree82384c0441bdf268040ecc29913d820ae26611b6 /tests
parent156b82b88dbd73e9370c74b474432b410415046d (diff)
use_of_ff = "max" for shorthand models like "SFO"
Diffstat (limited to 'tests')
-rw-r--r--tests/figs/plotting/mkinparplot-for-focus-c-sfo.svg2
-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
6 files changed, 25 insertions, 25 deletions
diff --git a/tests/figs/plotting/mkinparplot-for-focus-c-sfo.svg b/tests/figs/plotting/mkinparplot-for-focus-c-sfo.svg
index ab517c96..62590397 100644
--- a/tests/figs/plotting/mkinparplot-for-focus-c-sfo.svg
+++ b/tests/figs/plotting/mkinparplot-for-focus-c-sfo.svg
@@ -73,7 +73,7 @@
</defs>
<rect x='472.87' y='414.90' width='5.40' height='5.40' style='stroke-width: 0.75;' clip-path='url(#cpMzAuMjR8Njg5Ljc2fDU0NS43NnwyODkuNDQ=)' />
<line x1='54.67' y1='545.76' x2='54.67' y2='289.44' style='stroke-width: 0.75; stroke-dasharray: 4.00,4.00;' clip-path='url(#cpMzAuMjR8Njg5Ljc2fDU0NS43NnwyODkuNDQ=)' />
-<g clip-path='url(#cpMzAuMjR8Njg5Ljc2fDU0NS43NnwyODkuNDQ=)'><text x='61.87' y='420.35' style='font-size: 12.00px; font-family: Liberation Sans;' textLength='74.70px' lengthAdjust='spacingAndGlyphs'>k_parent_sink</text></g>
+<g clip-path='url(#cpMzAuMjR8Njg5Ljc2fDU0NS43NnwyODkuNDQ=)'><text x='61.87' y='420.35' style='font-size: 12.00px; font-family: Liberation Sans;' textLength='46.69px' lengthAdjust='spacingAndGlyphs'>k_parent</text></g>
<line x1='344.77' y1='417.60' x2='665.33' y2='417.60' style='stroke-width: 0.75;' clip-path='url(#cpMzAuMjR8Njg5Ljc2fDU0NS43NnwyODkuNDQ=)' />
<polyline points='344.77,414.00 344.77,417.60 344.77,421.20 ' style='stroke-width: 0.75;' clip-path='url(#cpMzAuMjR8Njg5Ljc2fDU0NS43NnwyODkuNDQ=)' />
<polyline points='665.33,421.20 665.33,417.60 665.33,414.00 ' style='stroke-width: 0.75;' clip-path='url(#cpMzAuMjR8Njg5Ljc2fDU0NS43NnwyODkuNDQ=)' />
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