exp_quantile_point: exp_quantile_point

Description Usage Arguments Details Value Author(s) Examples

View source: R/cFDR.R

Description

Evaluate the conditional expected quantile of a p value in the shared control design conditional on a p value for a second phenotype

Usage

1
exp_quantile_point(p, pc, rho, pi0 = 1, sigma = 1)

Arguments

p

Observed p value or set of p values for principal phenotype

pc

Observed p value or set of p values for conditional phenotype. Must be of the same length as p.

rho

Correlation between Z scores induced by shared controls. Output from cor_shared.

pi0

Parameter for distribution of Z scores for the conditional phenotype (proportion of SNPs null for conditional phenotype).

sigma

Parameter for distribution of Z scores for the conditional phenotype (variance of true effect sizes for SNPs non-null for conditional phenotype).

Details

Computes the probability that a p value for a phenotype i is less than some cutoff p given that the p value for a second phenotype j is equal to a value pc, under the null hypothesis for phenotype i.

If the GWAS for phenotypes i and j share a number of controls, effect sizes for the two phenotypes will be correlated, even at null SNPs. This leads to dependence of the expected quantile both on the number of shared controls and study sizes (through paramter rho), and the distribution of Z scores for phenotype j across all SNPs, not all of which will necessarily be null for phenotype j.

The 'true' Z scores (Z scores which we would observe if the observed allele frequencies exactly matched the population allele frequencies) are assumed to follow a mixture distribution of 0 with probability pi0, and N(0,sigma^2) with probability 1-pi0. These parameters can be estimated from an observed distribution of Z scores using the function fit.em .

The value of the function is the first derivative of the function exp_quantile with respect to P_j.

Value

A list of probabilities of the same length as p.

Author(s)

James Liley

Examples

1
2
3
4
5
p <- 0.2; pc <- 0.1;
rho <- 0.25
sigma <- 5; pi0 <- 0.95
exp_quantile_point(p,pc,rho,pi0=pi0,sigma=sigma)
# Generally the expected quantile is close to p. 

jamesliley/cFDR-common-controls documentation built on May 18, 2019, 11:21 a.m.