set.seed(123)
#require(gRbase) #for faster computations in the internal functions
require(hash)
#simulate a dataset with continuous data
dataset <- matrix( runif(1000 * 20, 1, 100), ncol = 20 )
#define a simulated class variable
target <- rpois(1000, 10)
a1 <- fs.reg(target, dataset, threshold = 0.05, test = NULL, stopping = "BIC", tol = 2,
robust = FALSE, ncores = 1 )
a2 <- MMPC(target, dataset)
a3 <- fs.reg(target, dataset, threshold = 0.05, test = NULL, stopping = "BIC", tol = 2,
robust = TRUE, ncores = 1 )
a4 <- MMPC(target, dataset, test="testIndReg", robust= TRUE)
target <- rbinom(1000, 1,0.6)
b1 <- fs.reg(target, dataset, threshold = 0.05, test = NULL, stopping = "BIC", tol = 2,
robust = FALSE, ncores = 1 )
b2 <- MMPC(target, dataset)
Run the code above in your browser using DataLab