Vous êtes sur la page 1sur 2

2016.10.

20 Math 706 HW 7 (update) KEY

These relate number of skin cancer cases (“Cases”) in two towns (coded 0/1). The data are grouped into 6 age
groups (coded 1-6, which may be treated as a numerical variable). The population size at each level is “Pop”
Cases Town AgeGp Pop
1 0 1 172675
16 0 2 123065
30 0 3 96216
71 0 4 92051
102 0 5 72159
130 0 6 54722
4 1 1 181343
38 1 2 146207
119 1 3 121374
221 1 4 111353
259 1 5 83004
310 1 6 55932
1) Make a plot of cases per 100,000 population, (Cases*100000)/Pop. Use a different color and/or symbol for
each town (see next page)

2) Fill in the following table giving the above rates by city and age group
city/age 1 2 3 4 5 6
0 0.58 13 31.18 77.13 141.36 237.56
1 2.21 25.99 98.04 198.47 312.03 554.24

3) Run a Poisson generalized regression model with cases as the dependent variable, and Town, AgeGp as the
independent variables, and log(Pop) as an “offset” variable. Assume all variables are numeric

Residual deviance = 96.71; DF = 9 Also compute Pearson chi-square: 78.30(same df)

4) Run model as above, but adding a quadratic term in AgeGp. Give z-statistic for testing H 0 that the coefficient
of AgeGp^2 is 0

Residual deviance = 24.34 DF = 8 P-value = 0.002; z = -7.946; P-value = 1.92 × 10-15

5) Add an interaction term to the model in (c). Give the residual deviance plus DF. Give z-statistic for testing H 0
that the coefficient of AgeGp*Town is 0 (here's the model statement)
glm(Cases~Town+AgeGp+I(AgeGp^2)+I(AgeGp*Town),offset=log(Pop),family=Poisson)

Residual deviance = 23.40 DF = 7 P-value = 0.00145; z = -0.966; P-value = 0.334

6) Use the anova command to compute a chi-square statistic to test the hypothesis that the model in (3) is not
improved by both the quadratic and interaction terms in (5).

Chi-square = 73.308, DF = 2; P-value = < 2.2 × 10-16

7) Using the full model in (5) compute the predicted number of cases for:
(In each case use Pop=100000)

Town = 0, AgeGp = 4, Pred Cases = 77.09; Town = 1, AgeGp = 5, Pred Cases = 360.26;

Vous aimerez peut-être aussi