Learn R Programming

codingMatrices (version 0.4.0)

mean_contrasts: Display contrasts

Description

A function to display the averaging vector and class mean contrasts implied by a given coding matrix

Usage

mean_contrasts(M)

Value

The full contrast matrix, solve(cbind(1, M)), suitably annotated and presented in vulgar fractional form, for clarity.

Arguments

M

Any \(n \times (n-1)\) coding matrix.

Examples

Run this code
mean_contrasts(code_helmert_forward(5))
mean_contrasts(code_diff_forward(letters[1:7]))

Run the code above in your browser using DataLab