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

Change the way stress_tox_ca is calculated to make the steps more logical....

Change the way stress_tox_ca is calculated to make the steps more logical. Does not change the results.
parent 0e130125
No related branches found
No related tags found
No related merge requests found
...@@ -67,6 +67,7 @@ predict_mixture <- function(model_1, ...@@ -67,6 +67,7 @@ predict_mixture <- function(model_1,
model_1$effect_tox_mod, model_1$effect_tox_mod,
data.frame(concentration = concentration_1 + concentration_2_equivalent) data.frame(concentration = concentration_1 + concentration_2_equivalent)
) )
stress_tox_ca_1 <- effect_to_stress(effect_tox_ca_1)
response_level_1 <- 100 - predicted_model_1$effect_tox / model_1$args$effect_max * 100 response_level_1 <- 100 - predicted_model_1$effect_tox / model_1$args$effect_max * 100
response_level_1 <- clamp(response_level_1, 1e-10, 100 - 1e-10) response_level_1 <- clamp(response_level_1, 1e-10, 100 - 1e-10)
...@@ -79,8 +80,9 @@ predict_mixture <- function(model_1, ...@@ -79,8 +80,9 @@ predict_mixture <- function(model_1,
model_2$effect_tox_mod, model_2$effect_tox_mod,
data.frame(concentration = concentration_2 + concentration_1_equivalent) data.frame(concentration = concentration_2 + concentration_1_equivalent)
) )
stress_tox_ca_2 <- effect_to_stress(effect_tox_ca_2)
stress_tox_ca <- effect_to_stress(effect_tox_ca_1 * 0.5 + effect_tox_ca_2 * 0.5) stress_tox_ca <- (stress_tox_ca_1 + stress_tox_ca_2) / 2
# sys ----------------------------------------------------------------- # sys -----------------------------------------------------------------
sys_1 <- predict(model_1$sys_tox_mod, data.frame(stress_tox = stress_tox_ca)) sys_1 <- predict(model_1$sys_tox_mod, data.frame(stress_tox = stress_tox_ca))
......
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