tf_rgp {tf}R Documentation

Gaussian Process random generator

Description

Generates n realizations of a zero-mean Gaussian process. The function also accepts user-defined covariance functions (without "nugget" effect, see cov), The implemented defaults with scale parameter \phi, order o and nugget effect variance \sigma^2 are:

Usage

tf_rgp(
  n,
  arg = 51L,
  cov = c("squareexp", "wiener", "matern"),
  scale = diff(range(arg))/10,
  nugget = scale/200,
  order = 1.5
)

Arguments

n

how many realizations to draw

arg

vector of evaluation points (arg of the return object). Defaults to (0, 0.02, 0.04, ..., 1). If given as a single integer (don't forget the L...), creates a regular grid of that length over (0,1).

cov

type of covariance function to use. Implemented defaults are "squareexp", "wiener", "matern", see Description. Can also be any vectorized function returning Cov(x(t), x(t')) without nugget effect for pairs of inputs t and t'.

scale

scale parameter (see Description). Defaults to the width of the domain divided by 10.

nugget

nugget effect for additional white noise / unstructured variability. Defaults to scale/200 (so: very little white noise).

order

order of the Matèrn covariance (if used, must be >0), defaults to 1.5. The higher, the smoother the process. Evaluation of the covariance function becomes numerically unstable for large (>20) order, use "squareexp".

Value

an tfd-vector of length n

See Also

Other tidyfun RNG functions: tf_jiggle()


[Package tf version 0.3.4 Index]