Y ,Y N (0,1) , Y ϕ Y ϕ Y ϕ Y w, for t=4, … ,50, where ϕ ϕ ϕ, w, … N (0,1)

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 2

1. AR(p) time series simulation.

(a) Now simulate an AR(3) model,

Y 1=0, Y 2 ,Y 3

iid

N ( 0,1 ) , Y t= 1 Y t 1+ 2 Y t 2 + 3 Y t 3 + wt , for t=4, ,50, where 1=2 = 3=0.7w 1 , w 2 ,

iid

Do this twice, that is, simulate two time series and plot their acfs. You can adapt the
code you used above to simulate time series for this model.
(b) Repeat the above for an AR(3) model,

Y 1=0, Y 2 ,Y 3

iid

N ( 0,1 ) , Y t= 1 Y t 1+ 2 Y t 2 + 3 Y t 3 + wt , for t=4, ,50, but with 1= 2= 3=0.2w 1 , w 2 ,

Do this twice, that is, simulate two time series. You can adapt the code you used
above to simulate time series for this model. How are these plots different from the

s =0.7 ? Explain the reason for the difference as

plots for the AR(3) with the

precisely as you can by finding the first two lags of the autocorrelation function for
this model.
2. Let

{Y t }

be a particular class of AR(2) models,

Y t = 2 Y t 2+ wt where w1 , w2 ,

iid

N ( 0,1 ) .

Find the autocorrelation function for this model.


4. Load the Berkeley and Santa Barbara temperature data using the
following commands
berk=scan("http://sites.stat.psu.edu/~mharan/463/data/berkeley.dat",
what=list(double(0),double(0),double(0)))
time=berk[[1]] # extracts first column and puts it in the variable called list
berkeley=berk[[2]] # extracts second column and puts it in the variable called
berkeley
stbarb=berk[[3]] # extracts second column and puts it in the variable called stbarb
Note: the first command scans the data set from the website provided and tells it
that the three columns of data are real numbers with double precision (the precision
level at which the numbers are stored on the computer).
(a) Now create estimated ACF plots for berkeley and stbarb. Also create estimated
PACF plots for berkeley and stbarb.
(b) Repeat the above (ACF and PACF) for differenced versions of these data.
(c) Do you have an opinion on possible models based on these or any other plots
you have made? Denote the Berkeley time series and the Santa Barbara time series
as, respectively,

X t Y t , with t=1, N (N is the length of the time series).

Write out your model ideas in mathematical notation (as in class). You will obviously
have separate models for

X t Y t . If you have made other plots to study these

data and any of them was important in determining your model, please include
them.

iid

If none of the models you have learned (AR(p) or MA(q) for any p; q) are not
appropriate for some reason, explain why.
(d) Do you think the two time series are related? Justify your answer as best as you
can. If they are related, describe a model for the Berkeley time series as a function
of the Santa Barbara time series.

You might also like