Learn R Programming

bspcov (version 1.0.0)

thresPPP: Bayesian Estimation of a Sparse Covariance Matrix

Description

Provides a post-processed posterior (PPP) for Bayesian inference of a sparse covariance matrix.

Usage

thresPPP(X, eps, thres = list(), prior = list(), nsample = 2000)

Value

Sigma

a nsample \(\times\) p(p+1)/2 matrix including lower triangular elements of covariance matrix.

p

dimension of covariance matrix.

Arguments

X

a n \(\times\) p data matrix with column mean zero.

eps

a small positive number decreasing to \(0\).

thres

a list giving the information for thresholding PPP procedure. The list includes the following parameters (with default values in parentheses): value (0.1) giving the positive real number for the thresholding PPP procedure, fun ('hard') giving the thresholding function ('hard' or 'soft') for the thresholding PPP procedure.

prior

a list giving the prior information. The list includes the following parameters (with default values in parentheses): A (I) giving the positive definite scale matrix for the inverse-Wishart prior, nu (p + 1) giving the degree of freedom of the inverse-Wishar prior.

nsample

a scalar value giving the number of the post-processed posterior samples.

Author

Kwangmin Lee

Details

Lee and Lee (2023) proposed a two-step procedure generating samples from the post-processed posterior for Bayesian inference of a sparse covariance matrix:

  • Initial posterior computing step: Generate random samples from the following initial posterior obtained by using the inverse-Wishart prior \(IW_p(B_0, \nu_0)\) $$ \Sigma \mid X_1, \ldots, X_n \sim IW_p(B_0 + nS_n, \nu_0 + n), $$ where \(S_n = n^{-1}\sum_{i=1}^{n}X_iX_i^\top\).

  • Post-processing step: Post-process the samples generated from the initial samples $$ \Sigma_{(i)} := \left\{\begin{array}{ll}H_{\gamma_n}(\Sigma^{(i)}) + \left[\epsilon_n - \lambda_{\min}\{H_{\gamma_n}(\Sigma^{(i)})\}\right]I_p, & \mbox{ if } \lambda_{\min}\{H_{\gamma_n}(\Sigma^{(i)})\} < \epsilon_n, \\ H_{\gamma_n}(\Sigma^{(i)}), & \mbox{ otherwise }, \end{array}\right. $$

where \(\Sigma^{(1)}, \ldots, \Sigma^{(N)}\) are the initial posterior samples, \(\epsilon_n\) is a positive real number, and \(H_{\gamma_n}(\Sigma)\) denotes the generalized threshodling operator given as $$ (H_{\gamma_n}(\Sigma))_{ij} = \left\{\begin{array}{ll}\sigma_{ij}, & \mbox{ if } i = j, \\ h_{\gamma_n}(\sigma_{ij}), & \mbox{ if } i \neq j, \end{array}\right. $$ where \(\sigma_{ij}\) is the \((i,j)\) element of \(\Sigma\) and \(h_{\gamma_n}(\cdot)\) is a generalized thresholding function.

For more details, see Lee and Lee (2023).

References

Lee, K. and Lee, J. (2023), "Post-processes posteriors for sparse covariances", Journal of Econometrics.

See Also

cv.thresPPP

Examples

Run this code

n <- 25
p <- 50
Sigma0 <- diag(1, p)
X <- MASS::mvrnorm(n = n, mu = rep(0, p), Sigma = Sigma0)
res <- bspcov::thresPPP(X, eps=0.01, thres=list(value=0.5,fun='hard'), nsample=100)
est <- bspcov::estimate(res)

Run the code above in your browser using DataLab