Auto.arima () does not produce white noise. How else do I need to collect simulation data

Here is a graph of the source data (after completing the log conversion). magazine schedule

Obviously, there is a linear trend as well as a seasonal trend. I can solve both of them by taking the first and twelfth (seasonal) differences: diff (diff (data), 12). After that, here is a graph of the data received

first_seasonal_diff plot.

This data does not look great. While the average value of the constant, we see the effect of a funnel when time progresses. Here the ACF / PACF: .ACF Pacf

Any suggestions for possible bouts. I used the auto.arima () function, which proposed the ARIMA (2,0,2) xARIMA (1,0,2) (12) model. However, as soon as I took the rest from the fit, it was clear that they still had some kind of structure. Here is a graph of the residues from the fit as well as the ACF / PACF residues. residualPlot acfResids pacfResids

There does not seem to be a seasonal pattern for lag spikes in ACF / PACF residues. However, this was still not fixed in the previous steps. What are you suggesting me to do? How can I start building a better model that has the best model diagnostics (which at the moment is simply better than ACF and PACF)?

Here is my simplified code:

    library(TSA)
    library(forecast)
    beer <- read.csv('beer.csv', header = TRUE)
    beer <- ts(beer$Production, start = c(1956, 1), frequency = 12)

    # transform data
    boxcox <- BoxCox.ar(beer) # 0 in confidence interval
    beer.log <- log(beer)
    firstDifference <- diff(diff(beer.log), 12) # get rid of linear and 
    # seasonal trend
    acf(firstDifference)
    pacf(firstDifference)
    eacf(firstDifference)
    plot(armasubsets(firstDifference, nar=12, nma=12))

    # fitting the model
    auto.arima(firstDifference, ic = 'bic') # from forecasting package
    modelFit <- arima(firstDifference, order=c(1,0,0),seasonal
    =list(order=c(2, 0, 0), period = 12))

    # assessing model
    resid <- modelFit$residuals                     
    acf(resid, lag.max = 15)
    pacf(resid, lag.max = 15)

, ( , html csv, ): https://docs.google.com/spreadsheets/d/1S8BbNBdQFpQAiCA4J18bf7PITb8kfThorMENW-FRvW4/pubhtml

+4
1

,

.

tsay, , 118. .

Tsay rejection test

, 111. ar12 . , 7 12 , AR2 2 .

Model

. Relevant, suitable and predictable

. Leftovers

ACF ACF Residuals

. Autobox. . .

http://onlinelibrary.wiley.com/doi/10.1002/for.3980070102/abstract

+2

Source: https://habr.com/ru/post/1675593/


All Articles