Jan Sila
Jan Sila

Reputation: 1593

Creating series with estimated coefficients

I managed to estimate some ARIMA models, got coefficients, but just wondering is there an easy way how to plot series using the estimated coeffcients?

So I gota

arimadax1<-auto.arima(dax1,d=2, max.order=50,max.d=2, start.q=0,max.p=5, max.q=10,       trace=TRUE,ic=c("aicc","aic", "bic"))

and I can call the coefficients from the estimate (2,2,0) but then I would have to create the series myself by hand like I did before for a different series:

r1<-rep(0,1000)
e1<-rep(0,1000)
for (i in 2:1000) {
r1[i]<-0.080067-0.667730*r[i-1]+e1[i]+0.223005*e1[i-1]
}

Would you know of an easier way to do this? Now I have 4 series and it might be tedious if I wanted even more. Thanks a lot!

Upvotes: 0

Views: 40

Answers (1)

DatamineR
DatamineR

Reputation: 9618

# assuming some ar-coefficients:
ar.coef <- c(0.2, -.1)
arima.sim(1000, model = list(ar=ar.coef, order = c(2,2,0)))

Upvotes: 1

Related Questions