0% found this document useful (0 votes)
186 views4 pages

VGLM Cbind Family Data : G G G G

The document presents the results of fitting multinomial logistic regression and ordinal logistic regression models to data on beliefs in heaven. It estimates the prediction equation for the log odds of believing in heaven versus not believing. It finds that for white females, the estimated probability of believing in heaven is 0.8709. It also explains how the intercept estimates indicate the ordering of the category probabilities for different subgroups. A likelihood ratio test shows that opinion is not independent of gender when controlling for race, as the test statistic of 46.95 is greater than the critical value of 5.99.

Uploaded by

Janette Mendoza
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
186 views4 pages

VGLM Cbind Family Data : G G G G

The document presents the results of fitting multinomial logistic regression and ordinal logistic regression models to data on beliefs in heaven. It estimates the prediction equation for the log odds of believing in heaven versus not believing. It finds that for white females, the estimated probability of believing in heaven is 0.8709. It also explains how the intercept estimates indicate the ordering of the category probabilities for different subgroups. A likelihood ratio test shows that opinion is not independent of gender when controlling for race, as the test statistic of 46.95 is greater than the critical value of 5.99.

Uploaded by

Janette Mendoza
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

4.

For the table below, let Y = belief in existence of heaven, X1= gender (1 = females, 0 =
males), and X2 = race (1 = blacks, 0 = whites).

model1 <- vglm(cbind(Y,U,N)~race+gender, family=multinomial,


data=belief)
summary(model1)
##
## Call:
## vglm(formula = cbind(Y, U, N) ~ race + gender, family =
multinomial,
## data = belief)
##
## Coefficients:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept):1 1.7943 0.1675 10.712 < 2e-16 ***
## (Intercept):2 1.5309 0.1717 8.918 < 2e-16 ***
## race:1 0.6727 0.4114 1.635 0.102
## race:2 -0.4757 0.4533 -1.049 0.294
## gender:1 1.0339 0.2587 3.997 6.41e-05 ***
## gender:2 0.3087 0.2697 1.145 0.252
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Names of linear predictors: log(mu[,1]/mu[,3]), log(mu[,2]/mu[,3])
##
## Residual deviance: 6.0748 on 2 degrees of freedom
##
## Log-likelihood: -21.7917 on 2 degrees of freedom
##
## Number of Fisher scoring iterations: 4
##
## No Hauck-Donner effect found in any of the estimates

a. Find the prediction equation for log(𝜋1⁄𝜋2 ).


π^ 1 π^ 1 π2
The estimated prediction equation for log ( ) ( ) ( )
π^ 2
=log
π^ 3
−log
π3
¿ ( 1.7943+1.0339 x 1+0.6727 x 2 )− ( 1.5309+0.3087 x1 −0.4757 x 2)
¿ 0.2634+ 0.7252 x 1−1.1484 x 2

b. Using the yes and no response categories, interpret the conditional gender effect
using a 95% confidence interval for an odds ratio.
The parameter β G1 is the log of the conditional odds ratio for gender and response,
so a 95% Wald confidence interval for β G1 is ^β G1 ± 1.96 [s.e.( ^β G1 ¿] = 1.0339 ± 1.96
× 0.2587 = (0.5268, 1.541), which will give a 95% CI for the odds of (1.6935,
4.6693). Since the confidence interval contain 1, there is no evidence of a
conditional effect of gender, controlling for race.
c. Find 𝜋̂𝑖 = 𝑃(𝑌 = 1) for white females.
e1.7943+1.0339+0.6727
^π 1 ( x 1=1 , x 2=0 ) =
1+ e1.7943+1.0339+0.6727 + e1.5309+0.3087−0.4757
¿ 0.8709

d. Without calculating estimated probabilities, explain why the intercept estimates


indicate that for white males, 𝜋̂1 > 𝜋̂2 > 𝜋̂3. Use the intercept and gender
estimates to show that the same ordering applies for black females.
For white males, x 1=0 , x 2=0
π^ 1
log ( )
π^ 2
= α^ 1 = 1.7943 > 0, ^π 1 > π^ 3

π^ 2
log ( )
π^ 2
= α^ 1=¿ 1.5309 > 0, ^π 2 > π^ 3

For black females, x 1=1 , x 2=1


π^ 1
log ( )
π^ 2
G
= α^ 1 + β 1 =¿ = 2.8282 > 0, ^π 1 > π^ 3

π^ 2
log ( )
π^ 2
G
= α^ 1 + β 1 =¿ 1.8396 > 0, ^π 2 > π^ 3

e. Without calculating estimated probabilities, explain why the estimates in the


gender row indicate that 𝜋̂1 is higher for females than for males, for each race.
1
^π 1 ( x 2 , x 3 ) = G E
α^ + β x + β x
G E

1+ e
2 2 2 2 3
+e α^ + β x + β x
3 3 2 3 3

Except for the whites, the β parameters for all estimates are positive, which means
that ^π 1 is maximized for x 2=1, which is for females.

f. For this fit, G2 = 0.69. Explain why residual df = 2. Deleting the gender effect,
G2 = 47.64. Conduct a likelihood-ratio test of whether opinion is independent of
gender, given race. Interpret.
There are 4 gender-race combinations and 3 parameters in the model, so df = 2(4)
− 2(3) = 2. The likelihood-ratio statistic for testing the hypothesis that opinion is
independent of gender given race, is G2 = 47.64 – 0.69 = 46.95. When compared
to a χ2 distribution with 2 df which is 5.99, 46.95 > 5.99. Therefore, we reject Ho.
We can say that opinion is independent of gender, given race.

5. For the data on our lecture regarding Happiness and the number of traumatic events, fit
and interpret effects for a

(a) adjacent categories logit model


fit.adj <- vglm(happy ~ race + trauma, family=acat(link="loge",parallel=T),
data=happiness)
## Call:
##
## vglm(formula = happy ~ race + trauma, family = acat(link = "loge",
## parallel = T), data = happiness)
##
## Coefficients:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept):1 0.4961 0.3180 1.560 0.1188
## (Intercept):2 -3.0275 0.5739 -5.275 1.33e-07 ***
## race 1.8423 0.6419 2.870 0.0041 **
## trauma 0.3570 0.1640 2.177 0.0294 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Names of linear predictors: loglink(P[Y=2]/P[Y=1]),
loglink(P[Y=3]/P[Y=2])
##
## Residual deviance: 148.1996 on 190 degrees of freedom
##
## Log-likelihood: -74.0998 on 190 degrees of freedom
##
## Number of Fisher scoring iterations: 5
##
## No Hauck-Donner effect found in any of the estimates

Interpretations:
The adjacent-categories logit model of proportional odds form has ML fit
P
^ (Y = j)
log
[ ^
P(Y = j+1) ]= α^ −0.357 x 1−1.842 3 x 2.
j

Conditional on the number of traumatic events, the estimated odds of being very happy
instead of pretty happy, and the estimated odds of being pretty happy instead of not too
happy, are e 1.8423= 6.311 times as high for whites as for blacks. By contrast, the
cumulative logit model ha ^β 1=−0.406d and ^β 1=−0.2036. We can see that its estimates
are somewhat larger in magnitude.

and (b) continuation-ratio logit model.


fit.cratio <- vglm(happy ~ race + trauma,family=cratio(reverse=TRUE,
parallel=TRUE), data=happiness)
summary(fit.cratio)
##
## Call:
## vglm(formula = happy ~ race + trauma, family = cratio(reverse = TRUE,
## parallel = TRUE), data = happiness)
##
## Coefficients:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept):1 -0.4553 0.3297 -1.381 0.16735
## (Intercept):2 3.3411 0.5631 5.934 2.97e-09 ***
## race -2.0256 0.6768 -2.993 0.00277 **
## trauma -0.3850 0.1737 -2.217 0.02662 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Names of linear predictors: logitlink(P[Y<2|Y<=2]), logitlink(P[Y<3|
Y<=3])
##
## Residual deviance: 148.1571 on 190 degrees of freedom
##
## Log-likelihood: -74.0786 on 190 degrees of freedom
##
## Number of Fisher scoring iterations: 5
##
## No Hauck-Donner effect found in any of the estimates

Interpretation:
The ML estimates are ^β 1=−0.4552(SE = 0.3297) and ^β 2=3.3411(SE = 0.5631). In each
case, the less desirable outcome is more likely as happiness scale decreases as the
traumatic events score increases. Given the traumatic events score, for whites, the
estimated odds of reporting being very happy were e-0.3850 = 0.68 times the estimated odds
for blacks.

You might also like