#load test data
data(mdr1)
fit<-mdr.cv(data=mdr1[,1:11], K=2, cv=5, ratio = NULL, equal = "HR", genotype = c(0, 1, 2)) #fit MDR with 5-fold cross-validation to a subset of the sample data, allowing for 1 to 2-way interactions
print(fit) #view the fitted mdr object
summary(fit) #create summary table of best MDR model
plot(fit, data=mdr1) #create contingency plot of best MDR model; may need to expand the plot window for large values of K
Run the code above in your browser using DataLab