Message-ID: <CAA7=MyUu6eMu=6ZY+PNXT_z6w=VLGUQws4uveZ950vT7DS9mXQ@mail.gmail.com>
Date: 2011-12-21T02:34:37Z
From: Robert A'gata
Subject: Similar function to filter but allowing time varying coefficient?
Hi,
I have a need to compute something that is similar to exponential
moving average. More precisely:
y[t] = (1-w(t)) x[t] + w(t) y[t-1]
x[t] is my input. I know only filter function in R where filter is a
vector of constant. In my case, my filter will be a matrix of Nx2
where N is number of observations in my time series. I'm wondering if
there is any function that does this? Also, N usually is in an order
of few millions. So it'd be great for me to know a fast
implementation. Thank you.
Regards,
Robert