View source: R/cov_estim_sample.R
cov_estim_sample | R Documentation |
Computes the sample estimator of the covariance matrix.
cov_estim_sample(data)
data |
an nxp data matrix. |
The sample estimator of the covariance matrix for a data matrix X is computed with the following formula:
\hat{\Sigma}=\frac{1}{n-1} \left(X - \widehat{{\mu}} {1} \right)' \left({X} - \widehat{{\mu}}{1}\right)
where \mu=\bar{x}_{j}=\frac{1}{n}\sum_{i=1}^{n}x_{ij}
(for i=1,\ldots, n
and j=1,\ldots,p
)
is the sample mean vector and 1
is an 1xp vector of ones.
a list with the following entries
a pxp estimated covariance matrix.
an estimation specific tuning parameter, here an NA.
data(rets_m)
sigma_sample <- cov_estim_sample(rets_m)[[1]]
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.