ropensci / auunconf

repository for the Australian rOpenSci unconference 2016!
18 stars 4 forks source link

Another tslm problem #35

Closed robjhyndman closed 8 years ago

robjhyndman commented 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))
robjhyndman commented 8 years ago

Sorry. Wrong repo.