kzsv {kza} | R Documentation |
Kolmogorov-Zurbenko Adaptive filter with Sample Variance.
Description
Sample variance of a Kolmogorov-Zurbenko adaptive filter.
Usage
kzsv(y=NULL, kza=NULL, kz=NULL, q, k=3, m=0, tol=1.0e-5)
Arguments
y |
The raw data to be analyzed. |
kza |
A vector of the resultant time series from kza function. |
kz |
A moving average result from the kz function. |
q |
The half length of the window size for the filter. |
k |
The number of iterations to run kz and kza functions. |
m |
Minimum size of filtering window. |
tol |
The smallest value to accept as nonzero. |
Examples
x <- c(rep(0,1000),rep(0.5,1000),rep(0,1000))
v <- x + rnorm(n = 3000, sd = 1.0) # normally-distributed random variates
z <- kza(v,q=200,m=10)
par(mfrow=c(3,1))
plot(v,type="l")
plot(z,type="l")
s <- kzsv(y=z,kza=z,q=200)
plot(s/mean(s),type="l")
[Package
kza version 1.00
Index]