noise: noise

Description Usage Arguments Value References Examples

Description

A noise generator

Usage

1
noise(n, len, ...)

Arguments

n

number of iterations

len

an FLQuant

sd

standard deviation

b

autocorrelation parameter, a real number in [0,1]

trunc

get rid of first values equal to trunc, i.e. to allow burn in

Value

A vector with autocorrelation equal to B.

References

Ranta and Kaitala 2001 Proc. R. Soc. vt = b * vt-1 + s * sqrt(1 - b^2) s is normally distributed random variable with mean = 0 b is the autocorrelation parameter

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
## Not run: 
white <- noise(1000,sd=.3,b=0)
plot(white)
acf(white)

red <- noise(1000,sd=.3,b=0.8)
plot(red)
acf(white)

blue <- noise(1000,sd=.3,b=-0.8)
plot(blue)
acf(blue)

## End(Not run)

laurieKell/lh documentation built on May 20, 2019, 7:59 p.m.