Learn R Programming

fda.usc (version 2.1.0)

fdata.bootstrap: Bootstrap samples of a functional statistic

Description

provides bootstrap samples for functional data.

Usage

fdata.bootstrap(
  fdataobj,
  statistic = func.mean,
  alpha = 0.05,
  nb = 200,
  smo = 0,
  draw = FALSE,
  draw.control = NULL,
  ...
)

Value

  • statistic fdata class object with the statistic estimate from nb bootstrap samples.

  • dband Bootstrap estimate of (1-alpha)% distance.

  • rep.dist Distance from every replicate.

  • resamples fdata class object with the bootstrap resamples.

  • fdataobj fdata class object.

Arguments

fdataobj

fdata class object.

statistic

Sample statistic. It must be a function that returns an object of class fdata. By default, it uses sample mean func.mean. See Descriptive for other statistics.

alpha

Significance value.

nb

Number of bootstrap resamples.

smo

The smoothing parameter for the bootstrap samples as a proportion of the sample variance matrix.

draw

If TRUE, plot the bootstrap samples and the statistic.

draw.control

List that it specifies the col, lty and lwd for objects: fdataobj, statistic, IN and OUT.

...

Further arguments passed to or from other methods.

Author

Manuel Febrero-Bande, Manuel Oviedo de la Fuente manuel.oviedo@udc.es

Details

The fdata.bootstrap() computes a confidence ball using bootstrap in the following way:

  • Let \(X_1(t),\ldots,X_n(t)\) the original data and \(T=T(X_1(t),\ldots,X_n(t))\) the sample' statistic.

  • Calculate the nb bootstrap resamples \(\left\{X_{1}^{*}{(t)},\cdots,X_n^*(t)\right\}\), using the following scheme \(X_i^*(t)=X_i(t)+Z(t)\) where \(Z(t)\) is normally distributed with mean 0 and covariance matrix \(\gamma\Sigma_x\), where \(\Sigma_x\) is the covariance matrix of' \(\left\{X_1(t),\ldots,X_n(t)\right\}\) and \(\gamma\) is the smoothing parameter.

  • Let \(T^{*j}=T(X^{*j}_1(t),...,X^{*j}_n(t))\) the estimate using the \(j\) resample.

  • Compute \(d(T,T^{*j})\), \(j=1,\ldots,nb\). Define the bootstrap confidence ball of level \(1-\alpha\) as \(CB(\alpha)=X\in E\) such that \(d(T,X)\leq d_{\alpha}\) being \(d_{\alpha}\) the quantile \((1-\alpha)\) of the distances between the bootstrap resamples and the sample estimate.

The fdata.bootstrap function allows us to define a statistic calculated on the nb resamples, control the degree of smoothing by smo argument and represent the confidence ball with level \(1-\alpha\) as those resamples that fulfill the condition of belonging to \(CB(\alpha)\). The statistic used by default is the mean (func.mean) but also other depth-based functions can be used (see help(Descriptive)).

References

Cuevas A., Febrero-Bande, M. and Fraiman, R. (2007). Robust estimation and classification for functional data via projection-based depth notions. Computational Statistics 22, 3: 481-496.

Cuevas A., Febrero-Bande, M., Fraiman R. 2006. On the use of bootstrap for estimating functions with functional data. Computational Statistics and Data Analysis 51: 1063-1074.

Febrero-Bande, M., Oviedo de la Fuente, M. (2012). Statistical Computing in Functional Data Analysis: The R Package fda.usc. Journal of Statistical Software, 51(4), 1-28. https://www.jstatsoft.org/v51/i04/

See Also

See Also as Descriptive

Examples

Run this code
if (FALSE) {
data(tecator)
absorp<-tecator$absorp.fdata
# Time consuming
#Bootstrap for Trimmed Mean with depth mode
out.boot=fdata.bootstrap(absorp,statistic=func.trim.FM,nb=200,draw=TRUE)
names(out.boot)
#Bootstrap for Median with with depth mode
control=list("col"=c("grey","blue","cyan"),"lty"=c(2,1,1),"lwd"=c(1,3,1))
out.boot=fdata.bootstrap(absorp,statistic=func.med.mode,
draw=TRUE,draw.control=control)
}

Run the code above in your browser using DataLab