customPost: Function to use custom tests to perform post hoc comparisons.

Description Usage Arguments Value Examples

View source: R/post_hoc.R

Description

This function computes the raw p-values for all vs. all or all vs. control comparisons using a custom function.

Usage

1
customPost(data, control = NULL, test, ...)

Arguments

data

Data set (matrix or data.frame) to apply the test. The column names are taken as the groups and the values in the matrix are the samples.

control

Either the number or the name of the column for the control algorithm. If this parameter is not provided, the all vs all comparison is performed.

test

Function to perform the test. It requires two parameters, x and y, the two samples to be compared, and it has to return a list that contains, at least, one element called p.value (as the htest objects that are usually returned by R's statistical test implementations).

...

Additional parameters for the test function.

Value

A matrix with all the pairwise raw p-values.

Examples

1
2
3
4
5
6
data(data_gh_2008)
test <- function(x, y, ...) {
  t.test(x, y, paired=TRUE)
}
customPost(data.gh.2008, control=1, test=test)
customPost(data.gh.2008, test=test)

scmamp documentation built on May 1, 2019, 10:10 p.m.