# NOT RUN {
set.seed(324)
###############################
### Generate simulation data
###############################
X = matrix(rnorm(1000), ncol=10)
trueBeta= c(rep(10,5), rep(0,5))
z = 1 + X %*% trueBeta
pr = 1/(1+exp(-z))
y = as.factor(rbinom(100,1,pr))
###############################
### Run binomialRF
###############################
require(correlbinom)
rho = 0.33
ntrees = 250
cbinom = correlbinom(rho, successprob = calculateBinomialP(10, .5), trials = ntrees,
precision = 1024, model = 'kuk')
binom.rf <-binomialRF(X,y, fdr.threshold = .05,fdr.method = 'BY',
ntrees = ntrees,percent_features = .5,
keep.both=FALSE, user_cbinom_dist=cbinom,
sampsize=round(nrow(X)*rho))
print(binom.rf)
# }
Run the code above in your browser using DataLab