[R] help in simulating AR models

CJ Rubio cjrubio at kongju.ac.kr
Thu Oct 22 04:22:51 CEST 2009


good day everyone!

i have a time series (andong.ts) and fitted and AR() model using the
following code 

andong.ts <- ts(read.table("D:/.../andong.csv", header = TRUE), start =
c(1966,1), frequency = 1) 

ar(andong.ts) 

Call: ar(x = andong)

Coefficients:
        1                     2                   3
 0.3117              0.0607            0.0999 

Order selected 3 sigma^2 estimated as 0.8443



 I am aware that my model is now

 x(t) = 0.3117x(t-1) + 0.0607x(t-2) + 0.0999x(t-3) + e(t)                                         
eqn(1)




but i am not sure of how to perform my simulation for the new series. i
tried to look at arima.sim, 
arima.sim(ar = c(0.3117,0.0607, 0.0999), n = 36) 


but it doesn't seem to use the old series that should be simulated (or maybe
it is but i am not aware) Could anyone please brief me on how to perform my
simulation properly which would perform eqn (1) with e(t) being the residual
series?


 thanks in advance!!!

-- 
View this message in context: http://www.nabble.com/help-in-simulating-AR-models-tp26003111p26003111.html
Sent from the R help mailing list archive at Nabble.com.




More information about the R-help mailing list