[R] Finding LD50 from an interaction Generalised Linear model
Gduncan
boa04gmd at shef.ac.uk
Wed Feb 13 10:37:06 CET 2008
Many thanks indeed Bill. I understand now what you're getting at with the
a/b-1!
Many thanks again.
Graeme Duncan
Bill.Venables wrote:
>
> The trick is to fit the model in a form which has the two separate
> intercepts and the two separate slopes as the parameters.
>
> You do have to realise that a*b, a*b-1, a/b, a/b-1, ... all specify the
> same model, they just use different parameters for the job. (Yes,
> really!)
>
>> dat
> ldose sex numdead
> 1 0 M 0
> 2 1 M 3
> 3 2 M 9
> 4 3 M 16
> 5 4 M 18
> 6 5 M 20
> 7 0 F 0
> 8 1 F 2
> 9 2 F 6
> 10 3 F 10
> 11 4 F 11
> 12 5 F 14
>> dat <- transform(dat, Tot = 20)
>> fm <- glm(numdead/20 ~ sex/ldose-1, binomial, dat, weights = Tot)
>> coef(fm)
> sexF sexM sexF:ldose sexM:ldose
> -2.7634338 -3.4853625 0.7793144 1.5877754
>> dose.p(fm, c(1,3)) ## females
> Dose SE
> p = 0.5: 3.545981 0.3025148
>> dose.p(fm, c(2,4)) ## males
> Dose SE
> p = 0.5: 2.195123 0.1790317
>>
>
> In fact if you look at the book from which dose.p comes, you will find
> an example not unlike this one done this way. At least I think that's
> what I, er, read.
>
> W.
>
> Bill Venables
> CSIRO Laboratories
> PO Box 120, Cleveland, 4163
> AUSTRALIA
> Office Phone (email preferred): +61 7 3826 7251
> Fax (if absolutely necessary): +61 7 3826 7304
> Mobile: +61 4 8819 4402
> Home Phone: +61 7 3286 7700
> mailto:Bill.Venables at csiro.au
> http://www.cmis.csiro.au/bill.venables/
>
>
--
View this message in context: http://www.nabble.com/Finding-LD50-from-an-interaction-Generalised-Linear-model-tp15436597p15452544.html
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help
mailing list