[R] dose.p in MASS

John Fox jfox at mcmaster.ca
Tue Jul 16 15:49:35 CEST 2002


At 12:40 PM 7/16/2002 +0200, Smit, A, Albertus, Dr wrote:

>I need to obtain an estimate of the 50% lethal dose (LD50) from a
>logistic regression model obtained by applying the glm procedure to
>some binomial data. The model appears to fit the data very well. I
>used dope.p from MASS to try and find LD50.
>
>The following output appears:
>
> > dose.p(iso.glm.logit, cf = c(1,3), p = 1:3/4)
>Error in dose.p(iso.glm.logit, cf = c(1, 3), p = 1:3/4) :
>         subscript out of bounds
>
>What is the problem here? The error disappears when fiddle around
>with cf (e.g., cf = c(1,2)), but I have no idea what this does, or even
>what the cf parameter is used for.
>
>Any help appreciated.

Dear Albertus,

 From the help page for dose.p:

cf The terms in the coefficient vector giving the intercept and coefficient 
of (log-)dose

Apparently, your model (unlike the example on the help page) has only one 
predictor, presumably the log dose; there are, therefore, only two 
coefficients -- for the intercept and log dose.

I hope that this helps,
  John
-----------------------------------------------------
John Fox
Department of Sociology
McMaster University
Hamilton, Ontario, Canada L8S 4M4
email: jfox at mcmaster.ca
phone: 905-525-9140x23604
web: www.socsci.mcmaster.ca/jfox
-----------------------------------------------------

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list