简体   繁体   中英

Increase Effect of Error Term in Arima Forecast

My forecast amplitude is much smaller than the real data. Is there a parameter I can use in auto.arima to increase the amplitude on the forecast?

I've been reading Rob Hyndman's forecasting textbook. It seems to suggest that increasing the effect of the error term will increase the amplitude of the variation in the forecast without changing the pattern.

I've tried using Arima and changing the p,q, and d values, but had no luck. Also I've tried setting Allowmean=FALSE, which seems to bring the forecast down to the x axis, instead of being centered around the average of the data. Multiplying the forecast by a scalar does increase the amplitude. I think I would prefer a solution that is more sensitive to the actual data though. I'm very new to auto.arima and forecasting so any tips are greatly appreciated.

I have code and sample data below.

Code:

tsTrain <-tsTiTo[1:60]
tsTest <- tsTiTo[61:100]

LagXreg<-c(NA,ds[1:99,]$CustCount)

##Lagged Predictors
xregTrain2 <- LagXreg[1:60]
xregTest2 <- LagXreg[61:100]


Arima.fit2 <- auto.arima(tsTrain, xreg = xregTrain2,stepwise=FALSE,        approximation=FALSE, allowmean = FALSE)

Acast2<-forecast(Arima.fit2, h=40, xreg = xregTest2)

##Other Attempts
Arima.fit8 <- auto.arima(tsTrain, xreg = xregTrain2,stepwise=FALSE, approximation=FALSE,allowmean = FALSE)
Arima.fit9 <- Arima(tsTrain, xreg = xregTrain2,order=c(1,0,10))

Data:

dput(ds$CustCount[1:100])

c(3, 3, 1, 4, 1, 3, 2, 3, 2, 4, 1, 1, 5, 6, 8, 5, 2, 7, 7, 3, 2, 2, 2, 1, 3, 2, 3, 1, 1, 2, 1, 1, 3, 2, 2, 2, 3, 7, 5, 6, 8, 7, 3, 5, 6, 6, 8, 4, 2, 1, 2, 1, NA, NA, 4, 2, 2, 4, 11, 2, 8, 1, 4, 7, 11, 5, 3, 10, 7, 1, 1, NA, 2, NA, NA, 2, NA, NA, 1, 2, 3, 5, 9, 5, 9, 6, 6, 1, 5, 3, 7, 5, 8, 3, 2, 6, 3, 2, 3, 1 )

dput(tsTiTo[1:100])

c(45, 34, 11, 79, 102, 45, 21, 45, 104, 20, 2, 207, 45, 2, 3, 153, 8, 2, 173, 11, 207, 79, 45, 153, 192, 173, 130, 4, 173, 174, 173, 130, 79, 154, 4, 104, 192, 153, 192, 104, 28, 173, 52, 45, 11, 29, 22, 81, 7, 79, 193, 104, 1, 1, 46, 130, 45, 154, 153, 7, 174, 21, 193, 45, 79, 173, 45, 153, 45, 173, 2, 1, 2, 1, 1, 8, 1, 1, 79, 45, 79, 173, 45, 2, 173, 130, 104, 19, 4, 34, 2, 192, 42, 41, 31, 39, 11, 79, 4, 79)

A couple of things, I did a plot and the X doesn't seem to correlate with Y. Are you sure that variable describes Y? Y vs X标准化散点图

I looked at the first 60 observations. The variance begins to increase at period 13 and forward. You would need to adjust for that. I applied the Tsay test to identify this and you can read more about it here. You end up using Weighted Least Squares to weight the data. https://www.researchgate.net/publication/227763540_Outliers_Level_Shifts_and_Variance_Changes_in_Time_Series

Your time series has two level shifts that ARIMA won't be able to adequately handle. Read more on level shifts here http://dallasfed.org/assets/documents/research/papers/1991/wp9109.pdf

The weight is 1.9 for periods to 1 to 12 and then 1.0 for period 13 to 60.

Y(T) = 42.412
+[X1(T)][(+ 82.5882)] :LEVEL SHIFT 19 +[X2(T)][(- 60.5556)] :LEVEL SHIFT 43 +[X3(T)][(+ 164.59 )] :PULSE 12 + + [A(T)]

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM