Description Usage Arguments Value Author(s) References Examples
Assuming a block diagonal structure of the correlation matrix, the function calculates and empirical Bayes estimate of the original covariance matrix. The algorithm assumes a single block diagonal prior with one shrinkage threshold determining significance of correlations.
1 |
Covmat |
A sample covariance matrix. Must be positive semi-definite, is converted to a correlation matrix in the algorithm. |
startlambda |
This determines a lower noise level for the correlations, for example, it defaults to 0.5. This means that all correlation values below 0.5 will be set to zero (assumed to be noise). This will be used if groups parameter is not specified. |
n |
The number of samples (replicates) used to calculate Covmat |
happrox |
Logical indicating whether or not to use a hypergeometric distribution estimation of the correlations. The alternative is to take the sample average of the correlations. FALSE by default. |
groups |
Optional list of groups of variables from Covmat that are used to define the block diagonal structure of the prior. |
aic |
Optional logical parameter indicating whether or not the AIC metric should be used to select the threshold parameter from the data. This will replace the value of startlambda. To use the AIC option, the data must also be provided |
data |
Optional data matrix, required when AIC is to be used. The matrix should have observations in rows and variables in the columns. |
dist |
Parameter used when using the AIC option. Either "N" for using the Normal distribution to model the data or "W" to model the sample covariance matrix using a Wishart distribution. Default is "W". |
Returns the estimated correlation matrix.
C. Pacini
Champion, C. J. (2003). Empirical Bayesian estimation of normal variances and covariances. Journal of Multivariate Analysis, 87(1), 60-79
1 2 3 4 5 6 7 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.