Skip to content
Prev 259295 / 398502 Next

ARMA

boki2b wrote:
Firstly, all of the functions you mention can be explored in more detail by
typing ?xxx, where xxx is ar, arima or arma. Note, you will need the tseries
package to run the arma function. (require(tseries))

Secondly, there is some debate around interpretation of some of the output
from these functions. Check out one viewpoint at
http://www.stat.pitt.edu/stoffer/tsa2/Rissues.htm (ISSUE 1: When is the
intercept the mean?) 

Finally, I have tried below to put the functions on a similar footing to
allow you to compare their output.

# create data
set.seed(12345)
d = rnorm(30)

library(tseries) # need for arma function

# 1. arma
# fits using conditional least squares, "intercept" is the "intercept"
arma(d,order=c(1,0))
# 2. arima
# "intercept" is the "mean", intercept derived as mean*(1-AR1)
arima(d,order=c(1,0,0),method="CSS")
So, intercept = 0.0638 * (1 + 0.1057) = 0.0705 ... same as arma above

# 3. ar
"intercept" is the "intercept"
ar(d,aic=FALSE, order.max=1,method="ols",intercept=TRUE, demean=FALSE)
There is a nice document on CRAN that you may find useful. 
 
http://cran.r-project.org/doc/contrib/Ricci-refcard-ts.pdf

HTH

Pete


--
View this message in context: http://r.789695.n4.nabble.com/ARMA-tp3507846p3507963.html
Sent from the R help mailing list archive at Nabble.com.