fregre.bootstrap: Bootstrap regression

View source: R/fregre.bootstrap.r

fregre.bootstrapR Documentation

Bootstrap regression

Description

Estimate the beta parameter by wild or smoothed bootstrap procedure

Usage

fregre.bootstrap(
  model,
  nb = 500,
  wild = TRUE,
  type.wild = "golden",
  newX = NULL,
  smo = 0.1,
  smoX = 0.05,
  alpha = 0.95,
  kmax.fix = FALSE,
  draw = TRUE,
  ...
)

Arguments

model

fregre.pc, fregre.pls or fregre.basis object.

nb

Number of bootstrap samples.

wild

Naive or smoothed bootstrap depending of the smo and smoX parameters.

type.wild

Type of distribution of V in wild bootstrap procedure, see rwild.

newX

A fdata class containing the values of the model covariates at which predictions are required (only for smoothed bootstrap).

smo

If >0, smoothed bootstrap on the residuals (proportion of response variance).

smoX

If >0, smoothed bootstrap on the explanatory functional variable fdata (proportion of variance-covariance matrix of fdata object.

alpha

Significance level used for graphical option, draw=TRUE.

kmax.fix

The number of maximum components to consider in each bootstrap iteration. =TRUE, the bootstrap procedure considers the same number of components used in the previous fitted model. =FALSE, the bootstrap procedure estimates the best components in each iteration.

draw

=TRUE, plot the bootstrap estimated beta, and (optional) the CI for the predicted response values.

...

Further arguments passed to or from other methods.

Details

Estimate the beta parameter by wild or smoothed bootstrap procedure using principal components representation fregre.pc, Partial least squares components (PLS) representation fregre.pls or basis representation fregre.basis.
If a new curves are in newX argument the bootstrap method estimates the response using the bootstrap resamples.

If the model exhibits heteroskedasticity, the use of wild bootstrap procedure is recommended (by default).

Value

Return:

  • model fregre.pc, fregre.pls or fregre.basis object.

  • beta.boot functional beta estimated by the nb bootstrap regressions.

  • norm.boot norm of diferences beetween the nboot betas estimated by bootstrap and beta estimated by regression model.

  • coefs.boot matrix with the bootstrap estimated basis coefficients.

  • kn.boot vector or list of length nb with index of the basis, PC or PLS factors selected in each bootstrap regression.

  • y.pred predicted response values using newX covariates.

  • y.boot matrix of bootstrap predicted response values using newX covariates.

  • newX a fdata class containing the values of the model covariates at which predictions are required (only for smoothed bootstrap).

Author(s)

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

References

Febrero-Bande, M., Galeano, P. and Gonzalez-Manteiga, W. (2010). Measures of influence for the functional linear model with scalar response. Journal of Multivariate Analysis 101, 327-339.

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: fregre.pc, fregre.pls, fregre.basis, .

Examples

## Not run:  
data(tecator)
iest<-1:165
x=tecator$absorp.fdata[iest]
y=tecator$y$Fat[iest]
nb<-25  ## Time-consuming
res.pc=fregre.pc(x,y,1:6)
# Fix the compontents used in the each regression
res.boot1=fregre.bootstrap(res.pc,nb=nb,wild=FALSE,kmax.fix=TRUE)
# Select the "best" compontents used in the each regression
res.boot2=fregre.bootstrap(res.pc,nb=nb,wild=FALSE,kmax.fix=FALSE) 
res.boot3=fregre.bootstrap(res.pc,nb=nb,wild=FALSE,kmax.fix=10) 
## predicted responses and bootstrap confidence interval
newx=tecator$absorp.fdata[-iest]
res.boot4=fregre.bootstrap(res.pc,nb=nb,wild=FALSE,newX=newx,draw=TRUE)

## End(Not run)

fda.usc documentation built on Oct. 17, 2022, 9:06 a.m.