Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- library(forecast)
- retail <- read.csv("https://robjhyndman.com/data/ausretail.csv",header=FALSE)
- retail <- ts(retail[,-1],f=12,s=1982+3/12)
- ns <- ncol(retail)
- h <- 24
- fcast <- matrix(NA,nrow=h,ncol=ns)
- for(i in 1:ns)
- fcast[,i] <- forecast(retail[,i],h=h)$mean
- write(t(fcast),file="retailfcasts.csv",sep=",",ncol=ncol(fcast))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement