HMVD-package: Group Association Test using a Hidden Markov Model

Description Details Author(s) References Examples

Description

HMVD performs an association test between a group of variables and the outcome. Posterior probabilities are provided for each variable indicating how likely each variable is associated with the outcome.

Details

Package: HMVD
Type: Package
Version: 1.0
Date: 2016-05-12
License: GPL-3

~~ An overview of how to use the package, including the most important functions ~~

Author(s)

Maintainer: Yichen Cheng<[email protected]>

References

Cheng, Y., Dai, J. and Kooperberg, C. (2015). Group association test using hidden Markov model. Biostatistics, in pres.

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
#############################################################################
#### compute the p-value and do parameter estimation for continuous outcome 
n = 4000; m = 20
X = matrix(rnorm(n*m),n)
Y = rowMeans(X[,1:4])*.2 + rnorm(n)
HMVD(Y,X)$p.value #### approximate p-value

HMVD(Y,X,nperm.max = 20)$p.value.perm #### p-value based on permutations
#### in practice we would use more permutations

out = HMVD(Y,X,method='estimation')
round(out$prob,2) ###posterior probability
out$theta ### common effect size

#### compute the p-value and do parameter estimation for binary outcome 
n = 4000; m = 20
X = matrix(rnorm(n*m),n)
p = rowMeans(X[,1:4])*.4
Y = rbinom(n,1,p = exp(p)/(1+exp(p)))
HMVD(Y,X,model.type='D')$p.value #### approximate p-value

HMVD(Y,X,nperm.max = 20)$p.value.perm #### p-value based on permutations
#### in practice we would use more permutations

out = HMVD(Y,X,model.type='D',method='estimation')
round(out$prob,2) ###posterior probability
out$theta ### common effect size

HMVD documentation built on May 29, 2017, 8:35 p.m.