Function predict()
for Poisson regression (for GLM in general) by default will calculate the values on the scale of the linear predictors, i.e. the log scale in this case (see help file for predict.glm
).
predict(fit, newdata=data.frame(Width=c(22)))
1
0.3042347
To get the predicted values on the scale of the response variable, you should add argument type="response"
to function predict()
.
predict(fit, newdata=data.frame(Width=c(22)),type="response")
1
1.355587