Usage
eqwma(x, length = 5, lag = 1, start = 1, p = 1, log = FALSE, abs = FALSE, as.vector = TRUE)
leqwma(x, length = 5, lag = 1, start = 1, p = 2, as.vector=FALSE)
Arguments
x
numeric vector, time-series or zoo
object. Missing values in the beginning and/or at the end of the series is allowed, as they are removed with the na.trim
command length
integer or vector of integers each equal to or greater than 1. The length or lengths of the moving window or windows of averages
lag
integer equal to or greater than 0. If 0, then the moving averages are not lagged
start
integer equal to or greater than 1 (default: start=1, i.e. the first observation). Where to start the moving windows of averages
p
numeric value greater than zero. The exponent p in x^p for eqwma
and in abs(x)^p for leqwma
log
logical. If TRUE, then the logarithm of the moving average is returned. If FALSE (default), then the logarithm is not applied
abs
logical. If TRUE, then x is transformed to absolute values before x is exponentiated
as.vector
logical. If TRUE, then a univariate series is returned as a vector. If FALSE, then a univariate series is returnes as a matrix. Note: multivariate series are always returned as a matrix