Learn R Programming

fdapace (version 0.6.0)

MakeSparseGP: Create a sparse Functional Data sample for a Gaussian Process

Description

Functional data sample of size n, sparsely sampled from a Gaussian process

Usage

MakeSparseGP(
  n,
  rdist = runif,
  sparsity = 2:9,
  muFun = function(x) rep(0, length(x)),
  K = 2,
  lambda = rep(1, K),
  sigma = 0,
  basisType = "cos",
  CovFun = NULL
)

Value

TODO

Arguments

n

number of samples to generate.

rdist

a sampler for generating the random design time points within [0, 1].

sparsity

A vector of integers. The number of observation per sample is chosen to be one of the elements in sparsity with equal chance.

muFun

a function that takes a vector input and output a vector of the corresponding mean (default: zero function).

K

scalar specifying the number of basis to be used (default: 2).

lambda

vector of size K specifying the variance of each components (default: rep(1,K)).

sigma

The standard deviation of the Gaussian noise added to each observation points.

basisType

string specifying the basis type used; possible options are: 'sin', 'cos' and 'fourier' (default: 'cos') (See code of 'CreateBasis' for implementation details.)

CovFun

an alternative specification of the covariance structure.