Learn R Programming

MDR (version 1.2)

boot.error: Function to calculate a post-hoc prediction estimate of classification error adjusted for population prevalence using bootstrap resampling

Description

After fitting an MDR object and obtaining a best model, calculate an estimate of classification error that has been adjusted for retrospective sampling and accounts for disease prevalence using a bootstrap, as implemented in Winham SJ and Motsinger-Reif AA, 2010, "The effect of retrospective sampling on estimates of prediction error for multifactor dimensionality reduction," Annals of Human Genetics.

Usage

boot.error(data, prev, model, hr, b, genotype = c(0, 1, 2))

Arguments

data
the dataset; an n by (p+1) matrix where the first column is the binary response vector (coded 0 or 1) and the remaining columns are the p SNP genotypes (coded numerically)
prev
an estimate of population prevalence (from prior studies, etc.)
model
a numeric vector of the final MDR model loci
hr
vector of binary indicators for high-risk/low-risk of the genotype combinations of the final model loci
b
number of bootstrap samples
genotype
a numeric vector of possible genotypes arising in data; default is c(0,1,2), but this vector can be longer or shorter depending on if more or fewer than three genotypes are possible

Value

A list containing:
classification error estimate
post-hoc prediction estimate of classification error adjusted for prevalence, measured as a percentage
classification accuracy estimate
post-hoc prediction estimate of classification accuracy (100-classification error) adjusted for prevalence
...

Details

MDR provides a prediction error estimate of the final model calculated from retrospective data. To provide a prospective prediction estimate, an accurate estimate of the population prevalence rate must be incorporated.

References

Ritchie MD et al (2001). Multifactor-dimensionality reduction reveals high-order interactions among estrogen-metabolism genes in sporadic breast cancer. Am J Hm Genet 69(1): 138-147.

Winham SJ and Motsinger-Reif AA (2010). The effect of retrospective sampling on estimates of prediction error for multifactor dimensionality reduction. Annals of Human Genetics.

See Also

mdr.cv, mdr.3WS, mdr.ca.adj

Examples

Run this code
#load test data
data(mdr1)

#this runs mdr with 5-fold cross-validation on a subset of the sample data, considering all pairwise combinations (K=2)
fit<-mdr.cv(mdr1[1:11],K=2,cv=5) 

#calculates bootstrap estimate from b=100 bootstrap samples of the sample data for the previously fit MDR object 'fit', assuming the population prevalence is 10%
boot.error(mdr1,prev=0.10, model=fit$'final model', hr=fit$'high-risk/low-risk', b=100)

Run the code above in your browser using DataLab