Git Product home page Git Product logo

max-accuracy-genetic-pred's Introduction

max-accuracy-genetic-pred

Code to accompany the paper: Dreyfuss JM$, Levner D$, Galagan JE, Church GM, Ramoni MF. How accurate can genetic predictions be? BMC Genomics. 2012 Jul 24;13:340. doi: 10.1186/1471-2164-13-340. PubMed PMID: 22827772; PubMed Central PMCID: PMC3534619 [$Equal contribution]. http://bmcgenomics.biomedcentral.com/articles/10.1186/1471-2164-13-340.

To use these algorithms, call the functions: maxAUC, optSe, and/or optSp.

maxAUC returns the maximal AUC given:
k=prevalence
pve=proportion of variance explained (e.g. heritability)
n.bins=number of bins (default: 100)

optSe returns the optimal (maximal or minimal) sensitivity given:
k=prevalence
pve=proportion of variance explained (e.g. heritability)
sp=specificity
n.bins=number of bins (default: 1000)
direction="max" or "min" (default: "max")
thresh.vector=vector of thresholds in terms of bins (default: integer sequence from 1 to n.bins by 10)

optSp returns the optimal (maximal or minimal) specificity given:
k=prevalence
pve=proportion of variance explained (e.g. heritability)
se=sensitivity
n.bins=number of bins (default: 1000)
direction="max" or "min" (default: "max")
thresh.vector=vector of thresholds in terms of bins (default: integer sequence from 1 to n.bins by 10)

PARAMETERS
k=prevalence. 0<=k<=1.
pve=proportion of variance explained (e.g. heritability). 0<=pve<=1.
se=sensitivity. 0<=se<=1.
sp=specificity. 0<=sp<=1.
n.bins=number of bins. Positive integer corresponding to ‘b’ in Detailed methods.
direction="max" or "min". Maximize or minimize sensitivity or specificity.
thresh.vector=vector of thresholds in terms of bins (default: integer sequence from 1 to n.bins by 10). This corresponds to ‘t’ in Detailed methods; people whose risk is >= threshold/n.bins test positive. Thresholds should be positive integers <= n.bins.

EXAMPLES
Two examples follow. The commented-out numbers on the right-hand side are the numerical results I got when using: R version 2.12.1 (2010-12-16)

##R code
#breast cancer
k <- 0.04; pve <- 0.11; sp <- 0.99; se <- 0.2429554
maxAUC(k=k, pve=pve) #0.8935785
optSe(k=k, pve=pve, sp=sp) #0.2429554
optSp(k=k, pve=pve, se=se) #0.99

#T2D
k <- 0.13; pve <- 0.26; sp <- 0.99; se <- 0.3553533
maxAUC(k=k, pve=pve) #0.8882527
optSe(k=k, pve=pve, sp=sp) #0.3553533
optSp(k=k, pve=pve, se=se) #0.99
##end R code

max-accuracy-genetic-pred's People

Contributors

jdreyf avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.