p <- efftox_solve_p(0.5, 0.65, 0.7, 0.25)
prob_tox <- efftox_get_tox(0.7, 0, p, eff0 = 0.5, tox1 = 0.65)
round(prob_tox, 2) == 0.25
prob_tox <- efftox_get_tox(0.7, seq(-0.5, 0.25, by = 0.25), p, eff0 = 0.5,
tox1 = 0.65)
round(prob_tox, 2) == c(0.57, 0.41, 0.25, 0.09)
prob_tox <- efftox_get_tox(c(0.5, 0.7, 0.8), 0.25, p, eff0 = 0.5, tox1 = 0.65)
round(prob_tox, 2) == c(NaN, 0.09, 0.22)
prob_tox <- efftox_get_tox(c(0.5, 0.7, 0.8), c(-1, 0, 1), p, eff0 = 0.5,
tox1 = 0.65)
round(prob_tox, 2) == c(0.63, 0.25, NaN)
Run the code above in your browser using DataLab