ConstructContrasts: Construction of contrasts for several factors

Description Usage Arguments Details Value Author(s) References Examples

View source: R/ConstructContrasts.R

Description

Constructs the contrasts for main effects and interaction for a dataframe of factors.

Usage

1
ConstructContrasts(Factors, MaxOrderIter = 2)

Arguments

Factors

A data frame of factors (For general data frames the functions extracts all the columns that are factors).

MaxOrderIter

Maximum order of the interaction to construct.

Details

Constructs the contrasts for main effects and interaction for a dataframe of factors. For a general data frame the functions extracts all the factors first. The function constructs the contrasts for all the main effects and the interactions up to order MaxOrderIter.

Value

Groups

The groups resulting of combining the levels of all the factors.

Contrasts

A matrix of contrasts containing the contrasts that are associated to the main affects and interaction. The rows contain contrasts and the columns the groups to combine.

Effects

A factor describing which contrasts correspond to each effect.

Author(s)

Jose Luis Vicente-Villardon, Laura Vicente-Gonzalez

References

Bapat, R. B. (2012). Linear algebra and linear models. Springer Science & Business Media.

Examples

1

PERMANOVA documentation built on Sept. 6, 2021, 5:07 p.m.