Created

Embed URL

HTTPS clone URL

SSH clone URL

You can clone with HTTPS or SSH.

Download Gist

Compare Regression Results to a Specific Factor Level in R

View factorDummies.R
1 2 3 4 5 6 7 8 9 10 11 12 13
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
Something went wrong with that request. Please try again.