Closed robjhyndman closed 8 years ago
library(fpp) Cityp <- pmax(fuel$City - 25, 0) x <- 15:50 z <- pmax(x - 25, 0) fit3 <- lm(Carbon ~ City + I(City^2) + I(City^3) + I(Cityp^3), data = fuel) fcast3 <- forecast(fit3, newdata = data.frame(City = x, Cityp = z))
Sorry. Wrong repo.