SumToZero: Sum to Zero

View source: R/mcmc_misc.R

SumToZeroR Documentation

Sum to Zero

Description

Compute sum to zero values across all levels of a data matrix

Usage

SumToZero(q.levels, data, contrasts)

Arguments

q.levels

number of levels of each variable/column

data

data matrix to combine from

contrasts

specified contrasts columns

Examples

 data <- matrix(c(1,2),ncol=2)
 colnames(data) <- c("m1[1]","m1[2]")
 SumToZero( 2 , data , contrasts = NULL )
 #               b0[1] b1[1] b1[2]
 #       m1[1]   1.5  -0.5   0.5

bfw documentation built on March 18, 2022, 6:19 p.m.