Returns a list containing estimates of the weighted covariance matrix and the mean of the data, and optionally of the (weighted) correlation matrix.
1 2 
x 
a matrix or data frame. As usual, rows are observations and columns are variables. 
wt 
a nonnegative and nonzero vector of weights for each
observation. Its length must equal the number of rows of 
cor 
a logical indicating whether the estimated correlation weighted matrix will be returned as well. 
center 
either a logical or a numeric vector specifying the
centers to be used when computing covariances. If 
method 
string specifying how the result is scaled, see ‘Details’ below. Can be abbreviated. 
By default, method = "unbiased"
,
The covariance matrix is divided by one minus the sum of squares of
the weights, so if the weights are the default (1/n) the conventional
unbiased estimate of the covariance matrix with divisor (n  1)
is obtained. This differs from the behaviour in SPLUS which
corresponds to method = "ML"
and does not divide.
A list containing the following named components:
cov 
the estimated (weighted) covariance matrix 
center 
an estimate for the center (mean) of the data. 
n.obs 
the number of observations (rows) in 
wt 
the weights used in the estimation. Only returned if given as an argument. 
cor 
the estimated correlation matrix. Only returned if

cov
and var
.
1 2 3 4 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.