lambda_1000: Normalize Lambda inflation factors to specific case-control...

Description Usage Arguments Value Author(s) References Examples

View source: R/humarray.R

Description

Lambda inflation statistics are influenced by the size of the generating datasets. To facilitate comparison to other studies, this function calculates then converts a given lambda from n cases and m controls, to be equivalent to 1000 cases and 1000 controls.

Usage

1
lambda_1000(p.values, n = 1000, m = 1000)

Arguments

p.values

numeric, a vector of analysis p.values, generated from n cases and m controls (although order switching n/m makes no difference to this function)

n

integer, original number of cases that p.values were derived from

m

integer, original number of controls that p.values were derived from

Value

A normalized Lambda coefficient

Author(s)

Nicholas Cooper nick.cooper@cimr.cam.ac.uk

References

Freedman M.L., et al. Assessing the impact of population stratification on genetic association studies. Nat. Genet. 2004;36:388-393.

Examples

1
2
3
4
5
6
7
8
# create some p-values with clear 'inflation' (divergence from uniform[0,1])
p.vec <- c(runif(3000)/200,runif(7000)) 
# let's imagine these p values come from 3000 cases and 5000 controls
L1000_a <- lambda_1000(p.vec,3000,5000)
# alternatively, imagine the sample sizes are 10 times larger
L1000_b <- lambda_1000(p.vec,30000,50000)
plot(sort(p.vec),type="l") 
L1000_a; L1000_b

humarray documentation built on Nov. 20, 2017, 1:05 a.m.