Learn R Programming

drgee (version 1.1.10-4)

centerX: Cluster-center a design matrix around cluster means

Description

Given a design matrix and a cluster identification variable. A new design matrix is returned, where each column is centered around its cluster mean. Using C++ code for speed.

Usage

centerX(x, id)

Value

A matrix with cluster centered columns.

Arguments

x

A design matrix

id

A cluster identifying variable.

Author

Johan Zetterqvist, Arvid Sjolander

Details

centerX is written as a help function with the aim of being fast.