Re: [R] question about xreg of arima

2008-01-13 Thread tom soyer
Thanks Richard. I am just trying to understand exactly what is R's arima doing, and I am having a hard time. It seems that xreg is necessary to force arima to include the constant term, but it appears that exactly how this is done is not documented. If a series is not differenced, e.g. AR(1), then

Re: [R] question about xreg of arima

2008-01-12 Thread Richard Saba
Tom A constant term is not included in the model if any differencing is specified. The xreg= parameter is used to add other explanatory variables to the model. In your case xreg=1:length(x) adds a vector of 1's to the model. Robert Shumway and David Stoffer's website for their Time Series