我使ARIMA模型适合季节性。 在以下链接中查找数据。 https://docs.google.com/spreadsheets/d/1cQvoI9kuF4wNEDBcJjDz5x60wgLSNjjBpECGJ0TnJYo/edit?usp=sharing
数据已被短路并记录
y=(data[1:312])
lny=log(y)
arima.414.model = arima(y,order = c(4, 1, 4),include.mean = FALSE,xreg = TrSeas,optim.control = list(maxit = 20000),method="ML")
TRSeas是各个季节的矩阵模型。
#Lets try our ARIMA(4,1,4) model with seasons
S1 = rep(c(1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,0 ), T/s)
S2 = rep(c(0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), T/s)
S3 = rep(c(0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0), T/s)
S4 = rep(c(0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0), T/s)
S5 = rep(c(0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0), T/s)
S6 = rep(c(0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0), T/s)
S7 = rep(c(0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0), T/s)
S8 = rep(c(0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0), T/s)
S9 = rep(c(0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0), T/s)
S10 = rep(c(0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0), T/s)
S11 = rep(c(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0), T/s)
TrSeas = model.matrix(~ t+S1+S2+S3+S4+S5+S6+S7+S8+S9+S10+S11)
但是,当我运行Arima模型时,会收到以下错误消息。
optim(init [mask],armafn,method = optim.method,hessian = TRUE,中的错误: optim提供的非限定值
我在做什么错?