Instructions
(1) Use R Markdown to compile your solutions.
(2) Your solutions must have the full R codes and outputs of all questions.
(3) Discuss the relevant R outputs that are related to a specific question.
QUESTION 1
[10]
Let $\ell(\hat{\beta}_{min})$ denote the maximum value of the log-likelihood function for the minimal model with linear predictor $\mathbf{x}^T \beta_{min} = \beta_0$, and let $\ell(\hat{\beta})$ be the corresponding value for a more general model $\mathbf{x}^T \beta = \beta_0 + \beta_1 x_1 + \dots + \beta_p x_p$.
(a) Show that the likelihood ratio chi-squared statistics is
$C = 2[\ell(\hat{\beta}) - \ell(\hat{\beta}_{min})] = D_0 - D_1$,
where $D_0$ is the deviance for the minimal model and $D_1$ is the deviance for the more general model.
(5)
(b) Deduce that if $\beta_1 = \dots = \beta_p = 0$, then $C$ has the central chi-squared distribution with $p$ degrees of freedom.
(5)