Skip to content
Snippets Groups Projects
Commit 2330951a authored by Sebastian Henz's avatar Sebastian Henz
Browse files

Test stresses returned by predict_mixture()

parent e3b4ac94
No related branches found
No related tags found
1 merge request!30version 3.0.0
......@@ -40,8 +40,17 @@ test_that("results have not changed", {
c(0, 0.01, 0.1, 1, 7, 15),
5,
0.3
)$effect
reference <- c(88.574578, 84.361552, 80.633762, 56.730550, 2.882718, 0)
)
reference <- data.frame(
concentration_a = c(0, 0.01, 0.1, 1, 7, 15),
concentration_b = 5,
effect = c(88.574578, 84.361552, 80.633762, 56.730550, 2.882718, 0),
stress_tox_sam = c(0.1886787, 0.2436883, 0.3185115, 0.5111081, 0.8904295, 1.0700716),
stress_tox_ca = c(0.18867873, 0.19199327, 0.21634282, 3.579444e-01, 7.126441e-01, 8.856914e-01),
stress_tox = c(0.18867873, 0.22817978, 0.28786093, 4.651590e-01, 8.370939e-01, 1.014758),
sys = c(0.07845536, 0.07312129, 0.04004696, 4.663355e-05, 0, 0),
stress_total = c(0.26713409, 0.30130107, 0.32790789, 4.652056e-01, 8.370939e-01, 1.014758)
)
expect_equal(new, reference, tolerance = 1e-5)
# diverse concentration_b
......@@ -51,8 +60,17 @@ test_that("results have not changed", {
c(0, 0.01, 0.1, 1, 7, 15),
c(0, 0.02, 0.2, 2, 14, 30),
0.3
)$effect
reference <- c(88.2698383, 79.9617127, 78.1574808, 65.7999834, 0.3861678, 0)
)
reference <- data.frame(
concentration_a = c(0, 0.01, 0.1, 1, 7, 15),
concentration_b = c(0, 0.02, 0.2, 2, 14, 30),
effect = c(88.2698383, 79.96171270, 78.1574808, 6.579998e+01, 3.861678e-01, 0),
stress_tox_sam = c(0, 0.07567745, 0.1807501, 4.510696e-01, 9.961584e-01, 1.294227),
stress_tox_ca = c(0, 0.05654834, 0.1343429, 3.367461e-01, 7.321990e-01, 9.063311e-01),
stress_tox = c(0, 0.06993872, 0.1668279, 4.167725e-01, 9.169706e-01, 1.177858),
sys = c(0.2698033, 0.26248944, 0.1774490, 1.829786e-04, 0, 0),
stress_total = c(0.2698033, 0.33242815, 0.3442769, 4.169555e-01, 9.169706e-01, 1.177858)
)
expect_equal(new, reference, tolerance = 1e-5)
# diverse concentration_b and custom effect_max
......@@ -63,8 +81,17 @@ test_that("results have not changed", {
c(0, 0.02, 0.2, 2, 14, 30),
0.3,
42
)$effect
reference <- c(88.2698383, 79.9617127, 78.1574808, 65.7999834, 0.3861678, 0) * 0.42
)
reference <- data.frame(
concentration_a = c(0, 0.01, 0.1, 1, 7, 15),
concentration_b = c(0, 0.02, 0.2, 2, 14, 30),
effect = c(37.0733321, 33.58391933, 32.8261419, 2.763599e+01, 1.621905e-01, 0),
stress_tox_sam = c(0, 0.07567745, 0.1807501, 4.510696e-01, 9.961584e-01, 1.294227),
stress_tox_ca = c(0, 0.05654834, 0.1343429, 3.367461e-01, 7.321990e-01, 9.063311e-01),
stress_tox = c(0, 0.06993872, 0.1668279, 4.167725e-01, 9.169706e-01, 1.177858),
sys = c(0.2698033, 0.26248944, 0.1774490, 1.829786e-04, 0, 0),
stress_total = c(0.2698033, 0.33242815, 0.3442769, 4.169555e-01, 9.169706e-01, 1.177858)
)
expect_equal(new, reference, tolerance = 1e-5)
})
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment