generate.noise: Generating random noise.

Description Usage Arguments Examples

Description

Function to generate different kinds of random noise.

Usage

1
2
3
generate.noise(t, type = 1, mu = 0, theta = 0, kappa = Inf,
  sigma = 0.2, sigma2 = 1e-04, seed = sample(2500, 1),
  tfun = function(t) t/4)

Arguments

t

Numeric vector where to evaluate noise.

type

Numeric value (1,...,8).

mu

Numeric value.

theta

Numeric value.

kappa

Numeric value.

sigma

Numeric value.

sigma2

Numeric value. Smaller SE for contaminated noise.

seed

If certain seed wanted.

tfun

For generating noise with dynamically changing parameters.

Examples

1
2
3
4
5
t = generate.t(m = 50)
w = generate.noise(t); plot(t, w , type="h", main = "Gaussian noise")
w = generate.noise(t, type = 2); plot(t, w , type="h", main = "Laplace noise")
w = generate.noise(t, type = 3); plot(t, w , type="h", main = "Contaminated noise")
w = generate.noise(t, type = 4); plot(t, w , type="h", main = "Uniform noise")

helenecharlotte/rSplines documentation built on May 17, 2019, 3:24 p.m.