{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

hw4-2012

# hw4-2012 - CORNELL UNIVERSITY STSCI 4550 ILRST 4550 ORIE...

This preview shows pages 1–2. Sign up to view the full content.

CORNELL UNIVERSITY STSCI 4550 / ILRST 4550 / ORIE 5550 Applied Time Series Analysis, Spring 2012 Professor David S. Matteson Assignment #4 Due: Monday, March 5 1. Use the code below to simulate x from an ARMA model and y from a sinusoidal model. set.seed(89) n = 500 x = arima.sim(n, model = list(order = c(2,0,0), ar = c(0.95, -0.35))) roots = polyroot(c(1,-0.95, 0.35)) roots ; abs(roots) y = 2*cos((1:n)*0.5 + 0.6*pi) + rnorm(n) (a) Carefully write out the specific models that are being used here. (b) For each process create a time series plot and an ACF plot. Using these plots, briefly compare and contrast the two models. (c) What does the function polyroot() do? Be specific in your answer. (d) Is the model for x stationary? Is the model for y stationary? Justify your answer. (e) Use the code below to calculate and plot the scaled periodogram for x and y . Using these plots, briefly compare and contrast the two models. f = (0:(n/2-1))/n # frequencies par(mfrow=c(2,1)) Ix = abs(fft(x))^2 / n # periodogram Px = (4/n) * Ix[1:(n/2)] # scaled periodogram plot(f, Px, type = "o") Iy = abs(fft(y))^2 / n # periodogram Py = (4/n) * Iy[1:(n/2)] # scaled periodogram plot(f, Py, type = "o") 2. Consider the monthly U.S. unemployment rate, from 1948 to 2008. The data are in

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### Page1 / 3

hw4-2012 - CORNELL UNIVERSITY STSCI 4550 ILRST 4550 ORIE...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online