[R] how to estimate dose from respond given drc package result
Gabor Grothendieck
ggrothendieck at gmail.com
Wed Apr 18 02:51:07 CEST 2007
Try this:
library(drc)
# get dose corresponding to response (y = 2)
model1 <- multdrc(rootl ~ conc, data = ryegrass)
f <- function(x, y) y - predict(model1, data.frame(conc = x))[1]
uniroot(f, c(0, 10), y = 2)
On 4/17/07, John McNeil <jam at xardas.com> wrote:
> Dear all,
>
> I can use the very nice drc package (multdrc()) to model and plot a
> dataframe containing dose and response values. I can also use
> predict.drc() to yield response values given a dose. I need to do the
> opposite, estimate a dose given the response. The general predict
> documentation seems to say that this is possible, but it does not
> appear that predict.drc has that capability. This makes sense because
> it is easy to compute y values from x values, given the fitted
> equation, but it is hard to do the opposite.
>
> It seems that I need to do some kind of successive approximation. Is
> there a package that takes a multdrc generated model and estimates
> dose given response?
>
> Thank you all for your time,
>
> John
>
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>
More information about the R-help
mailing list