This R Notebook analyzes data on beliefs in afterlife from a survey. It fits several multinomial logistic regression models and compares them. The full model with both gender and race as predictors fits the data better than reduced models with only one of the predictors based on likelihood ratio tests. The estimated response probabilities from the full model are presented.
This R Notebook analyzes data on beliefs in afterlife from a survey. It fits several multinomial logistic regression models and compares them. The full model with both gender and race as predictors fits the data better than reduced models with only one of the predictors based on likelihood ratio tests. The estimated response probabilities from the full model are presented.
This R Notebook analyzes data on beliefs in afterlife from a survey. It fits several multinomial logistic regression models and compares them. The full model with both gender and race as predictors fits the data better than reduced models with only one of the predictors based on likelihood ratio tests. The estimated response probabilities from the full model are presented.
## Afterlife.race Afterlife.gender yes undecided no
## 1 white female 0.7546 0.0996 0.1459 ## 2 white male 0.6783 0.1224 0.1993 ## 3 black female 0.7074 0.1002 0.1925 ## 4 black male 0.6222 0.1206 0.2573
#display the data frame with kable
kable(data.frame(Afterlife$race, Afterlife$gender,round(fitted(fit),4))) Afterlife.gen Afterlife.race der yes undecided no white female 0.7546 0.0996 0.1459 white male 0.6783 0.1224 0.1993 black female 0.7074 0.1002 0.1925 black male 0.6222 0.1206 0.2573