d.boots {itdr} | R Documentation |
Bootstrap Estimation for Dimension (d) of Sufficient Dimension Reduction Subspaces.
Description
The function “d.boots()” estimates the dimension of the central mean subspace and the central subspaces in regression.
Usage
d.boots(y,x,wx=0.1,wy=1,wh=1.5,B=500,var_plot=FALSE,space="mean"
,xdensity="normal",method="FM")
Arguments
y |
The n-dimensional response vector. |
x |
The design matrix of the predictors with dimension n-by-p. |
wx |
(default 0.1). The tuning parameter for predictor variables. |
wy |
(default 1). The tuning parameter for the response variable. |
wh |
(default 1.5). The bandwidth of the kernel density estimation. |
B |
(default 500). Number of bootstrap samples. |
var_plot |
(default FALSE). If TRUE, it provides the dimension variability plot. |
space |
(default “mean”). The defalult is “mean” for the central mean subspace. Other option is “pdf” for estimating the central subspace. |
xdensity |
(default “normal”). Density function of predictor variables. Options are “normal” for multivariate normal distribution, “elliptic” for elliptical contoured distribution function, or “kernel” for estimating the distribution using kernel smoothing. |
method |
(default “FM”). The integral transformation method. “FM” for Fourier trans-formation method (Zhu and Zeng 2006), and “CM” for convolution transformation method (Zeng and Zhu 2010). |
Value
The outputs includes a table of average bootstrap distances between two subspaceses for each candidate value of d and the estimated value for d.
dis_d |
A table of average bootstrap distances for each candidate value of d. |
d.hat |
The estimated value for |
plot |
Provides the dimension variability plot if plot=TRUE. |
Examples
# Use dataset available in itdr package
data(automobile)
head(automobile)
automobile.na <- na.omit(automobile)
# prepare response and predictor variables
auto_y <- log(automobile.na[, 26])
auto_xx <- automobile.na[, c(10, 11, 12, 13, 14, 17, 19, 20, 21, 22, 23, 24, 25)]
auto_x <- scale(auto_xx) # Standardize the predictors
# call to the d.boots() function with required arguments
d_est <- d.boots(auto_y, auto_x, var_plot = TRUE, space = "pdf", xdensity = "normal", method = "FM")
auto_d <- d_est$d.hat