centerx: Centers a Design Matrix

Description Usage Arguments Examples

Description

Centers a Design Matrix

Usage

1

Arguments

x

The design matrix which will be centered (all colums sum to 0).

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
##---- Should be DIRECTLY executable !! ----
##-- ==>  Define data, use random,
##--	or do  help(data=index)  for the standard data sets.

## The function is currently defined as
function (x) 
{
    x = as.matrix(x)
    n = length(x[, 1])
    one = matrix(rep(1, n), ncol = 1)
    x - (one %*% t(one)/n) %*% x
  }

kloke/rbgee documentation built on May 20, 2019, 12:34 p.m.