Closed dtkaplan closed 8 years ago
For instance, mod <- lm(outcome == "Alive" ~ poly(age, 3) + smoker, data = Whickham) or for splines::ns().
mod <- lm(outcome == "Alive" ~ poly(age, 3) + smoker, data = Whickham)
Fixed. The trick was to get the data from the data = argument in the call to lm() or glm(), just as was already being done with rpart(), etc.
data =
lm()
glm()
rpart()
For instance,
mod <- lm(outcome == "Alive" ~ poly(age, 3) + smoker, data = Whickham)
or for splines::ns().