# NOT RUN {
# feel free to ignore the following line<U+2014>it allows {broom} to supply
# examples without requiring the model-supplying package to be installed.
if (requireNamespace("MASS", quietly = TRUE)) {
# load libraries for models and data
library(MASS)
# fit model
fit <- polr(Sat ~ Infl + Type + Cont, weights = Freq, data = housing)
# summarize model fit with tidiers
tidy(fit, exponentiate = TRUE, conf.int = TRUE)
glance(fit)
augment(fit, type.predict = "class")
fit2 <- polr(factor(gear) ~ am + mpg + qsec, data = mtcars)
tidy(fit, p.values = TRUE)
}
# }
Run the code above in your browser using DataLab