我尝试使用 ARIMA 来预测时间序列。
ts <- c(283.678,278.158,273.345,269.773,265.863,265.673,262.977,272.557,267.628,270.106,276.346,292.736,310.649,320.550,332.954,350.313,361.524,367.406,369.442,372.043,365.030,375.210,371.006,364.991,359.975,365.849,373.687,368.167,368.281,366.982,365.752,366.844,356.526,356.667,354.937,352.461,353.742,357.139,362.981,384.613,405.519,400.974,388.696,374.536,348.781,324.664,307.051,297.943)
ar <- arima(ts)
ps <- predict(ar, 48)
plot(c(ts, ps$pred), type="l")
为什么这段代码预测的是纯线而不是一些类似的曲线?