0
$\begingroup$

I'll illustrate what I want to do with a Poisson GLM first. I have a GLM with only factor co-variates, thus, to bootstrap this GLM what I can do is e.g. take a single random observation without the response, predict the response using my Poisson GLM, and get a value $\lambda$. Since this is Poisson, the predicted expected value (response) is exactly the same as the parameter I need to for the distribution: I can sample a number from uniform $[0, 1]$ and quantile this number from a $POI(\lambda)$.

Now, is it possible to do this with the Gamma GLM (log-link)? The expected value of a gamma distribution is $\alpha\beta$ or $\frac{\alpha}{\beta}$, depending on your definition. I'm also open to other ideas.

$\endgroup$
5
  • $\begingroup$ With a gamma glm the parameterization you would start with a shape-mean parameterization with the glm; the glm gives you the mean and you can then estimate the shape (e.g. in R, the package MASS that comes with R provides utilities for exactly this purpose). You can then easily convert to a shape-scale or shape rate parameterization as suits your needs. (In R you'd use rgamma to generate random gammas). $\endgroup$
    – Glen_b
    Commented May 21, 2023 at 11:00
  • $\begingroup$ @Glen_b Can you elaborate a bit more? I couldn't find what you mean by a shape-mean parameterization, nor do I know the package that could do so in MASS. $\endgroup$ Commented May 21, 2023 at 11:07
  • $\begingroup$ MASS is a package. Search for gamma in the help file. The mean $\mu$ is shape$\times$scale, you just rewrite the density in terms of $\alpha, \mu$. A search here on stats.SE should turn up several hits. $\endgroup$
    – Glen_b
    Commented May 22, 2023 at 0:27
  • $\begingroup$ Specifically, in R, library(help="MASS") should give you a window that lists the functions and data sets in MASS (which comes with R). In that list, you should be able to find gamma.dispersion and gamma.shape. (A reference for the dispersion-mean form is Dunn & Smyth Generalized Linear Models With Examples in R, page 428. The shape mean form simply replaces each $1/\phi$ with $\alpha$. Or take the shape-scale form and replace every occurrence of the scale parameter with $\mu/\alpha$; ... ctd $\endgroup$
    – Glen_b
    Commented Jun 2, 2023 at 2:31
  • $\begingroup$ ctd... either way should give the same form as given by Stefan here (there $\nu$ is the shape) $\endgroup$
    – Glen_b
    Commented Jun 2, 2023 at 2:35

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.