Question
need code from R. Time series with applications in R class

7. Simulate an AR(2) series with фі--1.0, P2 ;--0.6, n-48, but error terms from a t-distribution with five degrees of freedom
0 0
Add a comment Improve this question Transcribed image text
Answer #1

ANSWER: I have attached the R code for the given problem. First we simulated the AR(2) process using arima.sim command. In part A we used pacf command to plot the pacf of the series. The plot clearly shows it as AR(2) since only two values are outside the confidence bounds. In part C, we estimated the series using arima function.

################ R CODE BEGINS #########################

rm(list=ls(all=TRUE))

set.seed(12345)

p1=1;p2=-0.6;n=48

## Simulate AR(2) with t distribution innovations

X=arima.sim(48, model=list(ar = c(1,-0.6)), innov = rt(48, df = 5))

## Part A

pacf(X,lag.max = 48)

## Part B

arima(X,order=c(2,0,0),method="CSS",include.mean = FALSE)

## Part C

X1=arima.sim(48, model=list(ar = c(1,-0.6)), innov = rt(48, df = 5))
pacf(X1,lag.max = 48)
arima(X1,order=c(2,0,0),method="CSS",include.mean = FALSE)

################# R CODE ENDS ##################################

Add a comment
Know the answer?
Add Answer to:
need code from R. Time series with applications in R class 7. Simulate an AR(2) series with фі--1.0, P2 ;--0.6, n-48, but error terms from a t-distribution with five degrees of freedom. (a) Displ...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT