Created
March 31, 2012 04:50
-
-
Save andrewheiss/2259416 to your computer and use it in GitHub Desktop.
Ordinal logistic regression
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(rms) # This is the library that does all the orginal logistic regression magic | |
EMC <- latest.EMC.2011.clean.v2 # Make a copy of the data frame with a shorter name | |
model <- lrm(lifeoverall ~ fire + med + streetrepair + streetclean, data=EMC) # Fit an ordinal logistic regression model | |
model # General model summary | |
exp(coefficients(model)) # Factor change coefficients? | |
anova(model) # Wald statistics | |
Predict(model, fire=0, med=0, streetrepair=0, streetclean=0) # Predict yhat based on given values |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment