On Mon, 15 Mar 2004 Mark.Bravington@csiro.au wrote:
Thanks (I hadn't realize 'response' could be 0). However, there's now a problem (in R 1.9.0 alpha) with *removing* offsets via 'update':
fit2 <- glm( y ~ z + offset(x), data=df) fit2$call
glm(formula = y ~ z + offset(x), data = df)
update( fit2, ~.-offset(x))$call
glm(formula = y ~ z + offset(x), data = df) # the offset wasn't removed even though it should have been
No, it should not have been. In neither R nor S does - offset remove an offset term. For specials, - is equivalent to +.
glm(y ~ offset(x) + z - offset(x), data=df)
Call: glm(formula = y ~ offset(x) + z - offset(x), data = df)
Coefficients:
(Intercept) z
-1.3660 0.1610
is the same as fit1.
Brian D. Ripley, ripley@stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595