apc {bmet}R Documentation

All pairwise comparisons

Description

Function creates a contrast matrix for all pairwise comparisons

Usage

apc(ngroups, labs = NULL)

Arguments

ngroups

A positive integer greater than 1 denoting the number of groups

labs

A vector of groups labels with length equal to ngroups. The default is set to NULL, and if used, the labels will be set to 1:length(ngroups).

Value

The function returns a matrix of all pairwise contrasts.

Examples

### A contrast matrix based on all pairwise contrasts of 5 groups
apc(5)

### Adding group labels
apc(5, labs = paste("Group", 1:5, sep = " "))


[Package bmet version 0.1.0 Index]