# easy to use
sarima(rec, 2,0,0) # data, p, d, and q
sarima(rec, 2,0,0, details=FALSE) # minimal output
dog <- sarima(log(AirPassengers), 0,1,1, 0,1,1,12)
str(dog, vec.len=1) # dog has all the returned values
tsplot(resid(dog$fit)) # plot the innovations (residuals)
dog$ICs # view the 3 ICs
# fixed parameters
x = sarima.sim( ar=c(0,-.9), n=200 ) + 50
sarima(x, 2,0,0, fixed=c(0,NA,NA)) # phi1 fixed, phi2 and mean free
# fun with diagnostics
sarima(log(AirPassengers), 0,1,1, 0,1,1,12, gg=TRUE, col=4)
# regression with autocorrelated errors
pp = ts.intersect(L = Lynx, L1 = lag(Lynx,-1), H1 = lag(Hare,-1), dframe=TRUE)
sarima(pp$L, 2,0,0, xreg = cbind(L1=pp$L1, LH1=pp$L1*pp$H1))
Run the code above in your browser using DataLab