您如何使用 nnetar 处理趋势?对于这个例子,最好的预测方法是什么:
library(timeDate)
library(forecast)
library(lattice)
library(ggplot2)
library(caret)
set.seed(1234)
T <- seq(0,100,length=100)
Y <- 10 + 2*T + rnorm(100)
fit <- nnetar(Y)
plot(forecast(fit,h=30))
points(1:length(Y),fitted(fit),type="l",col='red')
谢谢&亲切的问候