[R] plot.drm in "drc" package
hannah.hlx at gmail.com
Tue Aug 30 17:07:17 CEST 2016
I am trying to use the drc package to fit 4L curve.
I am so confused about the plot.drm function in the drc package.
Particularly, I am confused about the scale of the xaxis in the plots
generated using the plot.drm function. See the example below:
## generate data and fit the model
dose <- rep(50*2^(-(0:11)),3)
d <- 100
c <- 1
b <- 1
e <- 1.6
y <- rnorm(length(dose))+ c+ (d-c)/(1+exp(b*(log(dose)-log(e))))
mod <- drm(y~dose, fct = LL.4())
Now I plot the data and the fitted curve with the plot.drm using the code
below and get the figure 1 below.
##obtaining figure 1
Next I plot the raw data and add the curve by extracting the estimate of
para <- mod$fit$par
chat <- para
dhat <- para
ehat <- para
##plot figure 2
points(log(50*2^(-(0:11))), chat +
My question is regarding the figure 1 generated by the plot.drm.
The x axis is the not the log scale of the doses. I checked the package
manual, it says the default is log base 10. But it is not true in this case.
Does some have some insight on the correct usage of the plot.drm function.
Thanks much in advance.
[[alternative HTML version deleted]]
More information about the R-help