reg.fd: Sample Regular Functional Data In synfd: Synthesize Dense or Sparse Functional Data/Snippets

Description

Sample Regular Functional Data

Usage

 ``` 1 2 3 4 5 6 7 8 9 10``` ```reg.fd( mu = 0, X = wiener.process(), n = 100, m = 51, sig = NULL, snr = 5, domain = c(0, 1), grid = seq(domain[1], domain[2], length.out = m) ) ```

Arguments

 `mu` function, scalar or a vector defining the mean function; default value: `0`. `X` centered stochastic process defined by a function of the form `X(tObs,n)` and returning `n*length(tObs)` matrix, where each row represents observations from a trajectory. Default value: `wiener.process()`. `n` sample size; default value: `100`. `m` sampling rate; ignored if `grid` is specified; default value: `51`. `sig` standard deviation of measurement errors; if `NULL` then determined by `snr`. `snr` signal to noise ratio to determine `sig`; default value: `5`. `domain` the domain; default value: `c(0,1)`. `grid` vector of design points; default value: `NULL`.

Value

a list with the following members

`t`

a vector of design points sorted in increasing order.

`y`

`n*m` matrix; each row represents observations from a trajectory.

and with attributes `sig`, `snr`, `domain`, `grid` and

y0

`n*m` matrix of observations without measurement errors.

Examples

 ```1 2 3 4``` ```Y <- reg.fd() Y <- reg.fd(mu=1, X=gaussian.process(), n=10, m=20) Y <- reg.fd(mu=cos, X=kl.process(),n=100, m=20) Y <- reg.fd(mu=cos, X=kl.process(distribution='EXPONENTIAL'),n=100, m=20) ```

synfd documentation built on July 1, 2020, 6:04 p.m.