Learn R Programming

fda.usc (version 1.1.0)

fregre.bootstrap: 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
=TRUE, wild bootstrap. =FALSE, smoothed bootstrap.
type.wild
Type of distribution of V in wild bootstrap procedure, see rwild.
smo
(only for smoothed bootstrap) Smoothing parameter as a proportion of response variance.
smoX
(only for smoothed bootstrap) Smoothing parameter for fdata object as a proportion of variance-covariance matrix of the explanatory functional variable.
newX
(optional, only for smoothed bootstrap), new functional explanatory data of fdata class .
alpha
Significance level.
kmax.fix
=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.

Value

  • Return:
  • beta.bootFunctional beta estimated by bootstrap method.
  • norm.bootnorm of diferences beetween the nboot betas estimated by bootstrap and beta estimated by regression model.
  • coefs.bootnboot X nbasis of bootstrap estimated coefficients of basis
  • knn.fixnb basis, CP or PLS factors selected in each regression.
  • y.prednboot X n matrix of predicted response values.
  • y.bootnboot X n matrix of bootstrap predicted response values.

Details

Compute the beta estimated in influence.fdata for functional regression 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).

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. http://www.jstatsoft.org/v51/i04/

See Also

See Also as: fregre.pc, fregre.pls, fregre.basis, .

Examples

Run this code
data(tecator)
x=tecator$absorp.fdata[1:129]
y=tecator$y$Fat[1:129]
nb<-100
## Time-consuming
# res.pc=fregre.pc(x,y,1:6)
# res.boot1=fregre.bootstrap(res.pc,nb=nb,wild=FALSE,kmax.fix=TRUE)

## predicted responses by bootstrap  with FPC and FPLS basis
# newx=tecator$absorp.fdata[-c(1:129)]
# newy=tecator$y$Fat[-c(1:129)]
# res.pls=fregre.pls(x,y)
# res.boot2=fregre.bootstrap(res.pls,nb=nb,wild=FALSE,newX=newx,kmax.fix=TRUE)
# res.boot3=fregre.bootstrap(res.pc,nb=nb,wild=FALSE,newX=newx,kmax.fix=TRUE)

Run the code above in your browser using DataLab