testGroupIndependence: Multiple independence tests between reference groups and list...

Description Usage Arguments Details Value See Also Examples

View source: R/groups.R

Description

Test multiple contingency tables comprised by two groups (one reference group and another containing remaining elements) and provided groups.

Usage

1
testGroupIndependence(ref, groups, elements, pvalueAdjust = "BH")

Arguments

ref

List of character: list of groups where each element contains the identifiers of respective elements

groups

List of characters: list of groups where each element contains the identifiers of respective elements

elements

Character: all available elements (if a data frame is given, its rownames will be used)

pvalueAdjust

Character: method used to adjust p-values (see Details)

Details

The following methods for p-value adjustment are supported by using the respective string in the pvalueAdjust argument:

Value

multiGroupIndependenceTest object, a data frame containing:

attribute

Name of the original groups compared against the reference groups

table

Contingency table used for testing

pvalue

Fisher's exact test's p-value

See Also

parseCategoricalGroups() and plotGroupIndependence()

Other functions for data grouping: createGroupByAttribute(), getGeneList(), getSampleFromSubject(), getSubjectFromSample(), groupPerElem(), plotGroupIndependence()

Examples

1
2
3
4
5
6
7
8
9
elements <- paste("subjects", 1:10)
ref      <- elements[5:10]
groups   <- list(race=list(asian=elements[1:3],
                           white=elements[4:7],
                           black=elements[8:10]),
                 region=list(european=elements[c(4, 5, 9)],
                             african=elements[c(6:8, 10)]))
groupTesting <- testGroupIndependence(ref, groups, elements)
# View(groupTesting)

psichomics documentation built on Nov. 8, 2020, 5:44 p.m.