ewma: Exponentially weighted moving average

Description Usage Arguments Details References

View source: R/RcppExports.R

Description

Exponentially weighted moving average

Usage

1
ewma(x, lambda = 0.2, na_prev = TRUE)

Arguments

x

numeric vector.

lambda

parameter (between 0 and 1).

na_prev

if missing value appears in x, EWMA takes previous entry as estimate for it.

Details

Exponentially weighted moving average is defined as

Z[i] = λ * Y[i] + (1 - λ) * Z[i-1]

References

Lucas, J. M. and Saccucci, M. S. (1990). Exponentially weighted moving average control schemes: Properties and enhancements. Technometrics 32, 1-29.


twolodzko/twextras documentation built on May 3, 2019, 1:52 p.m.