I want to obtain the full distribution of a Gamma (or Inverse Gaussian) distributed $y_i$ given a vector of $\bar x_i$ that have been used in the linear predictor of a coefficient. Suppose also for the Gamma GLM I have used the log-link instead of the canonical link.
Since both distributions are bi-parametric I know I can get the estimation of the mean parameter by predict(glmObj, ..., type="response")
whichever distribution whichever link I have used. I'm not sure about the conditional variance. I know that $var\left(y_i\right)=\phi*V\left(\mu_i\right)$. My questions are:
Is it correct to estimate $\phi$, the dispersion parameter, as the square root of
glmObj$deviance/glmObj$df.residual
, regardless of the distribution and canonical link?Is $V\left(\mu_i\right)$ dependent on the canonical link?
predict
using the argumentse.fit=TRUE
. It doesn't give you their covariance, however. Any two predicted values are a function of a linear combination of regression parameters. These usually aren't independent. It is easy to compute by hand, however. $\endgroup$glm(y ~ x, family =quasipoisson(link = "log"))
. When the $\phi=1$, then the quasi-likelihood will be the ML estimate. $\endgroup$