找不到对象“趋势”

时间:2019-10-02 05:37:17

标签: r forecast

当我使用具有tslm的多项式趋势运行模型时,出现以下错误:

  

结构错误(x,class = unique(c(“ AsIs”,oldClass(x)))):对象   找不到“趋势”

这是我的R代码:

mymodel <- tslm(activations ~ trend*season + I(trend^2) + I(sqrt(sold)) + I(sqrt(sold1)) + I(sqrt(sold2)), my_df_ts_all) #final model
my_fc <- forecast(mymodel, h = 12, newdata = tvs_data_test[1:12, ])
my_fc

如果我删除I(trend ^ 2),它运行正常。有什么想法吗?

0 个答案:

没有答案