| shrink_estim | R Documentation |
Shrinkage of the covariance matrix according to Schäfer and Strimmer (2005).
shrink_estim(x, mse = TRUE)
x |
A numeric matrix containing the in-sample residuals or validation errors. |
mse |
If |
A shrunk covariance matrix.
Schäfer, J.L. and Strimmer, K. (2005), A shrinkage approach to large-scale covariance matrix estimation and implications for functional genomics, Statistical Applications in Genetics and Molecular Biology, 4, 1. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.2202/1544-6115.1175")}
Utilities:
aggts(),
as_ctmatrix(),
as_tevector(),
balance_hierarchy(),
commat(),
csprojmat(),
cstools(),
ctprojmat(),
cttools(),
df2aggmat(),
lcmat(),
res2matrix(),
set_bounds(),
shrink_oasd(),
teprojmat(),
tetools(),
unbalance_hierarchy()
set.seed(123)
# Simulated in-sample residuals: 50 observations of a 4-variate process
res <- matrix(rnorm(50 * 4), nrow = 50, ncol = 4)
# Schafer-Strimmer shrunk covariance matrix
shr <- shrink_estim(res)
# Shrinkage intensity selected by the procedure
attr(shr, "lambda")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.