Learn R Programming

repfdr (version 1.1-3)

hconfigs: Enumeration of all possible vectors of association status.

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

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.

Value

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.

See Also

repfdr

Examples

Run this code

(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)

Run the code above in your browser using DataLab