data(PhDArticles)
order <- c("Gender", "Kids", "Married", "Articles")
phd.mod1 <- stages_hc(indep(PhDArticles, order))
phd.mod2 <- stages_hc(full(PhDArticles, order))
## compare two nested models
lr_test(phd.mod1, phd.mod2)
## compare a single model vs the independence model
lr_test(phd.mod1)
Run the code above in your browser using DataLab