Learn R Programming

FDX (version 2.0.0)

summary.FDX: Summarizing Discrete FDX Results

Description

summary method for class FDX

Usage

# S3 method for FDX
summary(object, ...)

# S3 method for summary.FDX print(x, max = NULL, ...)

Value

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

Table

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

print.summary.FDX returns that object invisibly.

Arguments

object

object of class "FDX".

...

further arguments passed to or from other methods.

x

object of class "summary.FDX".

max

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

Details

summary.FDX objects include all data of an FDX class 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.FDX simply prints the same output as print.FDX, but also prints the p-value table.

Examples

Run this code
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

# Construction of the 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()

# DGR with critical values; using test results object
DGR.crit <- DGR(test.results, critical.values = TRUE)
# create summary
DGR.crit.summary <- summary(DGR.crit)
# print summary
print(DGR.crit.summary)

Run the code above in your browser using DataLab