Weighted Covariance Matrix
dot-wcov.Rd
wcov
computes the estimates of the weighted covariance
matrix and the weighted mean of the data.
Arguments
- x
A matrix with \(m\) columns and \(n\) rows, where each column represents a different variable and each row a different observation.
- w
A non-negative and non-zero vector of weights for each observation. Its length must equal the number of rows of x.
Value
A list with two components:
center
: an estimate for the center (mean) of the data.cov
: the estimated (weighted) covariance matrix.
Author
Simon Garnier, garnier@njit.edu