[R-sig-finance] Exogenous Variable in armafit

Dirk Eddelbuettel edd at debian.org
Tue May 16 03:16:31 CEST 2006


On 14 May 2006 at 23:16, Joe Byers wrote:
| I am trying to estimate a simple AR process but need to include trend 
| components.  The documentation says exogenous variables can be included 
| using the ... argument in the formula description section.  I am new to 
| R and do not understand what this means.  Can anyone help?  A snippet of 
| code would be great.

I've use arima() with its xreg argument in the past.  Consider this snippet
from the documentation of the arima() function:

    arima(LakeHuron, order = c(2, 0, 0), xreg = time(LakeHuron) - 1920)

It estimates a regression model with a time trend modeled as the offset
relative to 1920, and an AR(2) error component.

Hope this helps.

Dirk

-- 
Hell, there are no rules here - we're trying to accomplish something. 
                                                  -- Thomas A. Edison



More information about the R-sig-finance mailing list