This function performs double centering on a matrix. Double centering is a common preprocessing step in multivariate data analysis, where the matrix is adjusted so that both the row and column means are zero.
Value
A numeric matrix of the same dimensions as x
, where the rows and columns have been centered so that their means are zero.
Details
The function computes the double-centered matrix by subtracting the row and column means and adjusting for the grand mean. The resulting matrix will have row and column means equal to zero.