Download as pdf or txt
Download as pdf or txt
You are on page 1of 13

yields the following system of equations.

8 8
>
<1, h=0 >
<1, h=0

⇢(h) = 1+✓ 2, |h| = 1 = 0.3, |h| = 1
>
: >
:
0, |h| > 1 0, |h| > 1
We can use the case where |h| = 1 to solve for the only unknown value,
✓.
✓ 1 1
0.3 = 2
=> 0 = ✓2 ✓+1 => ✓ = , 3
1+✓ 0.3 3
Using this result, we can construct the following MA, which has the
desired acf:
1
X t = Zt + Zt 1
3
8
>
> 31/18, h = 0,
<
35/36, |h| = 1,
b) acvf (h) =
>
> 1/6, |h| = 2,
:
0, |h| > 2.
Solution: Similar to above, we can use the formula found in (3.2) to
determine the coefficients for an MA(2) stationary process. Comparing
the acf values from the general formula with the problem statement
values yields the following system of equations.
8 2 2 2
8 31
>
> (1 + ✓ 1 + ✓ 2 ) , h = 0 >
> 18
, h=0
>
<✓ (1 + ✓ ) 2 , >
< 35
1 2 |h| = 1 , |h| = 1
(h) = = 136
>
> ✓2 ,2
|h| = 2 >> , |h| = 2
>
: >
:6
0, |h| 3 0, |h| 3
We can use the case where |h| = 2 to solve for the unknown value, ✓2 .
1 2 1
= ✓2 => ✓2 = 2
6 6
We can then use the case where |h| = 1 to solve for the unknown value,
✓1 .
35 2 1 2 35
= ✓1 (1 + ✓2 ) = ✓1 ( 2
+ 1) => ✓1 =
36 6 6(1 + 6 2 )

4
Lastly, we can use the case where h = 0 to solve for the remaining
unknown value, 2 .
31
= (1 + ✓12 + ✓22 )
18
352 1
= (1 + 2 2
+ 2
) 2
36(1 + 6 ) 36
(36 + 1)(1 + 6 ) + 352 4
4 2 2
=
36(1 + 6 2 )2 2
0 = (36 4 62 2 + 1)(1 + 12 2 + 36 4 ) + 352 4
= 1296 8 1800 6 + 553 4 50 2 + 1
2 1 1 1
= 1, , ,
4 9 36
2
Thus, if we let = 1, (i.e. Zt ⇠ W N (0, 1)), we can construct the
following MA, which has the desired acf:
35 1
X t = Zt Zt 1 + Zt 2
42 6

3.5 Find the acf of the following MA(2) processes:


a) Xt = Zt + 0.7 Zt 1 0.2 Zt 2 ; Solution: From 4.2, we know the acf
for an MA(2) process has the following form.
8 8 8
>
>1, h=0 > 1, h=0 > 1, h=0
>
> >
> >
>
< ✓1 (1+✓ 2)
2, |h| = 1 < 0.7(1 0.2)
|h| = 1 < |h| = 1
2 2 +0.22 , 0.366,
⇢x (h) = 1+✓✓12+✓2 = 1+0.70.2 =
>
> 1+✓12 +✓22 , |h| = 2 >> 1+0.72 +0.22 , |h| = 2 >
> 0.131, |h| = 2
>
> >
: >
:
: 0, |h| 3 0, |h| 3
0, |h| 3

b) Xt = Zt + 0.3 Zt 1 0.4 Zt 2 ; Solution: From 4.2, we know the acf


for an MA(2) process has the following form.
8 8 8
>
> 1, h=0 > 1, h=0 > 1, h=0
>
> >
> >
>
< ✓1 (1+✓ 2)
2, |h| = 1 < 0.3(1 0.4)
|h| = 1 < 0.144, |h| = 1
2 2 +0.42 ,
⇢x (h) = 1+✓✓12+✓2 = 1+0.30.4 =
>
> , |h| = 2 >> , |h| = 2 >
> 0.32, |h| = 2
>
> 1+✓12 +✓22 >
: 1+0.32 +0.42 >
:
: 0, |h| 3 0, |h| 3
0, |h| 3

c) Xt = Zt 0.4 Zt 1 0.1 Zt 2 .

5
We assume below that Zt s W N (0, 2
), B is a backshift operator.

6.1 For the model (1 B)(1 0.2B)Xt = (1 0.5B)Zt :


a) Classify the model as an ARIMA(p, d, q) process (i.e. find p, d, q). ARIMA(1,1,1)
b) Determine whether the process is stationary, causal, invertible.
• The process is stationary if all roots of '(z) are o↵ of the unit circle.

'(z) = (1 z)(1 0.2z) = 0 =) z = 1, 5

Because '(z) has root z = 1, which lies on the unit circle, the process is not stationary .
• The process is causal if all roots of '(z) are outside of the unit circle. Because '(z) has one root z = 1, which
lies on the unit circle, the process is not causal .
• The process is invertible if all roots of ✓(z) are outside of the unit circle.

✓(B) = (1 0.5z) = 0 =) B=z

Because the only root of ✓(z), z = 2, lies outside the unit circle, the process is invertible .
c) Evaluate the first three -weights of the model whenP expressed as an AR(1) model.
1
Xt can be expressed as an AR(1) process of the form Xt = k=0 k Zt k

1
!
✓(B) X
Xt = Zt = (1 0.5B) (1.25 0.25(0.2)k )B k Zt
'(B)
k=0
1
X
= Zt + 0.625 + 0.075(0.2)k 1
Zt k
k=1

= Zt + 0.7Zt 1 + 0.64Zt 2 + 0.628Zt 3 + ···

d) Evaluate the first four ⇡-weights of the model whenP expressed as an MA(1) model.
1
Zt can be expressed as a MA(1) process of the form Zt = k=0 ⇡k Xt k

1
!
'(B) X
Zt = Xt = (1 1.2B + 0.2B 2 ) 0.5k B k Xt
✓(B)
k=0
1
X
= Xt 0.7Xt 1 + 0.15(0.5)k 2
Xt k
k=2

= Xt 0.7Xt 1 0.15Xt 2 0.075Xt 3 0.0375Xt 4 + ···

Discuss how the behavior of the P1 weights is related to the properties of the model found in (b).
An ARMA model is only causal if k=0 | k | < 1, where k are the coefficients from the AR(1) process found in
(c). Note that in out case, this infinite sum is given by
1
X
1+ |0.625 + 0.075(0.2)k 1
|
k=1

which
P1 does not converge, confirming that the given process is not causal. Similarly, an ARMA model is only invertible
if k=0 |⇡k | < 1, where ⇡k are the coefficients from the MA(1) process found in (d). In this case, the corresponding

1
infinite sum is given by
1
X
1.7 + | 0.15(0.5)k 2
|
k=2

which does converge, confirming that the given process is invertible.

6.2 Show that the AR(2) process Xt = Xt 1 + cXt 2 + Zt is stationary provided 1 < c < 0. Show that the
AR(3) process Xt = Xt 1 + cXt 2 + cXt 3 + Zt is non-stationary for all values of c.

The AR(2) process Xt = Xt 1 + cXt 2 + Zt is stationary if and only if all roots of '(z) are o↵ the unit circle. The roots
of '(z) are given by p
2 1± 1 + 4c
'(z) = cz z+1=0 =) z=
2c
p
In order to determine where these roots lie in relation to the unit circle, the norm of z = 1± 2c 1+4c
was plotted for
1 < c < 0, as shown in Figure 1. It can be seen that the roots (real or complex) always have norm greater than 1
for this range of c (i.e., the roots are always outside of the unit circle). Thus, the given AR(2) process is stationary for
1 < c < 0.

Figure 1

Similarly, the AR(3) process Xt = Xt 1 + cXt 2 cXt 3 + Zt is stationary if and only if all roots of '(z) are o↵ the
unit circle. The roots of '(z) are given by
(
3 2 2 1 if c = 0,
'(z) = cz cz z + 1 = (z 1)(cz 1) = 0 =) z= 0.5
1, ±c 6 0
if c =

Thus the roots of '(z) always include z = 1 and the given AR(3) process is non-stationary for all c.

6.3 Write
P P for the following SARIMA(p, d, q) ⇥ (P, D, Q)s processes in an explicit form:
a model
ai Xt i = bj Z t j .
a) (0, 1, 0) ⇥ (1, 0, 1)12 ;
A SARIMA(p, d, q) ⇥ (P, D, Q)s process is typically described in the following form
s
'p (B) P (B )(rd rD s
s Xt ) = ✓q (B)⇥Q (B )Zt

In this case, this yields the following explicit process

'0 (z) = 1 (B 12 )(rXt ) = ⇥(B 12 )Zt


1 (z) = 1 ↵z
(1 ↵B 12 )(1 B)Xt = (1 + B 12 )Zt
r1 r012 = r = (1 B) =)
(1 B ↵B 12 + ↵B 13 )Xt = (1 + B 12 )Zt
✓0 (z) = 1
Xt Xt 1 ↵Xt 12 + ↵Xt 13 = Z t + Zt 12
⇥1 (z) = 1 + z

b) (2, 0, 2) ⇥ (0, 0, 0)1 ;


In this case, P = D = Q = 0, which yields the following explicit process
c) (1, 1, 1) ⇥ (1, 1, 1)4
In this case, except for s = 4, all other parameters are set to 1, which yields the following explicit process

2
'2 (z) = 1 '1 z '2 z 2
0 (z) =1 '(B)Xt = ✓(B)Zt
r 0
r01 =1 =) (1 '1 B '2 B 2 )Xt = (1 + ✓1 B + ✓2 B 2 )Zt
✓2 (z) = 1 + ✓1 z + ✓2 z 2 Xt '1 X t 1 '2 X t 2 = Z t + ✓1 Z t 1 + ✓2 Z t 2
⇥0 (z) = 1

'1 (z) = 1 'z


1 (z) =1 ↵z '(B) (B 4 )(rr4 Xt ) = ✓(B)⇥(B 4 )Zt
1
r r14 = (1 B)(1 B ) 4
=)
(1 'B)(1 ↵B 4 )(1 B)(1 B 4 )Xt = (1 + ✓B)(1 + B 4 )Zt
✓1 (z) = 1 + ✓z
⇥1 (z) = 1 + z

Expanding the lefthand side of the equation yields:

LHS = (1 'B)(1 ↵B 4 )(1 B)(1 B 4 )Xt


= [1 (' + 1)B + 'B 2 (↵ + 1)B 4 + (' + 1)(↵ + 1)B 5 '(↵ + 1)B 6 + ↵B 8 ↵(' + 1)B 9 + '↵B 10 ]Xt
= Xt (' + 1)Xt 1 + 'Xt 2 (↵ + 1)Xt 4 + (' + 1)(↵ + 1)Xt 5 '(↵ + 1)Xt 6 + ↵Xt 8 ···
↵(' + 1)Xt 9 + '↵Xt 10

Expanding the righthand side of the equation yields:

RHS = (1 + ✓B)(1 + B 4 )Zt


= (1 + ✓B + B 4 + ✓ B 5 )Zt
= Zt + ✓Zt 1 + Zt 4 + ✓ Zt 5

6.4 For each of the following ARIMA models specify their order (p, d, q) and find out whether Xt is
stationary, causal, invertible.
a) Xt + 0.2Xt 1 0.48Xt 2 = Zt ;
b) Xt + 1.9Xt 1 + 0.88Xt 2 = Zt + 0.2Zt 1 + 0.7Zt 2;
c) Xt + 0.5Xt 2 = Zt 2 ;
d) Xt 2Xt 1 + Xt 2 = Zt 0.3Zt 1 ;
e) Xt 0.3Xt 1 = Zt 0.3Zt 1 ;
f) Xt = Xt 1 + Z t ;
g) Xt 2Xt 1 + Xt 2 = Zt + 0.5Zt 1 ;

Blue text denotes roots inside the unit circle, while red text denotes roots on the unit circle, and black text denotes
roots outside the unit circle.

3
(p, d, q) '(z), ✓(z) roots property*
2 5 4
a) (2,0,0) '(z) = 1 + 0.2z 0.48z z= 4, 3 S, C
✓(z) = 1 I
5 10
b) (2,0,2) '(z) = 1 + 1.9z + 0.88z 2 z= 4, 11 S
p
1 69i
✓(z) = 1 + 0.2z + 0.7z 2 z= ± 7 7 I
p
c) (2,0,2) '(z) = 1 + 0.5z 2 z=± 2 S, C
✓(z) = z 2 z = ±1

d) (0,2,1) '(z) = 1 2z + z 2 z = 1, 1
10
✓(z) = 1 0.3z z= 3 I
10
e) (1,0,1) '(z) = 1 0.3z z= 3 S, C
10
✓(z) = 1 0.3z z= 3 I

f) (0,1,0) '(z) = 1 z z=1


✓(z) = 1 I

g) (0,2,1) '(z) = 1 2z + z z = 1, 1
✓(z) = 1 + 0.5z z= 2 I

*S = Stationary, C = Causal, I = Invertible

4
Yes, it gives the same model.

7.
Consider the quarterly number of international tourists to Australia for the period 1999-2010. (Data set austourists).

a.
Describe the time plot.

plot(austourists, main="Aus Tourists")

There is an

increasing trend over time with clear seasonality and wider fluctuation over time.

b.
What can you learn from the ACF graph?

Acf(austourists)
There are some

spikes outside of the critical value, so there might be some data that is not white noise.

c.
What can you learn from the PACF graph?

Pacf(austourists)
There are spikes

outside of the critical value, so there might be some data that is not white noise.

d.
Produce plots of the seasonally differenced data (1???B4)Yt(1???B4)Yt. What model do these graphs suggest?

aus7.arima<-auto.arima(austourists)
aus7.arima

## Series: austourists
## ARIMA(1,0,0)(1,1,0)[4] with drift
##
## Coefficients:
## ar1 sar1 drift
## 0.4705 -0.5305 0.5489
## s.e. 0.1154 0.1122 0.0864
##
## sigma^2 estimated as 5.15: log likelihood=-142.48
## AIC=292.97 AICc=293.65 BIC=301.6

autoplot(residuals(aus7.arima))
aus7.fc<-forecast(aus7.arima, h=10)
autoplot(aus7.fc)
aus7.arima2<-Arima(austourists,order=c(0,1,1), include.drift=FALSE)
aus7.fc2<-forecast(aus7.arima2, h=10)
autoplot(aus7.fc2)

e.
Does auto.arima give the same model that you chose? If not, which model do you think is better?

Auto arima gives Arima (1,0,0), which is better than the Arima (0,1,1).

aus.arima<-auto.arima(austourists)
aus.arima #(0,1,1)

## Series: austourists
## ARIMA(1,0,0)(1,1,0)[4] with drift
##
## Coefficients:
## ar1 sar1 drift
## 0.4705 -0.5305 0.5489
## s.e. 0.1154 0.1122 0.0864
##
## sigma^2 estimated as 5.15: log likelihood=-142.48
## AIC=292.97 AICc=293.65 BIC=301.6

f
(1?????1B)(1???B4)yt=??t

yt=yt???4+??1(yt???1???yt???5)+??t
495 autoplot(usgdp, series = "Data") +
496 autolayer(usgdp_arima.1.1.0.drift$fitted, series = "Fitted")
497 # It looked like that these models also fit well to the data.
498
499 # d. choose what you think is the best model and check the residual diagnostics;
500 accuracy(usgdp_autoarima)
501 accuracy(usgdp_arima.1.1.0)
502 accuracy(usgdp_arima.1.1.0.drift)
503 # Some errors show that ARIMA(2, 1, 0) with drift is the best model while others show that ARIMA(1, 1,
504 checkresiduals(usgdp_autoarima)
505 checkresiduals(usgdp_arima.1.1.0.drift)
506 # In either case, the residuals are like white noise series and are not normally distributed.
507 # I'll choose the best model as ARIMA(2, 1, 0) with drift model. With the model, RMSE and MASE values
508
509 # e. produce forecasts of your fitted model. Do the forecasts look reasonable?
510 fc_usgdp_autoarima <- forecast(
511 usgdp_autoarima
512 )
513
514 autoplot(fc_usgdp_autoarima)
515 # It looked like the forecasts are reasonable.
516
517 # f. compare the results with what you would obtain using ets() (with no transformation).
518 fc_usgdp_ets <- forecast(
519 ets(usgdp)
520 )
521
522 autoplot(fc_usgdp_ets)
523 # It looked like these forecasts are more likely than the ones with ARIMA model. When trend is obvious
524
525 ```
526
527
528 10. Consider austourists, the quarterly number of international tourists to Australia for the period 1
529
530 ```{r echo=FALSE, message=FALSE, warning=FALSE, Question10}
531
532 # a. Describe the time plot.
533 autoplot(austourists)
534 # the data have strong seasonality and increasing trend. Also the size of variations increased as the
535
536 # b. What can you learn from the ACF graph?
537 ggAcf(austourists)
538 # autocorrelations are slowly decreasing. And the values at the lags of multiple of 4 were big compare
539
540 # c. What can you learn from the PACF graph?
541 ggPacf(austourists)
542 # there are 5 significant spikes, and then no significant spikes thereafter (apart from one at lag 8,
543
544 # d. Produce plots of the seasonally differenced data (1 - B^4)Yt. What model do these graphs suggest
545 ggtsdisplay(diff(austourists, lag = 4))
546 # the seasonally differenced data are looked like to need at least one more differencing to make it st
547 # For the values at the lags of multiple of 4, there are just significant spikes at lag 4. It is same f
548 # Disregarding the values at lag 4, autocorrelation values are looked like decreasing sinusoidally whi
549 # I think that the spike at lag 5 doesn't mean that there are still important information unused at 5t
550 # I can find this by drawing PACF plot after doing one more differencing.
551 ggtsdisplay(diff(diff(austourists, lag = 4)))
552 # Therefore I suggest ARIMA(1, 1, 0)(1, 1, 0)[4] model.
553
554 # e. Does auto.arima give the same model that you chose? If not, which model do you think is better?
555 fc_austourists_autoarima <- forecast(
556 auto.arima(austourists)
557 )
558
559 fc_austourists_autoarima$model
560 # auto.arima gave ARIMA(1, 0, 0)(1, 1, 0)[4] model.
561
562 fc_austourists_arima.1.1.0.1.1.0.4 <- forecast(
563 Arima(austourists,
564 order = c(1, 1, 0),
565 seasonal = c(1, 1, 0))
566 )
567
568 autoplot(fc_austourists_autoarima)
569 autoplot(fc_austourists_arima.1.1.0.1.1.0.4)
570 # ARIMA(1, 1, 0)(1, 1, 0)[4] shows more fastly increasing trend.
571
572 accuracy(fc_austourists_autoarima)
573 accuracy(fc_austourists_arima.1.1.0.1.1.0.4)
574 # ARIMA(1, 0, 0)(1, 1, 0)[4] with drift model was fitted better. Therefore I think that this model is
575
576 checkresiduals(fc_austourists_autoarima)
577 # The residuals are like white noise series.
578
579 # f. Write the model in terms of the backshift operator, then without using the backshift operator.
580 fc_austourists_autoarima$model
581 # (1 - phi1*B)(1 - phis1*B)(1 - B^4)(yt - c*t) = et
582 # c = drift*(1 - phi1)(1 - phis1)*m^D = 1.7793
583
584 # (1 - phi1*B - phis1*B + phi1*phis1*B^2)(1 - B^4)(yt - c*t) =
585 # (1 - phi1*B - phis1*B + phi1*phis1*B^2 - B^4 + phi1*B^5 + phis1*B^5 - phi1*phis1*B^6)(yt - c*t) = et
586 # yt = c + (phi1 + phis1)*yt-1 - phi1*phis1*yt-2 + yt-4 - (phi1 + phis1)*yt-5 + phi1*phis1*yt-6 + et
587 # yt = 1.7793 - 0.06*yt-1 + 0.2496*yt-2 + yt-4 + 0.06*yt-5 - 0.2496*yt-6 + et
588
589 ```
590
591
592 11. Consider the total net generation of electricity (in billion kilowatt hours) by the U.S. electric
593
594 ```{r echo=FALSE, message=FALSE, warning=FALSE, Question11}
595
596 # a. Examine the 12-month moving average of this series to see what kind of trend is involved.
597 usmelec_ma2x12 <- ma(usmelec, order = 12, centre = TRUE)
598

You might also like