这是一篇来自澳洲的关于现代应用统计学的统计代写
Permitted Materials
Instructions to Students
Question 1 (7 marks)
Let X1, ··· , Xn be independent samples from a Normal distribution N(1, ⌧1 ) with pdf
r2⌧⇡ e− ⌧(x−1)22.
(a) What is the log-likelihood for this example?
(b) What is the Fisher information for this example?
(c) Find the MLE of ⌧ and its asymptotic distribution.
Question 2 (9 marks)
The dvisits data in the faraway package comes from the Australian Health Survey of 1977–78 and consists of 5190 observations on single adults, where young and old have been oversampled.
Here, we consider doctorco as a response and sex, age, income, levyplus, freepoor,freerepa, illness, actdays as predictor variables. The description of each variable is as follows.
Examine the R code and output below, and then answer the questions that follow.
> library(faraway)
> data(dvisits)
> modelA <- glm(doctorco ~ sex + age + income + levyplus + freepoor
+ + freerepa + illness + actdays,
+ family=quasipoisson, data=dvisits)
> summary(modelA)
Call:
glm(formula = doctorco ~ sex + age + income + levyplus + freepoor +
freerepa + illness + actdays, family = quasipoisson, data = dvisits)
Deviance Residuals:
Min 1Q Median 3Q Max
-2.7696 -0.6865 -0.5773 -0.4906 5.5745
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) -2.055666 0.115808 -17.751 <2e-16 ***
sex 0.163442 0.064454 2.536 0.0112 *
age 0.296311 0.186496 1.589 0.1122
income -0.195493 0.098511 -1.984 0.0473 *
levyplus 0.143743 0.082153 1.750 0.0802 .
freepoor -0.404611 0.206938 -1.955 0.0506 .
freerepa 0.118603 0.105656 1.123 0.2617
illness 0.211644 0.019482 10.864 <2e-16 ***
actdays 0.133576 0.005264 25.377 <2e-16 ***
—
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
(Dispersion parameter for quasipoisson family taken to be 1.328231)
Null deviance: 5634.8 on 5189 degrees of freedom
Residual deviance: 4394.3 on 5181 degrees of freedom
AIC: NA
Number of Fisher Scoring iterations: 6
> modelB <- glm(doctorco ~ sex + age + income,
+ family=quasipoisson, data=dvisits)
> anova(modelB, modelA, test=”F”)
Analysis of Deviance Table
Model 1: doctorco ~ sex + age + income
Model 2: doctorco ~ sex + age + income + levyplus + freepoor + freerepa +
illness + actdays
Resid. Df Resid. Dev Df Deviance F Pr(>F)
1 5186 5434.9
2 5181 4394.3 5 1040.5 156.68 < 2.2e-16 ***
—
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
>
> modelC <- glm(doctorco ~ sex + age + income + levyplus + freepoor
+ + freerepa + illness + actdays,
+ family=poisson, data=dvisits)
> modelD <- glm(doctorco ~ sex + age + income,
+ family=poisson, data=dvisits)
> summary(modelD)
Call:
glm(formula = doctorco ~ sex + age + income, family = poisson,
data = dvisits)
Deviance Residuals:
Min 1Q Median 3Q Max
-1.0350 -0.8031 -0.6749 -0.6069 6.3695
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) -1.71473 0.09118 -18.805 < 2e-16 ***
sex 0.21565 0.05589 3.859 0.000114 ***
age 1.23798 0.13013 9.514 < 2e-16 ***
income -0.27726 0.07969 -3.479 0.000502 ***
—
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
(Dispersion parameter for poisson family taken to be 1)