Assume the following easy example of a glm regression with an offset:
numberofdrugs<-rpois(84, 10)
healthvalue<-rpois(84,75)
age<-rnorm(84,50,5)
test<-glm(healthvalue~age, family=poisson, offset=log(numberofdrugs))
summary(test)
fitted(test) #how to get one of these values manually?
- How can I compute the fitted values manually?
- Also, why is there no estimation of log(numberofdrugs)?
- In the book Generalized Linear Models on page 205-207 there is an example where the offset is estimated. It was done to see if the coefficient is close to one. It's 0.903 (see page 207 if you've this classic book) and from this follows, that there is nearly a constant rate in the number of damage incident!
Previous related questions asked:
{}button) instead of cite (>indent,"button). – mbq♦ Jun 8 '11 at 10:48