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

Rename stress_tox_sam to stress_tox_sa, closes #39

parent ab260191
No related branches found
No related tags found
1 merge request!30version 3.0.0
Pipeline #3629 passed with stage
in 10 minutes and 1 second
......@@ -3,7 +3,8 @@
* Renamed all instances of "effect" to "survival".
* Renamed all instances of "ec" to "lc".
* Renamed `predict_mixture()` to `multi_tox()`.
* The argument `proportion_ca` in the mixture model `multi_tox` was renamed and its value reversed. It is now called `sa_contribution` and specifies the proportion of stress addition in the calculation of toxicant stress. To convert your code from the old version use this equation: sa_contribution = 1 - proportion_ca.
* The argument `proportion_ca` in the mixture model `multi_tox()` was renamed and its value reversed. It is now called `sa_contribution` and specifies the proportion of stress addition in the calculation of toxicant stress. To convert your code from the old version use this equation: sa_contribution = 1 - proportion_ca.
* Renamed `stress_tox_sam` to `stress_tox_sa` in the output of `multi_tox()`.
# stressaddition 2.7.0
......
......@@ -96,7 +96,7 @@ multi_tox <- function(model_a,
predicted_model_b <- predict_ecxsys(model_b, concentration_b)
# tox stress ----------------------------------------------------------
stress_tox_sam <- predicted_model_a$stress_tox + predicted_model_b$stress_tox
stress_tox_sa <- predicted_model_a$stress_tox + predicted_model_b$stress_tox
# Convert the model_b concentration into an equivalent model_a concentration
# and vice versa.
......@@ -129,7 +129,7 @@ multi_tox <- function(model_a,
# combined stress and result ------------------------------------------
ca_contribution <- 1 - sa_contribution
stress_tox_total <- stress_tox_sam * sa_contribution + stress_tox_ca * ca_contribution
stress_tox_total <- stress_tox_sa * sa_contribution + stress_tox_ca * ca_contribution
stress_total <- stress_tox_total + sys_total
survival <- stress_to_survival(stress_total) * survival_max
......@@ -137,7 +137,7 @@ multi_tox <- function(model_a,
concentration_a = concentration_a,
concentration_b = concentration_b,
survival = survival,
stress_tox_sam = stress_tox_sam,
stress_tox_sa = stress_tox_sa,
stress_tox_ca = stress_tox_ca,
stress_tox = stress_tox_total,
sys = sys_total,
......
......@@ -45,7 +45,7 @@ test_that("results have not changed", {
concentration_a = c(0, 0.01, 0.1, 1, 7, 15),
concentration_b = 5,
survival = 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_sa = 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),
......@@ -65,7 +65,7 @@ test_that("results have not changed", {
concentration_a = c(0, 0.01, 0.1, 1, 7, 15),
concentration_b = c(0, 0.02, 0.2, 2, 14, 30),
survival = 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_sa = 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),
......@@ -86,7 +86,7 @@ test_that("results have not changed", {
concentration_a = c(0, 0.01, 0.1, 1, 7, 15),
concentration_b = c(0, 0.02, 0.2, 2, 14, 30),
survival = 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_sa = 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),
......
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