Reference no: EM132476963
MAT 3379 Introduction to Time Series Assignment - University of Ottawa, Canada
Q1. Theoretical Question
Durbin-Levinson algorithm and PACF for AR(p) models. Assume that Zt are i.i.d random variables with mean 0 and variance σZ2. Obtain the coefficients φ11, φ22, φ33 for AR(2) model.
Q2. Theoretical Question
Yule-Walker procedure and Durbin-Levinson algorithm for MA(q) models. Consider the MA(1) model Xt = Zt + θZt-1, θ ∈ R, where Zt are i.i.d. random variables with mean 0 and variance σZ2. Our goal is to find the best linear predictor PnXn+1 of Xn+1 based on X1, . . . , Xn.
(a) Let n = 2. Apply the Durbin-Levinson algorithm to get P2X3 = φ21X2 + φ22X1. You should get the same answer as in the previous assignment; note however that there is a change of notation: (a1, a2) are changed into (φ21, φ22).
Q3. Theoretical Question - Maximum Likelihood Estimation for AR(p) models.
Consider AR(1) model Xt = φXt-1 + Zt, where Zt are i.i.d. normal random variables with mean zero and variance σZ2. Derive MLE for φ and σZ2.
Q4. Practical Question
(a) We have already fitted AR(4) to US unemployment data. We estimated parameters using the Yule-Walker procedure.
(b) Calculate the residuals, plot their ACF and PACF. Is the chosen AR(4) model appropriate?
(c) Predict the next observation (remember about the mean!).
(d) "Predict" the past observations and verify quality of the "prediction" by plotting the original values and the "predicted" values on the same graph. Compute the squared error of that prediction.
(e) Now, pretend that the model is AR(1). Estimate parameters of the model. Repeat (b)-(d). State conclusions.
Q5. Practical/Theoretical Question
(a) Type
My.TS<-LakeHuron; help(LakeHuron); mean=mean(My.TS);
My.Centered.TS<-My.TS-mean(My.TS);
The first command loads data set LakeHuron which is in-built in R. The second command shows description of the data set. The third command centers your data set.
(b) Fit AR(2) model using the Yule-Walker estimator. Obtain φ^1, φ^2, σ^Z2.
fit.ar<-ar(My.Centered.TS,method="yule-walker");
(c) Verify that the command ar leads to the correct Yule-Walker estimator.
- Type
ACF<-acf(LakeHuron)
and readb ρ^X(1) and ρ^X(2). Type var(LakeHuron)to get γ^X(0). Using these information, compute γ^X(1), γ^X(2).
- Create a vector (γ^X(1), γ^X(2)) and call it gamma.vector.
- Create a matrix Γ^2 and call it Gamma.matrix.
- Type
solve(Gamma.matrix)%*%gamma.vector;
and compare the obtained values with part (b).
Q6. Practical Question
The following exercise shows that it is hard to identify AR model with p ≥ 2.
Download BadData.txt. Denote by X your data set.
(a) Based on ACF and PACF argue that an AR(3) model can be chosen.
(b) Type
fit.ar<-ar(X, method="mle");
fit.ar;
What order has been selected? Denote this order by p.
(c) Use p from (b) and type
fit.arima<-arima(X, order=c(3,0,0));
fit.arima;
fit.arima1<-arima(X, order=c(p,0,0));
fit.arima1;
Why did MLE select p, not 3?
Attachment:- Introduction to Time Series Assignment File.rar