generate.noise: Generate random noise. Function to generate different kinds...

Usage Arguments Examples

View source: R/simulate-data-fun.R

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/L1splines documentation built on May 17, 2019, 3:24 p.m.