[R] exponential smoothing

Xavier.Abulker@fimat.com Xavier.Abulker at fimat.com
Fri Jun 14 13:21:23 CEST 2002

could someone help me to write a fonction doing an exponential smoothing in
case of a multivariate time serie?
I tried
ewma <- function (x, lambda = 1, init = 0)
     if (is.ts(x))
       filter(lambda*x, filter=1-lambda, method="recursive", init=init)
       stop(message="first argument should be a time serie")
but I can't apply that to multivariate


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