# NOT RUN {
library(modelbased)
# }
# NOT RUN {
if (require("rstanarm")) {
model <- stan_gamm4(Sepal.Width ~ s(Petal.Length), data = iris, refresh = 0)
estimate_smooth(model)
model <- stan_glm(Sepal.Width ~ poly(Petal.Length, 2), data = iris)
estimate_smooth(model)
model <- stan_gamm4(Sepal.Width ~ Species + s(Petal.Length), data = iris)
estimate_smooth(model)
model <- stan_glm(Sepal.Width ~ Species * poly(Petal.Length, 2), data = iris)
estimate_smooth(model)
estimate_smooth(model, levels = "Species")
}
# }
Run the code above in your browser using DataLab