# define continuation dichotomies for level of education
cont.dichots <- continuationLogits(c("l.t.highschool",
"highschool",
"college",
"graduate"))
# fit a nested model for the GSS data examining education degree in relation to parent & year
m <- nestedLogit(degree ~ parentdeg + year,
cont.dichots,
data=GSS)
# Anova and anova tests
car::Anova(m) # type-II (partial) tests
anova(update(m, . ~ . - year), m) # model comparison
# Wald test
car::linearHypothesis(m, c("parentdeghighschool", "parentdegcollege",
"parentdeggraduate"))
# log-liklihood, AIC, and BIC
logLik(m)
AIC(m)
BIC(m)
Run the code above in your browser using DataLab