getHelmert: Get Helmert Coding of column j of group with length of unique...

View source: R/addCatVars.R

getHelmertR Documentation

Get Helmert Coding of column j of group with length of unique values (count-1)

Description

Get Helmert Coding of column j of group with length of unique values (count-1)

Usage

getHelmert(x, j, count = NULL)

Arguments

x

a numeric vector

j

column no

count

length unique values of group minus 1

Value

A numeric vector

Source

Andrew F. Hayes.(2018) Introduction to Mediation, Moderation and Conditional Process Analysis(2nd Ed.). New York, NY: The Guilford Press. p584

Examples

x=c(1:4,4:2,2,3,5)
getHelmert(x,1)
getHelmert(mtcars$cyl,1)

processR documentation built on Jan. 23, 2023, 5:44 p.m.