data(heart.data)
attach(heart.data)
n=length(y)
p=dim(x)[2]
set.seed(0)
trainset=sample(1:n,floor(n*2/3))
testset=setdiff(1:n,trainset)
traindata=list(x=x[trainset,],y=y[trainset])
fit <- SIS(traindata, family=binomial(), xtune=x[testset,], ytune=y[testset])
detach(heart.data)
Run the code above in your browser using DataLab