inst/snippet/cholesterol-comb.R

model1 <- lm(response~trt,cholesterol)
cholesterol$x1 <- cholesterol$trt == "drugD"
cholesterol$x2 <- cholesterol$trt == "drugE"
model2 <- lm(response~ 1 + x1 + x2 , cholesterol)
anova(model1,model2)

Try the fastR package in your browser

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

fastR documentation built on May 1, 2019, 11:18 p.m.