# NOT RUN {
data(etrait)
x<- as.matrix(mdat-1/2)
y<- as.matrix(traits)[,1:3]
v<- list()
upper<- list()
for(k in 1:ncol(y)){
v[[k]]<- numeric(0)
upper[[k]]<- 1:ncol(x)
}
# }
# NOT RUN {
o<- surStep(y, x, v=v, upper=upper, k=19, direction="both",
iter=250, max.terms=250, steps=2000, tol=1e-12)
neps<- 6 # suppose there are 6 possible epistatic effects
oeps<- sureEps(y, x, o$v, k=qchisq(1-0.05/neps,1), direction="backward",
iter=250, max.terms=200, steps=1000, tol=1e-12)
# }
Run the code above in your browser using DataLab