Normalize a numerical matrix by scaling each column so that the scaled column sums are equal.
Usage
normalize(d)
Value
A matrix of the same size as d is returned. The column sums of this matrix are equal.
Arguments
d
A numerical matrix.
Author
Thang V. Pham
Details
The average of column sums is computed. A scaling factor is calculated for each colunm so that the scaled column sum is equal to the computed average value.
References
Pham TV (2021). countdata: The Beta-Binomial Test for Count Data. R package version 1.1. https://CRAN.R-project.org/package=countdata