[R] basic question predict GLM offset
dwinsemius at comcast.net
Sun Apr 15 01:37:00 CEST 2012
On Apr 14, 2012, at 6:47 PM, smfa wrote:
> I know this is probably a basic question... But I don't seem to find
> I'm fitting a GLM with a Poisson family, and then tried to get a
> look at the
> predictions, however the offset does seem to be taken into
> offset=(log(population)), data=data, subset=28:36, family=poisson())
> predict (model_glm, type="response")
> I get cases not rates...
> I've tried also
> offset(log(population)), data=data, subset=28:36, family=poisson())
> with the same results. However when I predict from GAM, using mgcv,
> predictions consider the offset (I get rates).
The beta coefficients are the log-rate-estimates when you use
log(population) as the offset.
> I'm missing something?
You are most definitely missing the part where you include 'data'.
David Winsemius, MD
West Hartford, CT
More information about the R-help