Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

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
)

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.

Value

TODO


fdapace

Functional Data Analysis and Empirical Dynamics

v0.5.6
BSD_3_clause + file LICENSE
Authors
Cody Carroll [aut, cre] (<https://orcid.org/0000-0003-3525-8653>), Alvaro Gajardo [aut], Yaqing Chen [aut], Xiongtao Dai [aut], Jianing Fan [aut], Pantelis Z. Hadjipantelis [aut], Kyunghee Han [aut], Hao Ji [aut], Shu-Chin Lin [ctb], Paromita Dubey [ctb], Hans-Georg Mueller [cph, ths, aut], Jane-Ling Wang [cph, ths, aut]
Initial release
2021-01-10,

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.