-
-
Save fpcMotif/45c99ce0b3a25e439b73d91d90c5eb39 to your computer and use it in GitHub Desktop.
Compare Regression Results to a Specific Factor Level in R
This file contains hidden or 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