data(airquality, package = "datasets")
test <- 1:10
mid <- interpret(Ozone ~ .^2, airquality[-test, ], lambda = 1, link = "log")
# Predict on new data
predict(mid, airquality[test, ])
# Get predictions on the link scale
predict(mid, airquality[test, ], type = "link")
# Get the contributions of specific terms
predict(mid, airquality[test, ], terms = c("Temp", "Wind"), type = "terms")
Run the code above in your browser using DataLab