RunningVar: Fast Running Variance Computation

Description Usage Arguments Details Value Examples

Description

Computes running sample variance of a sequence in a fixed width window. Uses convolution implementation via Fast Fourier Transform.

Usage

1
RunningVar(x, W, circular = FALSE)

Arguments

x

A numeric vector.

W

A numeric scalar; width of x window over which sample variance is computed.

circular

Logical; whether running sample variance is computed assuming circular nature of x sequence (see Details).

Details

The length of output vector equals the length of x vector. Parameter circular determines whether x sequence is assumed to have a circular nature. Assume l_x is the length of sequence x, W is a fixed length of x sequence window.

If circular equals TRUE then

If circular equals FALSE then

Value

A numeric vector.

Examples

1
2
3
x <- rnorm(10)
RunningVar(x, W = 3, circular = FALSE)
RunningVar(x, W = 3, circular = TRUE)

martakarass/convo documentation built on May 16, 2019, 11:08 a.m.