hconfigs: Enumeration of all possible vectors of association status.

Description Usage Arguments Details Value See Also Examples

View source: R/repfdr.R

Description

The function generates a matrix with all possible vectors of association status (in rows), given the number of studies and number of possible association status states in each study (2 or 3).

Usage

1
hconfigs(n.studies, n.association.status = 3, studies.names = NULL)

Arguments

n.studies

Number of studies in the analysis.

n.association.status

either 2 for no-association\association or 3 for no-association\negative-association\positive-association.

studies.names

Optional study names to display.

Details

This matrix should be used when selecting the rows indices for the association status vectors that are in the non-null set, specified by the used in non.null.rows in the function repfdr.

Value

Matrix with rows indicating all the possible vectors of association status.

See Also

repfdr

Examples

1
2
3
4
5
6
7
(H <- hconfigs(n.studies = 3))
# in replication analysis the non-null vectors are:
H[apply(H,1,function(y){ sum(y==1)>1 | sum(y==-1)>1 }),]
# in meta-analysis there is only one null vector (c(0,0,0)):
H[rowSums(abs(H))!=0,]

hconfigs(n.studies = 3, n.association.status= 2)

repfdr documentation built on May 1, 2019, 9:20 p.m.