HW 10 Solutions

STA 211 Spring 2023 (Jiang)

Exercise 1

Consider the linear regression model under the normality assumption (and constant variance). Is this a GLM? If so, identify the three components needed. If not, explain why not.

Yes. Under the normality and constant variance assumptions, the distribution of \(Y | \mathbf{X}\) is \(N(\mathbf{X}\boldsymbol\beta, \sigma^2)\). The conditional expectation \(E(Y | \mathbf{X})\) is linked to thr linear predictor \(\mathbf{X}\boldsymbol\beta\) through the identity function.

Exercise 2

Suppose we’re trying to model the number of cancer cases per month (\(Y\)) in a city, conditionally on various demographic and exposure factors. Consider the log-linear regression model \(\log(E(Y | \mathbf{X})) = \mathbf{X}\boldsymbol\beta\), where \(Y\) takes on a Poisson distribution with parameter \(\lambda\). Is this a GLM? If so, identify the three components needed (including specifics regarding the exponential family) and specifically identify whether the link function is canonical. If not, explain why not.

Yes. The distribution of \(Y | \mathbf{X}\) is \(Pois(\lambda)\). The conditional expectation \(\lambda = E(Y | \mathbf{X})\) is linked to the linear predictor \(\mathbf{X}\boldsymbol\beta\) through the log function. This is indeed the canonical link. The relevant functions for the Poisson distribution in canonical form are

\[\begin{align*} h(y) &= \frac{1}{y!}I(y \in \{0, 1, 2, \cdots \})\\ \eta(\lambda) &= \log(\lambda) \equiv \eta \implies \lambda = e^\eta\\ T(y) &= y\\ A(\eta) &= \lambda \end{align*}\]

Exercise 3

Suppose we’re trying to model the waiting time until the next bus arrives (\(Y\)), conditionally on weather conditions and traffic. Consider the log-linear regression model \(\log(E(Y |\mathbf{X})) = \mathbf{X}\boldsymbol\beta\), where \(Y\) takes on an Exponential distribution with parameter \(\lambda\). Is this a GLM? If so, identify the three components needed (including specifics regarding the exponential family) and specifically identify whether the link function is canonical. If not, explain why not

Yes. The distribution of \(Y\) is \(Exp(\lambda)\). The conditional expectation \(\lambda = E(Y | \mathbf{X})\) is linked to the linear predictor \(\mathbf{X}\boldsymbol\beta\) through the log function. This is not the canonical link, since the relevant functions for the Exponential distribution are

\[\begin{align*} h(y) &= I(y > 0)\\ \eta(\lambda) &= -{\lambda} \equiv \eta \implies \lambda = -\eta\\ T(y) &= y\\ A(\eta) &= -\log\left(-\eta\right) \end{align*}\]