Learn R Programming

fda.usc (version 0.9.4)

fregre.bootstrap: Bootstrap regression

Description

Estimate the beta parameter by bootstrap

Usage

fregre.bootstrap(model,nb=500,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
newX
(optional), new functional explanatory data of fdata class .
smo
Smoothing parameter as a proportion of response variance.
smoX
Smoothing parameter for fdata object as a proportion of variance-covariance matrix of the explanatory functional variable.
alpha
Significance level.
kmax.fix
The maximum number of principal comoponents, partial least squares components or number of basis is fixed by model object.
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 newX sa smoothed bootstrap method is used to ....estimate valores predichos de la variable respuesta.

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.

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]
res.pc=fregre.pc(x,y,1:6)
res.basis=fregre.basis(x,y)
res.pls=fregre.pls(x,y)


newx=tecator$absorp.fdata[-c(1:129)]
newy=tecator$y$Fat[-c(1:129)]
res.boot=fregre.bootstrap(res.pc,nb=5,newX=newx,kmax.fix=TRUE)
res.boot1=fregre.bootstrap(res.basis,nb=5,newX=newx,kmax.fix=TRUE)
res.boot2=fregre.bootstrap(res.pls,nb=5,newX=newx,kmax.fix=TRUE)

predy=predict(res.pc,newx)
plot(predy-newy,col=2)

# predicted responses by bootstrap
#res.boot$ypred

Run the code above in your browser using DataLab