summary.DiscreteFWER {DiscreteFWER}R Documentation

Summarizing Discrete FWER Results

Description

summary method for class DiscreteFWER.

Usage

## S3 method for class 'DiscreteFWER'
summary(object, ...)

## S3 method for class 'summary.DiscreteFWER'
print(x, max = NULL, ...)

Arguments

object

an object of class DiscreteFWER.

...

further arguments passed to or from other methods.

x

an object of class summary.DiscreteFWER.

max

numeric or NULL, specifying the maximal number of rows of the p-value table to be printed. By default, when NULL, getOption("max.print") is used.

Details

summary.DiscreteFWER objects contain all data of an DiscreteFWER object, but also include an additional table which includes the raw p-values, their indices, the respective critical values (if present), the adjusted p-values (if present) and a logical column to indicate rejection. The table is sorted in ascending order by the raw p-values.

print.summary.DiscreteFWER simply prints the same output as print.DiscreteFWER, but also prints the p-value table.

Value

summary.DiscreteFWER computes and returns a list that includes all the data of an input DiscreteFWER object, plus

Table

data.frame, sorted by the raw p-values, that contains the indices, the raw p-values themselves, their respective critical values (if present), their adjusted p-values (if present) and a logical column to indicate rejection.

Examples

X1 <- c(4, 2, 2, 14, 6, 9, 4, 0, 1)
X2 <- c(0, 0, 1, 3, 2, 1, 2, 2, 2)
N1 <- rep(148, 9)
N2 <- rep(132, 9)
Y1 <- N1 - X1
Y2 <- N2 - X2
df <- data.frame(X1, Y1, X2, Y2)
df

# Computation of p-values and their supports with Fisher's exact test
library(DiscreteTests)  # for Fisher's exact test
test_results <- fisher_test_pv(df)
raw_pvalues <- test_results$get_pvalues()
pCDFlist <- test_results$get_pvalue_supports()

# d-Holm procedure without critical values; using test results object
DFWER_dep_sd_fast <- discrete_FWER(test_results)
summary(DFWER_dep_sd_fast)

# d-Bonferroni procedure with critical values; using test results object
DFWER_dep_crit <- discrete_FWER(test_results, single_step = TRUE,
critical_values = TRUE)
summary(DFWER_dep_crit)


[Package DiscreteFWER version 1.0.0 Index]