做时间序列时,
m1<-auto.arima(dd)
predict(m1, n.ahead =2)
报错:
Error in array(x, c(length(x), 1L), if (!is.null(names(x))) list(names(x), :
'data' must be of a vector type, was 'NULL'
解决方案:
不用predict函数 ,改用forecast(m1, h=2)
做时间序列时,
m1<-auto.arima(dd)
predict(m1, n.ahead =2)
报错:
Error in array(x, c(length(x), 1L), if (!is.null(names(x))) list(names(x), :
'data' must be of a vector type, was 'NULL'
解决方案:
不用predict函数 ,改用forecast(m1, h=2)