multi_sample_htest {atable}R Documentation

Calculates multi sample hypothesis tests

Description

Calculates multi sample hypothesis tests depending on the class of its input.

Usage

multi_sample_htest(value, group, ...)

## S3 method for class 'logical'
multi_sample_htest(value, group, ...)

## S3 method for class 'factor'
multi_sample_htest(value, group, multi_sample_htest.factor = NULL, ...)

## S3 method for class 'character'
multi_sample_htest(value, group, ...)

## S3 method for class 'ordered'
multi_sample_htest(value, group, multi_sample_htest.ordered = NULL, ...)

## S3 method for class 'numeric'
multi_sample_htest(value, group, multi_sample_htest.numeric = NULL, ...)

Arguments

value

An atomic vector.

group

A factor, same length as value.

...

Passed to methods.

multi_sample_htest.factor

Analog to argument two_sample_htest.numeric

multi_sample_htest.ordered

Analog to argument two_sample_htest.numeric

multi_sample_htest.numeric

Either NULL or a function. Default is NULL. If a function, then it will replace atable:::multi_sample_htest.numeric. The function must mimic multi_sample_htest.numeric: arguments are value, group and the ellipsis ... . Result is a named list with length > 0 with unique names.

Details

Calculates multi sample hypothesis tests depending on the class of its input.

Results are passed to function format_tests for the final table.

If you are not pleased with the current hypothesis tests you may alter these functions. But you must keep the original output-format, see section Value. Function check_tests checks if the output of statistics is suitable for further processing.

The function multi_sample_htest is essentially a wrapper to standardize the arguments of various hypothesis test functions.

Value

A named list with length > 0.

Most hypothesis-test-functions in R like t.test or chisq.test return an object of class 'htest'. 'htest'-objects are a suitable output for function two_sample_htest. Function check_tests checks if the output is suitable for further processing.

Methods (by class)


[Package atable version 0.1.14 Index]