R simulation SARIMA model

Viewed 33

I try to simulate SARIMA model in R. Input data: a0=2,a1=0.7,a2=0.5,b1=0.3,b2=0.4,j1=1,j2=4, white noise with 0.1 sd. I need to simulate SARIMA process in R and get the estimates with OLS. Below what i already have:

eps<-rnorm(102,mean=0,sd=0.1)
x<-rep(0,102)
for(i in 1:length(eps)){
x[i] = eps[i]+a0+a1*cos(3.14159*0.02*j1*i)+b1*sin(3.14159*0.02*j1*i)+(a2*cos(3.14159*0.02*j2*i)+b2*sin(3.14159*0.02*j2*i))
}
plot(x)

How can I get estimates of parameters with OLS

0 Answers
Related