RunningSd: Fast Running Standard Deviation Computation

Description Usage Arguments Details Value Examples

Description

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

Usage

1
RunningSd(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 standard deviation 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)
RunningSd(x, 3, circular = FALSE)
RunningSd(x, 3, circular = FALSE)

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