cov_ed | R Documentation |
Perform "extreme deconvolution" (Bovy et al) on a subset of the data
cov_ed(data, Ulist_init, subset = NULL, algorithm = c("bovy", "teem"), ...)
data |
a mash data object |
Ulist_init |
a named list of covariance matrices to use to initialize ED; default is to use matrices from PCs |
subset |
a subset of data to be used when ED is run (set to NULL for all the data) |
algorithm |
algorithm to run ED |
... |
other arguments to be passed to ED algorith, see
|
Runs the extreme deconvolution algorithm from Bovy et al
(Annals of Applied Statistics) to estimate data-driven covariance
matrices. It can be initialized with, for example running cov_pca
with,
say, 5 PCs.
## Not run:
data = mash_set_data(Bhat = cbind(c(1,2),c(3,4)), Shat = cbind(c(1,1),c(1,1)))
U_pca = cov_pca(data,2)
U_x = apply(data$Bhat, 2, function(x) x - mean(x))
U_xx = t(U_x) %*% U_x / nrow(U_x)
cov_ed(data,c(U_pca, list(xx = U_xx)))
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.