inst/snippet/airp-modcomp02.R

# build a variable that makes the model easier to describe 
AirP <- AirP %>% mutate(x  = (loc == 2) + 0.5 * (loc == 3))
model3 <- lm(pollution ~ 1 + x, data = AirP)
anova(model3, model)

Try the fastR2 package in your browser

Any scripts or data that you put into this service are public.

fastR2 documentation built on Nov. 9, 2023, 9:06 a.m.