mc.wbart.gse {BART}  R Documentation 
Here we implement the global SE method for variable selection in nonparametric survival analysis with BART. Unfortunately, the method is very computationally intensive so we present some tradeoffs below.
mc.wbart.gse( x.train, y.train,
P=50L, R=5L, ntree=20L, numcut=100L, C=1, alpha=0.05,
k=2.0, power=2.0, base=0.95,
ndpost=2000L, nskip=100L,
printevery=100L, keepevery=1L, keeptrainfits=FALSE,
seed=99L, mc.cores=2L, nice=19L
)
x.train 
Explanatory variables for training (in sample)
data. 
y.train 
The continuous outcome. 
P 
The number of permutations: typically 50 or 100. 
R 
The number of replicates: typically 5 or 10. 
ntree 
The number of trees. In variable selection, the number of trees is smaller than what might be used for the best fit. 
numcut 
The number of possible values of c (see usequants).
If a single number if given, this is used for all variables.
Otherwise a vector with length equal to ncol(x.train) is required,
where the 
C 
The starting value for the multiple of SE. You should not need to change this except in rare circumstances. 
alpha 
The global SE method relies on simultaneous 1 
k 
k is the number of prior standard deviations 
power 
Power parameter for tree prior. 
base 
Base parameter for tree prior. 
ndpost 
The number of posterior draws after burn in. In the global SE method, generally, the method is repeated several times to establish the variable count probabilities. However, we take the alternative approach of simply running the MCMC chain longer which should result in the same stabilization of the estimates. Therefore, the number of posterior draws in variable selection should be set to a larger value than would be typically anticipated for fitting. 
nskip 
Number of MCMC iterations to be treated as burn in. 
printevery 
As the MCMC runs, a message is printed every printevery draws. 
keepevery 
Every 
keeptrainfits 
If 
seed 

mc.cores 
Number of cores to employ in parallel. 
nice 
Set the job priority. The default priority is 19: priorities go from 0 (highest) to 19 (lowest). 
mc.wbart.gse
returns a list.
Bleich, J., Kapelner, A., George, E.I., and Jensen, S.T. (2014). Variable selection for BART: an application to gene regulation. The Annals of Applied Statistics, 8:175081.
## Not run:
library(ElemStatLearn)
data(phoneme)
x.train < matrix(NA, nrow=4509, ncol=257)
dimnames(x.train)[[2]] < c(paste0('x.', 1:256), 'speaker')
x.train[ , 257] < as.numeric(phoneme$speaker)
for(j in 1:256) x.train[ , j] < as.numeric(phoneme[ , paste0('x.', j)])
gse < mc.wbart.gse(x.train, as.numeric(phoneme$g), mc.cores=5, seed=99)
## important variables
dimnames(x.train)[[2]][gse$which]
## End(Not run)