[R] Modified ARMA function

krishna kumar kriskumar at mailandnews.com
Thu Aug 8 18:07:30 CEST 2002


Thanks Adrian,  that helped, this is nice too, now i can add a bunch of exogenous variables onto the arma equation.
thanks
Krishna

Adrian Trapletti wrote:

> > Date: Sun, 04 Aug 2002 23:40:04 -0700
> > From: krishna kumar <kriskumar at mailandnews.com>
> > Subject: [R] Modified ARMA function
> >
> >  R-guRus ,
> >
> > ARMA function in tseries,  seems to be calculating the AR coeff 's as
> >
> >  coef <- lm(xx[,1]~xx[,lag$ar+1])$coef    [*snipped* from around  line
> > 77,]
>
> This is only to get preliminary estimates of the AR (and later also of the MA) coefficients. The final estimates are computed by conditional least squares (ie. minimizing function err defined in arma).
>
> >
> > I'd like to  modify this model with another term somewhat in these lines
> >
> > lm(xx[,1] ~xx[,lag$ar+1]+mvgsignal)$coef
> >
> > where mvgsignal is a moving average signal based on some indicators, the
> > question
> > is could i simply hack into tseries and do this and hope all is well ,
>
> > is there a cleaner
> > way
>
> There is a cleaner way: Use the function arima from ts and use xreg=mvsignal (if mvsignal is exogenous).
>
> > of specifying arbitrary parameters (additions) to GARCH and other
> > estimators?.
>
> > Please enlighten.
> >
> > thanks in advance,
> >
> > Krishna
> >
>
> best
> Adrian
>
> --
> Dr. Adrian Trapletti             Phone :             +41 (0) 1 994 5631
> Trapletti Statistical Computing  Mobile:             +41 (0)76 370 5631
> Wildsbergstrasse 31              Fax   :             +41 (0) 1 994 5633
> CH-8610 Uster                    Email :  mailto:a.trapletti at bluewin.ch
> Switzerland                      WWW   : http://trapletti.homelinux.com

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list