cov_ogk: Robust covariance function esimation for partially observed...

View source: R/cov_ogk.R

cov_ogkR Documentation

Robust covariance function esimation for partially observed functional data

Description

The location and scale functions are computed via pointwise M-estimator, and the covariance function is obtained via robust pairwise computation based on Orthogonalized Gnanadesikan-Kettenring (OGK) estimation. Additionally, bivariate Nadaraya-Watson smoothing is applied for smoothed covariance surfaces.

Usage

cov_ogk(
  X,
  type = c("huber", "bisquare", "tdist"),
  MM = TRUE,
  smooth = TRUE,
  grid = NULL,
  bw = NULL,
  cv = FALSE,
  df = 3,
  cv_optns = list(bw_cand = NULL, K = 5, ncores = 1)
)

Arguments

X

a n x p matrix. It allows NA.

type

the option for robust dispersion estimator. "huber", "bisquare", and "tdist" are supported.

MM

the option for M-scale estimator in GK identity. If it is FALSE, the same method using type is used, that is the iterative algorithm. The closed form solution using method of moments can be used when MM == TRUE. Defalut is TRUE.

smooth

If it is TRUE, bivariate Nadaraya-Watson smoothing is performed using fields::smooth2d(). Default is TRUE.

grid

a vector containing the observed timepoints

bw

a bandwidth when smooth = TRUE.

cv

If it is TRUE, K-fold cross-validation is performed for the bandwidth selection when smooth = TRUE.

df

the degrees of freedm when type = "tdist".

cv_optns

the options of K-fold cross-validation when cv = TRUE. See Details.

Details

The options of cv_optns:

bw_cand

a vector contains the candidates of bandwidths for bivariate smoothing.

K

the number of folds for K-fold cross validation.

ncores

the number of cores on foreach for parallel computing.

Value

a list contatining as follows:

mean

the vector containing the robust mean function.

cov

a matrix containing robust covariance function.

bw

a bandwidth of the bivariate smoothing selected from K-fold cross-validation

cv.obj

cv.obj from bandwidth selection

References

Park, Y., Kim, H., & Lim, Y. (2022+). Functional principal component analysis for partially observed elliptical process, Under review.

Maronna, R. A., & Zamar, R. H. (2002). Robust estimates of location and dispersion for high-dimensional datasets. Technometrics, 44(4), 307-317.

Examples

set.seed(100)
x.list <- sim_delaigle(n = 100,
                       type = "partial",
                       out.prop = 0.2,
                       dist = "normal")
x <- list2matrix(x.list)
cov.obj <- cov_ogk(x,
                   type = "huber",
                   bw = 0.1)
mu.ogk.sm <- cov.obj$mean
cov.ogk.sm <- cov.obj$cov


statKim/robfpca documentation built on April 15, 2023, 10:12 p.m.