[R] ED50 from logistic model with interactions
Berwin A Turlach
berwin at maths.uwa.edu.au
Wed May 2 08:45:57 CEST 2007
On Wed, 02 May 2007 11:37:22 +1000
Kate Stark <lhodgson at postoffice.utas.edu.au> wrote:
> [...] My model is:
> fit <- glm(Mature ~ Season * Size - 1, family = binomial, data=dat)
> where Mature is a binary response, 0 for immature, 1 for mature. There
> are 3 Seasons.
I would use:
fit <- glm(Mature ~ Season/Size - 1, family=binomial, data=dat)
With this parameterisation you get the three intercepts and the three
slopes directly (together with there standard errors from summary()).
Makes life simpler for your calculations.
> In Faraway(2006) he has an example using the delta method to calculate
> the StdErr, but again without any interactions. I can apply this for
> the first Season, as there is just one intercept and one slope
> coefficient, but for the other 2 Seasons, the slope is a combination
> of the Size coefficient and the Size*Season coefficient, [...]
Not with the above parameterisation, so life is easier. I don't have
my copy of Faraway (2006) handy at the moment, so I cannot vouch that
you can use the method the describes now directly. But I expect you
> I could divide the data and do 3 different logistic regressions, one
> for each season, but while the Mat50 (i.e. mean Size at 50% maturity)
> is the same as that calculated by the separate lines regression, Im
> not sure how this may change the StdErr?
As far as I can tell, there should be no difference. Compare the
estimates and their standard errors that you obtain from the 3
different logistic fits with the estimates and standard errors from the
parameterisation that I suggested. They should be the same.
Hope this helps.
More information about the R-help