#Generate an iid normal series:
set.seed(123)
x <- rnorm(200)
#Compute lag of EqWMA(20) for x^2:
eqwma(x, p=2)
#Compute lag of log(EqWMA(30)) for abs(x)^1:
eqwma(x, length=30, p=1, log=TRUE, abs=TRUE)
#Compute lag of EqWMA(5) and lag of EqWMA(20) for x:
eqwma(x, length=c(5,20))Run the code above in your browser using DataLab