# NOT RUN {
# Calculate the LC10, the concentration where the survival falls
# below 90% of the survival in the control.
model <- ecxsys(
concentration = c(0, 0.05, 0.5, 5, 30),
hormesis_concentration = 0.5,
survival_tox_observed = c(90, 81, 92, 28, 0)
)
# using the ecxsys() output or the curves therein directly:
lc(model, "survival_tox_sys", 10)
lc(model$curves, "survival_tox_sys", 10)
# using the output of predict_ecxsys() with custom concentrations:
conc <- 10^seq(-9, 1, length.out = 1000)
curves <- predict_ecxsys(model, conc)
lc(curves, "survival_tox_sys", 10)
# using a custom data frame:
df_custom <- data.frame(
concentration = curves$concentration,
foo = curves$survival_tox_sys
)
lc(df_custom, "foo", 10)
# Calculate the LC50 relative to an survival of 100
# instead of relative to the control:
lc(model, "survival_tox_sys", 50, reference = 100)
# }
Run the code above in your browser using DataLab