partial_cov: Partial Sample Estimates of the Covariance Function in...

Description Usage Arguments Details Value See Also Examples

View source: R/partial_cov.R

Description

This function computes the partial sum estimate of the covariance function in functional data analysis. It also generate the eigenvalues and eigenfunctions of the parial sum estimate, along with the coefficient matrix of the estimated covariance function.

Usage

1
partial_cov(fdobj, x = NULL)

Arguments

fdobj

A functional data object of class 'fd'

x

Fraction of the sample size that the partial sum is computed. This input must be in (0,1]. The default is x=1 which corresponds to the regular covariance function estimate in functional data analysis.

Details

This function simply estimates the covariance function based on the partial sum of the centered functional observations. The length of the sum is determined by x, and when x=1 this estimate corresponds to the regular covariance function estimates using the whole sample.

Value

eigen_val

Eigenvalues of the partial sum estimate of the covariance function

eigen_fun

Eigenfunctions of the partial sum estimate of the covariance function

coef_matrix

Coefficient matrix of the partial sum estimate of the covariance function

See Also

pca.fd

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
library(fda)
# generate functional data
fdata = fun_IID(n=100, nbasis=21)
# Estimated eigenvalues
e1 = partial_cov(fdata)$eigen_val
e2 = pca.fd(fdata, nharm = 21, centerfns = TRUE)$values
# e1 and e2 will both estimate the eigenvalues of the covariance
# operator based on the whole sample
# estimates using only 90% of the data
Cov = partial_cov(fdata, 0.9)

SonmezOzan/fChange_0.2.0 documentation built on May 17, 2019, 8:04 a.m.