multiNoise: Generate multichannel noise

Description Usage Arguments Details See Also Examples

View source: R/makeFunctions.R

Description

Generate a matrix of multichannel (possibly long memory) noise variables

Usage

1
multiNoise(n, sigma = 1, alpha = length(sigma), ...)

Arguments

n

An integer specifying the number of observations per channel.

sigma

A vector giving the noise levels (standard deviation) for each channel in the multichannel model (see details).

alpha

A vector specifying the dependence level in each channel.

...

Additional arguments to pass to the fracdiff package to tightly control the long memory noise.

Details

Generates a n by m matrix of noise variables. Long memory variables can be generated by the use of the optional fracdiff package (if installed). The dependence is specified using the alpha parameter where alpha = 2 - 2H where H = Hurst parameter. Long memory is ensured when alpha is between 0 and 1 (H between 1/2 and 1). If alpha is a single element and sigma has more than one element (multichannel), then the same dependence level of alpha is used amongst all of the channels. Otherwise the size of alpha and sigma should be the same size.

See Also

sigmaSNR

Examples

1
2
3
4
5
6
7
8
9
n <- 1024
m <- 3
signal <- makeLIDAR(n)
blur <- gammaBlur(n, c(0.5, 0.75, 1), rep(1, m))
X <- blurSignal(signal, blur)
SNR <- 10*1:3
sigma <- sigmaSNR(X, SNR)
E <- multiNoise(n, sigma, alpha = c(0.5, 0.75, 1))
matplot(X + E, type = 'l')

mwaved documentation built on July 13, 2017, 5:03 p.m.