[R] Re : using predict() or fitted() from a model with offset; unsolved, included reproducible code

2008-10-13 Thread sam_oi
Thanks for your reply Mark, but no, using predict on the new data.frame does not help here.   I had first thought that the probelm was due the explanatory variable (age) and the offset one (date) being very similar (highly correlated, I am trying to tease their effect apart, and hoped offset wou

[R] using predict() or fitted() from a model with offset

2008-10-12 Thread sam_oi
Dear R-users, I have come across some difficulties using the offset argument in a model. There is not much information in ?offset, ?lm, ?glm and therefore have resorted to post here. Offset appears to work in the models I run becuase I get the expected coefficients when comparing offset and n

[R] Re : AW: Coefficients in a polynomial glm with family poisson/binomial

2008-10-11 Thread sam_oi
Thanks for that Daniel, Problem solved. I was mis-specifying the equation, omitting that I had to account for the logit transformation used in family binomial. i.e. had to write y~exp(b+ax+cx^2)/(1+exp(b+ax+cx^2)) to make use of the coeffs The last part of what I was doing worked, running an lm

[R] Coefficients in a polynomial glm with family poisson/binomial

2008-10-10 Thread sam_oi
Dear R-users When running a glm polynomial model with one explanatory variable (example Y~X+X^2), with a poisson or binomial error distribution, the predicted values obtained from using the predict() function and those obtained from using the coefficients from the summary table "as is" in an eq