contr.simplex: Orthonormal Contrast Generator

View source: R/contr.simplex.R

contr.simplexR Documentation

Orthonormal Contrast Generator

Description

Generates orthonormal (orthogonal and normalized) contrasts. Each row is the vertex of an N-dimensional simplex. The only exception are contrasts for the 2-level case, which return 1 and -1.

Usage

contr.simplex(n, size = NULL)

Arguments

n

The number of levels in the catagorical variable.

size

Default '1'. The length of the simplex vector.

Value

A matrix of Orthonormal contrasts.

Examples

contr.simplex(4)

skpr documentation built on April 9, 2022, 1:06 a.m.