BootstrapData: BootstrapData

Description Usage Arguments Value Author(s) References Examples

Description

BootstrapData is a function that calculates the bootstrap response based on Yhat

Usage

1
2
3
4
BootstrapData (Y.learn, 
               Y.learn.hat, 
               Resampling.Method = "homoscedatic", 
               NB = 100)

Arguments

Y.learn

n response values of the learning set

Y.learn.hat

n prediction of the response values of the learning set

Resampling.Method

Bootstrap method: "homoscedastic" (default), "wild.continuous", and "wild.twopoint"

NB

Number of bootstrap samples

Value

W n x NB-Matrix of bootstrapped response.

Author(s)

Simon Mueller simon.mueller@mathematik.uni-stuttgart.de

References

Ferraty, F., Van Keillegom, I., and Vieu, P. On the Validity of the Bootstrap in Non-Parametric Functional Regression. Scandinavian Journal of Statistics, Vol. 37 (2010), pp. 286-306.

Davidson, J., Monticini, A., and Peel, D. Implementing the wild bootstrap using a two-point distribution. Economics Letters, Vol. 96, No. 3. (2007), pp. 309-315.

Mammen, E. Resampling Methods for Nonparametric Regression. In Smoothing and Regres- sion: Approaches, Computation, and Application, M. G. Schimek, Ed. John Wiley, 2000.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# functional data sets
library (fds)

# fat spectrum dataset
Y <- Fatvalues
X <- t(Fatspectrum$y)

# setup semimetric parameters
semimetric.params <- c()
semimetric.params$q <- 2
semimetric.params$nknot  <- 20
semimetric.params$range.grid  <- c (min (Fatspectrum$x), 
                                    max (Fatspectrum$x))

# learn and testsample
learn <- 1:160
test <- 161:215

# parameter estimation and prediction by cross-validation
Learn.Fat.CV <- FuNopaRe (X[learn, ], 
                          Y[learn], 
                          semimetric = "Deriv", 
                          semimetric.params, 
                          bandwidth = "CV")

method.params <- c()
method.params$NB <- 100
method.params$Resampling.Method <- "homoscedatic"
method.params$neighbours <- 20
method.params$alpha <- 0.05
Predict.Fat.CV <- predict (Learn.Fat.CV, 
                           X[test, ], 
                           method.params = method.params,
                           Bootstrapping = TRUE)

plot (Predict.Fat.CV$Prediction, Y[161:215])                          

sipemu/Nonparametric-Functional-Data-Analysis documentation built on May 29, 2019, 10:10 p.m.