Skip to contents

Objects of Class twosamples are output by all of the *_test functions in the twosamples package.

Usage

# S3 method for twosamples
print(x, ...)

# S3 method for twosamples
summary(object, alpha = 0.05, ...)

Arguments

x

twosamples object

...

other parameters to be passed to print or summary functions

object

twosamples-object to summarize

alpha

Significance threshold for determining null rejection

Value

  • print.twosamples() returns nothing

  • summarize.twosamples() returns nothing

Details

By default they consist of:a length 2 vector, the first item being the test statistic, the second the p-value. That vector has the following attributes:

  1. details: length 3 vector with the sample sizes for each sample and the number of bootstraps

  2. test_type: a string describing the type of the test statistic

It may also have two more attributes, depending on options used when running the *_test function. These are useful for plotting and combining test runs.

  1. bootstraps: a vector containing all the bootstrapped null values

  2. samples: a list containing both the samples that were tested

and by virtue of being a named length 2 vector of class "twosamples" it has the following two attributes:

  1. names: c("Test Stat","P-Value")

  2. class: "twosamples"

Multiple Twosamples objects made by the same *_test routine being run on the same data can be combined (getting correct p-value and correct attributes) with the function combine_twosamples().

Functions

  • print.twosamples: Print method for objects of class twosamples

  • summary.twosamples: Summary method for objects of class twosamples