tda_mcent subtracts each column's mean – TDA's
mcent, matching sweep(A, 2, colMeans(A)).
tda_mstand additionally divides each column by its
population standard deviation (denominator n, not
base R's sd()'s n-1) – TDA's mstand.
tda_mdcent
double-centers a symmetric matrix – TDA's mdcent, the
classical (Torgerson) transformation multidimensional scaling
uses to turn a matrix of squared distances into one whose
eigendecomposition gives point coordinates.
See also
Other matrix algebra:
tda_mcel(),
tda_mch(),
tda_mcross(),
tda_mdiag(),
tda_mev(),
tda_mevs(),
tda_midf(),
tda_midf1(),
tda_midf2(),
tda_midf3(),
tda_minvs(),
tda_mkmet(),
tda_mkp(),
tda_mmul(),
tda_mnc(),
tda_mnrow(),
tda_mpbl(),
tda_mpfit(),
tda_mpinv(),
tda_mpit(),
tda_mple(),
tda_mpz(),
tda_mscal1(),
tda_msqrtd(),
tda_msvd(),
tda_mwvec()
Examples
A <- matrix(c(1, 2, 6, 10, 30, 20), 3, 2)
tda_mcent(A)
#> [,1] [,2]
#> [1,] -2 -10
#> [2,] -1 10
#> [3,] 3 0
tda_mstand(A)
#> [,1] [,2]
#> [1,] -0.9258201 -1.224745
#> [2,] -0.4629100 1.224745
#> [3,] 1.3887301 0.000000
D <- matrix(c(0, 3, 4, 3, 0, 5, 4, 5, 0), 3, 3)
tda_mdcent(D)
#> [,1] [,2] [,3]
#> [1,] 2.7777778 -0.2222222 -2.555556
#> [2,] -0.2222222 5.7777778 -5.555556
#> [3,] -2.5555556 -5.5555556 8.111111