# How to get fitted values, prediction, and residual plots for Exponential GLM?

To get Exponential GLM, you can do:

fit = glm(formula =..., family = Gamma)

summary(fit, dispersion=1)

But how do you get the fitted values, prediction using new data, and Pearson's residuals easily? I used to do fitted.values(fit), predict(fit, newdata, type = 'response'), and residual(fit, type = 'pearson') after fitting a GLM as the object fit. But this isn't fitting an Exponential GLM to the object fit...

• This appears to be a question only about how to use these R functions (& hence off topic here). – gung Dec 7 '16 at 22:08
• @gung I believe there's an underlying statistical issue to explain here. This question could be modified to reflect that aspect and some of the present question relating to R functionality is then partly moot -- the remainder could be posted as a new question. – Glen_b Dec 8 '16 at 4:14
• I'd be happy with this question if it were edited to focus on the underlying statistical issue. – gung Dec 8 '16 at 12:54

• Actually, you should have exactly the same problem with exponential as with the Gamma, because in both cases the support is the same -- $(0,\infty)$ (don't believe Wikipedia's page on the exponential in this regard; you can't have exact zeros with the exponential) – Glen_b Dec 8 '16 at 5:08
• Hardly your only option. I'd think zero-inflated or hurdle models; the problem with Tweedie is that a $p$ parameter than matches the proportion of zeros well is rarely one that matches the rest of the distribution well. – Glen_b Dec 8 '16 at 5:17