View source: R/mrct_functions.R
mrct.ise | R Documentation |
Calculates the approximation of the integrated square error between the estimated covariance based on non-outlying curves of a data set determined by the MRCT estimator and the true kernel for one of the three outlier settings in the simulation study of \insertCiteoguamalam2023minimum;nobracketsmrct.
mrct.ise(data, outliers.est, model)
data |
Numeric matrix of a functional data set for which the esimator has to be calculated. Each row contains an observation. They are assumed to be observed on the same regular grid. |
outliers.est |
Integer vector containing the indices of outliers. |
model |
Integer. |
Numeric value containing the approximated integrated square error between estimated and theoretical covariance.
oguamalam2023minimummrct.
# Fix seed for reproducibility
set.seed(124)
# Sample outlying indices
cont.ind <- sample(1:100,size=10)
# Generate 100 curves on the interval [0,1] at 150 timepoints with 20% outliers.
y <- mrct.rgauss(x.grid=seq(0,1,length.out=150), N=100, model=1,
outliers=cont.ind, method="linear")
# Run MRCT
mrct.y <- mrct(data=y, h=0.75, alpha=0.1,
initializations=10, criterion="sum")
# Two additional curves are regarded as outlying according to the algorithm
mrct.y$theoretical.w %in% cont.ind
# Compare the ISE between true kernel and 1) true non-outliers,
# 2) estimated non-outliers and 3) the complete data
ise1 <- mrct.ise(data=y, outliers.est=cont.ind, model=1)
ise2 <- mrct.ise(data=y, outliers.est=mrct.y$theoretical.w, model=1)
ise3 <- mrct.ise(data=y, outliers.est=c(), model=1)
ise1; ise2; ise3
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.