Stat 665 (Spring 2011)
Kaizar
Solutions 6
Exercises
40 points total
1. (8 points) Problem 4.8
(a) From the R output:
Coefficients:
Estimate Std. Error z value Pr(>z)
(Intercept) 3.6947
0.8802 4.198 2.70e05 ***
wtkg
1.8151
0.3767
4.819 1.45e06 ***
The prediction equation is:
logit
(ˆ
π
) =

3
.
69 + 1
.
82
X
where X is the weight of the crab in kg.
(b) Substituting X=1.2, 2.44, and 5.2 into the above prediction equation, and then taking
the inverse of the logit (using the predict function in R) gives probabilities of 0.180, 0.676,
and 0.997, respectively.
(c) When ˆ
π
= 0,
logit
(ˆ
π
) = 0, which occurs when 1
.
82
X
= 3
.
69, or when the weight =
3.69/1.82 = 2.04kg.
(d)
•
The linear approximation of the slope in probability is
ˆ
β
ˆ
π
(1

ˆ
π
) = 1
.
8151
*
0
.
25 =
0
.
454. That is, for every increase in one kg weight (near 2.04kg), the probability of
having a satellite increases by about 0.45.
•
To convert to an increase in 0.1kg, I need to convert the meaning of
β
. If
β
is the
increase in log odds for every one kg increase in weight, then 0
.
1
β
is the increase in log
odds for every 0.1 kg increase in weight. Thus, the estimated increase in probability
of having a satellite for every increase in 0.1 kg is 0.1*0.454 = 0.045.
•
Similarly, the extimated increase in probability of having a satellite for every increase
in one SD of weight is 0.58*0.454= 0.263.
(e) A 95% CI for
β
is
ˆ
β
±
1
.
96
*
0
.
38: (1.076834, 2.553455). Exponentiating gives a 95% CI
for the increase in odds of a satellite for every one kg increase in weight: (2.94 12.85).
(f) From the output above, we can see that the Wald pvalue is 1.45e06. Thus, I reject the
null hypothesis that the coefficient on weight is zero. That is, I conclude that weight does
have a significant association with the odds of having a satellite.
To find the LRT statistic, we subtract the residual and null deviances:
Null deviance: 225.76 on 172 degrees of freedom
Residual deviance: 195.74 on 171 degrees of freedom
1
This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
LRT = 225.76  195.74 = 30.02.
I compare this to a
χ
2
1
distribution to get the pvalue = 4.273103e08. Thus, I reject the
null hypothesis that the coefficient on weight is zero. That is, I conclude that weight does
have a significant association with the odds of having a satellite.
2. (6 points) Exercise 4.9, parts ad
(a) Output from R:
Estimate Std. Error z value Pr(>z)
(Intercept)
1.0986
0.6667
1.648
0.0994 .
colorfactor2 0.1226
0.7053 0.174
0.8620
colorfactor3 0.7309
0.7338 0.996
0.3192
colorfactor4 1.8608
0.8087 2.301
0.0214 *
Looking at Table 3.2, I can interpret the meanings of each of the colors: 1=light medium
(LM), 2=medium (M), 3=dark medium (DM), 4=dark (D).
The prediction equation is:
logit
(ˆ
π
) = 1
.
0986

0
.
1226
M

0
.
7309
DM

1
.
8608
D
where for each color indicator, the covariate =1 if the crab is that color, and 0 otherwise.
I interpret the first indicator variable “colorfactor2” = 0.1226 to mean that the log
odds of a satellite are 0.1226 smaller for crabs with medium color than crabs with light
medium color. That is, the log odds ratio of satellite for medium and light medium crabs
is 0.1226.
(b) To test whether color has any effect, we need to consider that all of the coefficients for
all the colors = 0. Thus, we can not use a Wald test, but instead must rely on a LRT:
Null deviance: 225.76 on 172 degrees of freedom
Residual deviance: 212.06 on 169 degrees of freedom
LRT = 225.76  212.06 = 13.70.
This is the end of the preview.
Sign up
to
access the rest of the document.
 Spring '10
 Staff
 Leverage, Null hypothesis, Logit

Click to edit the document details