r - Forecasting a tslm model with seasonal and cubic components -
i'm having issues forecasting model of following form.
y1<-tslm(data_ts~ season+t+i(t^2)+i(t^3)+0)
it fits data well, run problem when attempting this:
forecast(y1,h=72)
this error gives me.
"error in model.frame.default(terms, newdata, na.action = na.action, xlev = object$xlevels) : variable lengths differ (found 't') in addition: warning message: 'newdata' had 72 rows variables found have 1000 rows"
as far can tell, has using tslm , having cubic function in it. if use "tslm(data_ds~season+trend)" works out fine, need model mentioned earlier. how can forecast model?
thank in advance can give , apologize if foolish question,
johnson
Comments
Post a Comment