"Juli G. Pausas" <juli at ceam.es> writes:
R-users, Can an offset term be included in a Poisson model? I get an error message when trying that:
r3o <- glm(tax ~ areal + offset(o), family=poisson)
Error in (if (is.empty.model(mt)) glm.fit.null else glm.fit)(x = X, y = Y, :
inner loop 1; can't correct step size
Which version of R is that? I have no trouble with simple things like
x1 <- rnorm(10) x2 <- rnorm(10) y <- rpois(10, exp(x1+x2)) glm(y~x1+offset(x2),family=poisson)
Call: glm(formula = y ~ x1 + offset(x2), family = poisson)
Coefficients:
(Intercept) x1
0.0548 0.6574
Degrees of Freedom: 9 Total (i.e. Null); 8 Residual
Null Deviance: 9.823
Residual Deviance: 4.018 AIC: 34.03
You're aware that the offset needs to be on the link scale?
O__ ---- Peter Dalgaard Blegdamsvej 3 c/ /'_ --- Dept. of Biostatistics 2200 Cph. N (*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918 ~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk) FAX: (+45) 35327907 -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._