bst.sel {bst} | R Documentation |
Function to select number of predictors
Description
Function to determine the first q predictors in the boosting path, or perform (10-fold) cross-validation and determine the optimal set of parameters
Usage
bst.sel(x, y, q, type=c("firstq", "cv"), ...)
Arguments
x |
Design matrix (without intercept). |
y |
Continuous response vector for linear regression |
q |
Maximum number of predictors that should be selected if |
type |
if |
... |
Details
Function to determine the first q predictors in the boosting path, or perform (10-fold) cross-validation and determine the optimal set of parameters. This may be used for p-value calculation. See below.
Value
Vector of selected predictors.
Author(s)
Zhu Wang
Examples
## Not run:
x <- matrix(rnorm(100*100), nrow = 100, ncol = 100)
y <- x[,1] * 2 + x[,2] * 2.5 + rnorm(100)
sel <- bst.sel(x, y, q=10)
library("hdi")
fit.multi <- hdi(x, y, method = "multi.split",
model.selector =bst.sel,
args.model.selector=list(type="firstq", q=10))
fit.multi
fit.multi$pval[1:10] ## the first 10 p-values
fit.multi <- hdi(x, y, method = "multi.split",
model.selector =bst.sel,
args.model.selector=list(type="cv"))
fit.multi
fit.multi$pval[1:10] ## the first 10 p-values
## End(Not run)
[Package bst version 0.3-24 Index]