Learn R Programming

QQperm (version 1.0.1)

Permutation Based QQ Plot and Inflation Factor Estimation

Description

Provides users the necessary utility functions to generate permutation-based QQ plots and also estimate inflation factor based on the empirical NULL distribution. While it has general utility, it is particularly helpful when the skewness of the Fisher's Exact test in sparse data situations with imbalanced case-control sample sizes renders the reliance on the uniform chi-square expected distribution inappropriate.

Copy Link

Version

Install

install.packages('QQperm')

Monthly Downloads

24

Version

1.0.1

License

GPL (>= 2)

Maintainer

Last Published

October 9th, 2016

Functions in QQperm (1.0.1)

QQperm

QQperm: A package for permutation-based QQ plots and inflation factor estimates.
example.data

An example collapsing data matrix and the associated case/control status
example.Ps

Distributions of expected and observed P-values from the igm.data dataset.
estlambda2

Estimate the inflation factor for a distribution of observed P-values or 1-df chi-square test.
igm.read.data

Read sample file and genotype collapsing matrix in IGM (Insitute for Genomic Medicine, Columbia University) format.
toy.data

An example collapsing data matrix and the associated case/control status
igm.get.pvalues

The permutation-based empirical NULL distribution of P-values is generated through label switching and permutation of the true case/control assignment. To achieve this, for a given matrix it randomly permutes the case and control labels of the original configuration and then recomputes the two-tail Fisher's Exact test for all genes. This is repeated n.permutation (e.g., 1000) times. For each of the n.permutations the p-values are ordered and then the mean of each rank-ordered estimate is taken across the n.permutations, i.e., the average 1st order statistic, the average 2nd order statistic, etc. These then represent the empirical estimates of the expected ordered p-values (expected -log10(p-values)). This empirical-based expected p-value distribution no longer depends on an assumption that the p-values are uniformly distributed under the null.
qqplot

QQ plot of observed P-values vs expected P-values, using the empirical (permutation-based) expected p-value distribution. This empirical-based expected p-value distribution no longer depends on an assumption that the Fisher's Exact two-tailed p-values are uniformly distributed under the null. For a given matrix, the permutation-based expected distribution is plotted relative to the observed order statistic to get the permutation-based QQ plot.