# Re: [R] Finding LD50 from an interaction Generalised Linear model

From: Gduncan <boa04gmd_at_shef.ac.uk>
Date: Wed, 13 Feb 2008 01:37:06 -0800 (PST)

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.

______________________________________________
R-help_at_r-project.org 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.
Received on Wed 13 Feb 2008 - 09:54:10 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Wed 13 Feb 2008 - 10:30:13 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.