Learn R Programming

kza (version 0.6-1)

kzf: Kolmogorov-Zurbenko adaptive filter

Description

kzf determines Kolmogorov-Zurbenko adpative filter. The adaptive filter is used by kzsv for sample variance.

Usage

kzf(v, q, d, k =3)

Arguments

v
A vector of the time series
q
The half length of the window size for the filter
d
adaptive filter
k
Number of iterations, default = 3

Examples

Run this code
x <- c(rep(0,1000),rep(0.5,1000),rep(0,1000))
set.seed(1)

v <- x + rnorm(n = 3000, sd = 1.0)    # normally-distributed random variates

z <- kza(v,100)
z <- z[[1]]

d <- rep(0,3000)
f <- kzf(v,100,d)
f <- f[[5]]

s <- kzsv(z,100,f)
plot(s[[1]],type="l")

Run the code above in your browser using DataLab