pTest: Hypothesis testing for pleiotropy

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/pTest.R

Description

Hypothesis testing for pleiotropy.

Usage

1
pTest( fit, fitH0, vDigit=1000 )

Arguments

fit

Fit of the GPA model of interest.

fitH0

GPA model fit under the null hypothesis of pleiotropy test.

vDigit

Number of digits for reporting parameter estimates and standard errors. For example, setting it to 1000 means printing out values up to three digits below zero.

Details

pTest implements the hypothesis testing for pleiotropy. It requires two GPA model fits, one of interest and one under the null hypothesis (obtained by setting pleiotropyH0=TRUE when running GPA function), and evaluates genetical correlation among multiple phenotypes using the likelihood ratio test.

Value

Returns a list with components:

pi

pi estimates.

piSE

Standard errors for pi estimates.

statistics

Statistics of the pleiotropy test.

pvalue

p-value of the pleiotropy test.

Author(s)

Dongjun Chung

References

Chung D*, Yang C*, Li C, Gelernter J, and Zhao H (2014), "GPA: A statistical approach to prioritizing GWAS results by integrating pleiotropy information and annotation data," PLoS Genetics, 10: e1004787. (* joint first authors)

See Also

aTest, GPA, GPA.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# simulator function

simulator <- function( risk.ind, nsnp=20000, alpha=0.6 ) {
  
  m <- length(risk.ind)
  
  p.sig <- rbeta( m, alpha, 1 )
  pvec <- runif(nsnp)
  pvec[ risk.ind ] <- p.sig
  
  return(pvec)
}

# run simulation

set.seed(12345)
nsnp <- 1000
alpha <- 0.3
pmat <- matrix( NA, nsnp, 5 )

pmat[,1] <- simulator( c(1:200), nsnp=nsnp, alpha=alpha )
pmat[,2] <- simulator( c(51:250), nsnp=nsnp, alpha=alpha )
pmat[,3] <- simulator( c(401:600), nsnp=nsnp, alpha=alpha )
pmat[,4] <- simulator( c(451:750), nsnp=nsnp, alpha=alpha )
pmat[,5] <- simulator( c(801:1000), nsnp=nsnp, alpha=alpha )

# GPA without annotation data

fit.GPA.noAnn <- GPA( pmat, NULL, maxIter = 100 )

# GPA under the null hypothesis of pleiotropy test

fit.GPA.pleiotropy.H0 <- GPA( pmat, NULL, pleiotropyH0=TRUE, maxIter = 100 )

# hypothesis testing for pleiotropy

test.pleiotropy <- pTest( fit.GPA.noAnn, fit.GPA.pleiotropy.H0 )

GPA documentation built on Nov. 8, 2020, 6:27 p.m.