A1.13

Computational Statistics and Statistical Modelling | Part II, 2002

(i) Suppose Y1,,YnY_{1}, \ldots, Y_{n} are independent Poisson variables, and

E(Yi)=μi,logμi=α+βTxi,1in\mathbb{E}\left(Y_{i}\right)=\mu_{i}, \log \mu_{i}=\alpha+\beta^{T} x_{i}, 1 \leqslant i \leqslant n

where α,β\alpha, \beta are unknown parameters, and x1,,xnx_{1}, \ldots, x_{n} are given covariates, each of dimension pp. Obtain the maximum-likelihood equations for α,β\alpha, \beta, and explain briefly how you would check the validity of this model.

(ii) The data below show y1,,y33y_{1}, \ldots, y_{33}, which are the monthly accident counts on a major US highway for each of the 12 months of 1970 , then for each of the 12 months of 1971 , and finally for the first 9 months of 1972 . The data-set is followed by the (slightly edited) RR output. You may assume that the factors 'Year' and 'month' have been set up in the appropriate fashion. Give a careful interpretation of this RR output, and explain (a) how you would derive the corresponding standardised residuals, and (b) how you would predict the number of accidents in October 1972 .

523749293132283432395063352227273423423036564840332631252320252036\begin{array}{llllllllllll}52 & 37 & 49 & 29 & 31 & 32 & 28 & 34 & 32 & 39 & 50 & 63 \\ 35 & 22 & 27 & 27 & 34 & 23 & 42 & 30 & 36 & 56 & 48 & 40 \\ 33 & 26 & 31 & 25 & 23 & 20 & 25 & 20 & 36 & & & \end{array}

>> first.glm glm(y-\operatorname{glm}(\mathrm{y} \sim Year ++ month, poisson );) ; summary(first.glm ))

Call:

glm(\operatorname{glm}( formula =y=\mathrm{y} \sim Year ++ month, family == poisson ))

\begin{tabular}{lrlll} Coefficients: & & & & \ (Intercept) & Estimate & Std. Error & \multicolumn{1}{l}{ z value } & Pr(>z)\operatorname{Pr}(>|z|) \ Year1971 & 0.81969-0.81969 & 0.098960.09896 & 38.60038.600 & <2e16<2 e-16 \ Year1972 & 0.28794-0.28794 & 0.082670.08267 & 3.483-3.483 & 0.0004960.000496 \ month2 & 0.34484-0.34484 & 0.141760.14176 & 2.433-2.433 & 0.0149940.014994 \ month3 & 0.11466-0.11466 & 0.132960.13296 & 0.862-0.862 & 0.3884590.388459 \ month4 & 0.39304-0.39304 & 0.143800.14380 & 2.733-2.733 & 0.0062710.006271 \ month5 & 0.31015-0.31015 & 0.140340.14034 & 2.210-2.210 & 0.0271080.027108 \ month6 & 0.47000-0.47000 & 0.147190.14719 & 3.193-3.193 & 0.0014080.001408 \ month7 & 0.23361-0.23361 & 0.137320.13732 & 1.701-1.701 & 0.0888890.088889 \ month8 & 0.35667-0.35667 & 0.142260.14226 & 2.507-2.507 & 0.0121680.012168 \ month9 & 0.14310-0.14310 & 0.133970.13397 & 1.068-1.068 & 0.2854440.285444 \ month10 & 0.101670.10167 & 0.139030.13903 & 0.7310.731 & 0.4646280.464628 \ month11 & 0.132760.13276 & 0.137880.13788 & 0.9630.963 & 0.3356390.335639 \ month12 & 0.182520.18252 & 0.136070.13607 & 1.3411.341 & 0.1798120.179812 \end{tabular}

Signif. codes: 0 (, 0.0010.001 (, 0.010.01 (, 0.050.05 '.

(Dispersion parameter for poisson family taken to be 1 )

 Null deviance: 101.143 on 32 degrees of freedom  Residual deviance: 27.273 on 19 degrees of freedom \begin{array}{rlll}\text { Null deviance: } & 101.143 & \text { on } 32 \text { degrees of freedom } \\ \text { Residual deviance: } & 27.273 & \text { on } 19 \text { degrees of freedom }\end{array}

Number of Fisher Scoring iterations: 3

Typos? Please submit corrections to this page on GitHub.