m1 <- lm(mpg ~ qsec * hp, data = mtcars)
m2 <- lm(mpg ~ am, data = mtcars)
modelCompare(m1, m2)
## cleanup
rm(m1, m2)
if (FALSE) {
m3 <- lm(mpg ~ 1, data = mtcars)
m4 <- lm(mpg ~ 0, data = mtcars)
modelCompare(m3, m4)
## cleanup
rm(m3, m4)
}
Run the code above in your browser using DataLab