Q45. Gamma regression from the exponential-family form

[12 marks]

Independent positive responses have density f(y_i\mid\mu_i,k) =\frac{k^k}{\Gamma(k)\mu_i^k} y_i^{k-1}\exp\left(-\frac{ky_i}{\mu_i}\right), \qquad y_i>0, where \mu_i>0 and k>0.

(a) Express the density in the form f(y;\theta,\phi) =\exp\left\{ \frac{a(y)b(\theta)+c(\theta)}{e(\phi)}+d(y;\phi) \right\}, taking \theta=\mu and \phi=1/k. Identify all five functions. [4 marks]

(b) Find \mathbb{E}(Y_i) and \operatorname{Var}(Y_i). [2 marks]

(c) Under the model \log\mu_i=\beta_0+\beta_1x_i, interpret \beta_1 and derive the ratio of expected responses at x+1 and x. [2 marks]

(d) Derive the score vector for \boldsymbol\beta, treating k as known. [3 marks]

(e) Explain why this model does not assert that \log Y_i is Normally distributed. [1 mark]

Definitions. A Gamma variable with shape k and rate k/\mu has mean \mu and variance \mu^2/k; set \phi=1/k. In the exponential-family form of part (a), b(\theta) is the coefficient paired with the statistic a(y) after division by e(\phi). For regression, \mathbf X_i=(1,x_i)^\top, \boldsymbol\beta=(\beta_0,\beta_1)^\top, and \mu_i=e^{\mathbf X_i^\top\boldsymbol\beta}. Responses are independent and covariates fixed; the score calculation holds k>0 known.

(a) Exponential-family representation. For one observation, taking logarithms gives \log f(y\mid\mu,k) =k\log k-\log\Gamma(k)-k\log\mu+(k-1)\log y-\frac{ky}{\mu}. With \theta=\mu and \phi=1/k, rearrange this as \log f(y;\theta,\phi) =\frac{-y/\theta-\log\theta}{\phi} +\frac1\phi\log\frac1\phi-\log\Gamma\!\left(\frac1\phi\right) +\left(\frac1\phi-1\right)\log y. One valid identification of the five functions is \boxed{ a(y)=y,\qquad b(\theta)=-\frac1\theta,\qquad c(\theta)=-\log\theta,\qquad e(\phi)=\phi, } \boxed{ d(y;\phi)=\frac1\phi\log\frac1\phi -\log\Gamma\!\left(\frac1\phi\right) +\left(\frac1\phi-1\right)\log y. } The support is y>0, with \theta>0 and \phi>0.

(b) Mean and variance. The given density is Gamma with shape k and rate k/\mu_i. Therefore \boxed{\mathbb{E}(Y_i)=\frac{k}{k/\mu_i}=\mu_i,\qquad \operatorname{Var}(Y_i)=\frac{k}{(k/\mu_i)^2} =\frac{\mu_i^2}{k}=\phi\mu_i^2.}

(c) Interpretation of the coefficient. The log link gives \mu(x)=e^{\beta_0+\beta_1x}, so \boxed{\frac{\mathbb{E}(Y\mid x+1)}{\mathbb{E}(Y\mid x)} =\frac{e^{\beta_0+\beta_1(x+1)}}{e^{\beta_0+\beta_1x}} =e^{\beta_1}.} Thus a one-unit increase in x multiplies the expected response by e^{\beta_1}, corresponding to a percentage change 100(e^{\beta_1}-1)\%. The coefficient \beta_1 itself is the change in the log of the mean, not an additive change in the response.

(d) Score vector. Let \mathbf X_i=(1,x_i)^\top and \boldsymbol\beta=(\beta_0,\beta_1)^\top, so that \mu_i=e^{\mathbf X_i^\top\boldsymbol\beta}. Treating k as known, \ell(\boldsymbol\beta) =-k\sum_{i=1}^n\left(\log\mu_i+\frac{y_i}{\mu_i}\right)+C, where C does not depend on \boldsymbol\beta. Differentiate each summand with respect to its mean and apply the chain rule: \frac{\partial\ell_i}{\partial\mu_i} =-\frac{k}{\mu_i}+\frac{ky_i}{\mu_i^2}, \qquad \frac{\partial\mu_i}{\partial\boldsymbol\beta}=\mu_i\mathbf X_i. It follows that \begin{aligned} S(\boldsymbol\beta) &=\sum_{i=1}^n \left(-\frac{k}{\mu_i}+\frac{ky_i}{\mu_i^2}\right)\mu_i\mathbf X_i\\ &=\boxed{k\sum_{i=1}^n\mathbf X_i\left(\frac{y_i}{\mu_i}-1\right)}. \end{aligned} In components, S(\boldsymbol\beta) =k\begin{pmatrix} \sum_i(y_i/\mu_i-1)\\[3pt] \sum_i x_i(y_i/\mu_i-1) \end{pmatrix}.

(e) Why this is not a lognormal model. The model specifies a Gamma distribution for Y_i and a linear predictor for \log\mu_i=\log\mathbb{E}(Y_i). It does not specify a Normal distribution for \log Y_i. Applying a log link to a conditional mean is not the same operation as transforming the response and assuming Normal errors.

Key result. Keep the response distribution and the link separate: Gamma response plus log link does not mean lognormal response.