EWMA smoothing function
ewmaSmooth.Rd
Compute Exponential Weighted Moving Average.
Details
EWMA function smooths a series of data based on a moving average with weights which decay exponentially.
For each \(y_t\) value the smoothed value is computed as $$z_t = \lambda y_t + (1-\lambda) z_{t-1}$$ where \(0 \le \lambda \le 1\) is the parameter which controls the weights applied.
Value
Returns a list with elements:
- x
ordered x-values
- y
smoothed y-values
- lambda
the smoothing parameter
- start
the starting value