Created
January 2, 2014 02:45
-
-
Save mollietaylor/8214220 to your computer and use it in GitHub Desktop.
Compare Regression Results to a Specific Factor Level in R
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
str(ChickWeight$Diet) | |
table(ChickWeight$Diet) | |
ols <- lm(weight ~ Time + Diet, | |
data = ChickWeight) | |
summary(ols) | |
ChickWeight$Diet <- relevel(ChickWeight$Diet, | |
ref = 4) | |
olsRelevel <- lm(weight ~ Time + Diet, | |
data = ChickWeight) | |
summary(olsRelevel) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment