centerX function

Cluster-center a design matrix around cluster means

Cluster-center a design matrix around cluster means

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. latin1

centerX(x, id)

Arguments

  • x: A design matrix
  • id: A cluster identifying variable.

Details

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

Returns

A matrix with cluster centered columns.

Author(s)

Johan Zetterqvist, Arvid

  • Maintainer: Johan Zetterqvist
  • License: GPL-2 | GPL-3
  • Last published: 2020-01-09

Useful links