This function performs the estimation of the covariance of a set of curves using smoothing splines.

covariance_ss(curves, grid, nbasis = 5, center = TRUE, nodiag = TRUE)

Arguments

curves

list, where each element represents a curve. Each curve have to be defined as a list with two entries:

  • $t Sampling points

  • $x Observed points.

grid

Vector, sampling points at which estimate the covariance.

nbasis

Integer (default = 5), number of basis to use for the splines.

center

Boolean (default = TRUE), center the data?

nodiag

Boolean (default = TRUE), should the diagonal be removed from the fitting of the model?

Value

Matrix representing the covariance surface.

References

Cai, T., Yuan, M. (2010) - Nonparametric covariance function estimation for functional and longitudinal data. University of Pennsylvania and Georgia institute of technology