Академический Документы
Профессиональный Документы
Культура Документы
Martin Minchev
February 3, 2018
Introduction
ACF of SQRT of the Time Series
0.8
This project examines the monthly production of
chocolate confectionery(in tonnes) in Australia for
0.6
the period July 1957 – Aug 1995. Link to data
ACF
0.4
This file is generated with R Markdown and the code
0.2
can be replicated with R Studio.
0.0
Monthly Production of Chocolate Confectionery (in tonnes) in Australia
0 1 2 3 4
Lag
9000
0.8
6000
0.4
Partial ACF
3000
0.0
Month
90
case. Thus, we examine the first difference:
Sqrt of Production (in tonnes)
70
30
8.0
20
Differences
10
50 7.5
0
−10
7.0
30
1960 1970 1980 1990 1960 1970 1980 1990
Month Month
−30
Time
1
ACF of the First Difference of the TS Data After First Difference and First Seasonal Difference
0.8
15
10
0.6
5
0.4
0
ACF
t
0.2
−10
0.0
−0.2
−20
0 2 4 6 8 1960 1970 1980 1990
Lag Time
PACF of the First Difference of the TS ACF After First Difference and First Seasonal Difference
0.2
0.2
0.0
Partial ACF
0.0
−0.6 −0.4 −0.2
ACF
−0.2
−0.4
0 2 4 6 8 0 2 4 6 8
Lag Lag
## AR/MA
## 0 1 2 3 4 5 6 7 8 9 10 11 12 13
Partial ACF
0.0
## 0 x x x o o o o o x x x x x x
## 1 x x o o o o o o o x o x x x
−0.2
## 2 x x o o o o o o o o o x x x
## 3 x x o o o o o o o o o x x x
−0.4
## 4 x x x o o o o o o o o x x x
## 5 x x x o o o o o o o o x x x 0 2 4 6 8
## 6 x x x o o x o o o o o x x x Lag
## 7 x o x x x o o o o o o x x x
## AR/MA
## 0 1 2 3 4 5 6 7 8 9 10 11 12 13
## 0 x o o o o o o o o o x x x o
Seasonal trend continues to be obvious(with lag ## 1 x o o o o o o o o o x x x x
12). Also the ACF decrease is not exponential ## 2 x o o o o o o o o o o x x x
but linear, that is why we can take also one ## 3 x x o x o o o o o o o x o o
seasonal difference. However, we can examine ## 4 x x x o x o o o o o o x x o
ARMA(1/2,2) or ARMA(0,3) models for the non- ## 5 x x x x o o o o o o o x o o
seasonal part and ARMA(1,0) for the seasonal ## 6 x o x x o o o o o o o x x x
part(ignoring the slow decrease in the ACF). So ## 7 x x x o o o o o o o o x x o
we add the models SARIMA(0,1,3)x(1,0,0)[12],
SARIMA(1,1,2)x(1,0,0)[12], The seasonal difference did hardly any good. However,
SARIMA(2,1,2)x(1,0,0)[12] in our list for further we can further examine SARIMA(0,1,1)x(1,1,0)[12],
examination. SARIMA(1,1,2)x(1,1,0)[12].
2
We will note that the function auto.arima from the Comparing chosen models
‘forecast’ library returns SARIMA(2,1,0)x(1,0,0)[12]
for the sqrt-data and after 1st difference and
SARIMA(1,1,2)(0,1,1)[12] after 1st and seasonal dif-
ference.
3
ACF of the Residuals of an SARIMA(0,1,3)x(1,0,0)[12] ACF of the Residuals of an SARIMA(1,1,2)x(1,1,0)[12]
0.10
0.1
0.0
0.00
ACF
ACF
−0.1
−0.10
−0.2
−0.20
−0.3
0 2 4 6 8 0 2 4 6 8
Lag Lag
0.1
0.1
0.0
0.0
ACF
ACF
−0.1
−0.1
−0.2
−0.2
−0.3
−0.3
0 2 4 6 8 0 2 4 6 8
Lag Lag
ACF
−0.1
−0.2
−0.10
−0.3
0 2 4 6 8 0 2 4 6 8
Lag Lag
−0.1
−0.2
0 2 4 6 8
Lag
4
Residuals of an SARIMA(0,1,3)x(1,0,0)[12] Residuals of an SARIMA(1,1,2)x(1,1,0)[12]
4
Standartized Residuals
Standartized Residuals
2
3
2
0
1
0
−2
−2 −1
−4
Time Time
3
2
Standartized Residuals
Standartized Residuals
2
1
0
0
−1
−2
−2
−3
−4
Time Time
Standartized Residuals
2
2
0
0
−2
−2
−4
Time Time
Residuals of an SARIMA(0,1,1)x(1,1,0)[12]
4
Standartized Residuals
2
0
−2
Time
5
SARIMA(0,1,3)x(1,0,0)[12],
Normal Q−Q Plot
Shapiro-Wilk normality test p-value - 0.1472:
4
Normal Q−Q Plot
Sample Quantiles
2
2
Sample Quantiles
0
0
−2
−2
−3 −2 −1 0 1 2 3
−4
Theoretical Quantiles
−3 −2 −1 0 1 2 3
Theoretical Quantiles
SARIMA(1,1,2)x(1,1,0)[12],
Shapiro-Wilk normality test p-value - 0.02209:
SARIMA(1,1,2)x(1,0,0)[12],
Normal Q−Q Plot
Shapiro-Wilk normality test p-value - 0.1369:
Normal Q−Q Plot
4
3
Sample Quantiles
2
2
1
Sample Quantiles
0
0
−2 −1
−2
−3 −2 −1 0 1 2 3
−4
Theoretical Quantiles
−3 −2 −1 0 1 2 3
Theoretical Quantiles
SARIMA(2,1,0)x(1,0,0)[12],
Shapiro-Wilk normality test p-value - 0.2987:
SARIMA(2,1,2)x(1,0,0)[12],
Normal Q−Q Plot
Shapiro-Wilk normality test p-value - 0.1572:
3
1
0
2
Sample Quantiles
−1
−2
0
−3
−2
−3 −2 −1 0 1 2 3
−4
Theoretical Quantiles
−3 −2 −1 0 1 2 3
Theoretical Quantiles
SARIMA(1,1,2)x(0,1,1)[12], Shapiro-Wilk
normality test p-value - 0.0005131:
SARIMA(0,1,1)x(1,1,0)[12],
Shapiro-Wilk normality test p-value - 0.1536:
6
Fits
Normal Q−Q Plot
SARIMA(2,1,2)x(1,0,0)[12] Fit
4
Sample Quantiles
90
0
Legend
70 Fitted Values
−2
Real Data
−3 −2 −1 0 1 2 3 50
Theoretical Quantiles
30
1960 1970 1980 1990
Based on the Shapiro-Wilk test we ex- Month
clude the SARIMA(1,1,2)x(1,1,0)[12] and SARIMA(1,1,2)x(1,0,0)[12] Fit
SARIMA(1,1,2)x(0,1,1)[12] models.
For brevity, we plot the fits and forecast for three of
SARIMA(2,1,2)x(1,0,0)[12] and
SARIMA(2,1,0)x(1,0,0)[12]. Legend
70 Fitted Values
Real Data
50
30
1960 1970 1980 1990
Month
SARIMA(2,1,0)x(1,0,0)[12] Fit
110
SQRT of Chocolate Confectionery
90
Legend
70 Fitted Values
Real Data
50
30
1960 1970 1980 1990
Month
7
Forecasts Forecasts from ARIMA(2,1,2)(1,0,0)[12]
level
75 80
95
50
140
SQRT of Chocolate Confectionery
120
100
100
90
80
80
70
60
60
120
SQRT of Chocolate Confectionery
SQRT of Chocolate Confectionery
100
90 level
80
level
75 95
80
95
60
50
30
1960 1970 1980 1990
Month
1960 1970 1980 1990
Month
Month