# 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 = rbinom(100,1,pr)
###############################
### Run interaction model
###############################
require(correlbinom)
rho = 0.33
ntrees = 250
cbinom = correlbinom(rho, successprob = calculateBinomialP_Interaction(10, .5,2),
trials = ntrees, precision = 1024, model = 'kuk')
k.binom.rf <-k_binomialRF(X,y, fdr.threshold = .05,fdr.method = 'BY',
ntrees = ntrees,percent_features = .5,
cbinom_dist=cbinom,
sampsize=round(nrow(X)*rho))
# }
Run the code above in your browser using DataLab