set.seed(0)
b <- c(4,4,4,-6*sqrt(2))
n=150
p=200
truerho=0.5
corrmat=diag(rep(1-truerho, p))+matrix(truerho, p, p)
corrmat[,4]=sqrt(truerho)
corrmat[4, ]=sqrt(truerho)
corrmat[4,4]=1
cholmat=chol(corrmat)
x=matrix(rnorm(n*p, mean=0, sd=1), n, p)
x=x%*%cholmat
feta=x[, 1:4]%*%b
fprob=exp(feta)/(1+exp(feta))
y=rbinom(n, 1, fprob)
nsis=floor(n/log(n)/4)
binom.van.sis=GLMvanISISscad(x, y, nsis, family=binomial(), tune.method='BIC')
binom.var.sis=GLMvarISISscad(x, y, nsis, family=binomial(), vartype='Second',
tune.method='BIC')
#####compare the result
binom.van.sis$SIS
binom.van.sis$ISIS
binom.var.sis$SIS
binom.var.sis$ISIS
Run the code above in your browser using DataLab