Bayesian Sparse Estimation of a Covariance Matrix

Bayesian estimations of a covariance matrix for multivariate normal data. Assumes that the covariance matrix is sparse or band matrix and positive-definite. Methods implemented include the beta-mixture shrinkage prior (Lee et al. (2022) ), screened beta-mixture prior (Lee et al. (2024) ), and post-processed posteriors for banded and sparse covariances (Lee et al. (2023) ; Lee and Lee (2023) ). This software has been developed using funding supported by Basic Science Research Program through the National Research Foundation of Korea ('NRF') funded by the Ministry of Education ('RS-2023-00211979', 'NRF-2022R1A5A7033499', 'NRF-2020R1A4A1018207' and 'NRF-2020R1C1C1A01013338').


bspcov

license

An R package for Bayesian Sparse Estimation of a Covariance Matrix

S&P 500 Example

Building

To build the package from source, you need to have the following:

# lock the renv
pkgs <- c("GIGrvg", "coda", "progress", "BayesFactor", "MASS", "mvnfast", 
          "matrixcalc", "matrixStats", "purrr", "dplyr", "RSpectra", "Matrix", 
          "plyr", "CholWishart", "magrittr", "future", "furrr", "ks", "ggplot2", 
          "ggmcmc", "caret", "FinCovRegularization", "mvtnorm", "stats", 
          "patchwork", "reshape2", "future.apply")
renv::snapshot(packages = pkgs)

# update docs
devtools::document()
## check package
VERSION=$(git describe --tags | sed 's/v//g')

## build manual
R CMD Rd2pdf --force --no-preview -o bspcov-manual.pdf .

## build package
sed -i '' "s/Version: [^\"]*/Version: ${VERSION}/g" "DESCRIPTION"
R CMD build .

Installation

You can install the bspcov package from CRAN:

install.packages("bspcov")

or the development version from GitHub, by using the function install_github() from devtools package:

devtools::install_github("statjs/bspcov", ref = "main")

Related publications

  • Lee, K., Jo, S., & Lee, J. (2022). The beta-mixture shrinkage prior for sparse covariances with near-minimax posterior convergence rate. Journal of Multivariate Analysis, 192, 105067, DOI: 10.1016/j.jmva.2022.105067.
  • Lee, K., Jo, S., Lee, K., & Lee, J. (2024). Scalable and optimal Bayesian inference for sparse covariance matrices via screened beta-mixture prior. Bayesian Analysis, 1(1), 1-28, DOI: 10.1214/24-BA1495.
  • Lee, K., Lee, K., & Lee, J. (2023). Post-processed posteriors for banded covariances. Bayesian Analysis, 18(3), 1017-1040, DOI: 10.1214/22-BA1333.
  • Lee, K., & Lee, J. (2023). Post-processed posteriors for sparse covariances. Journal of Econometrics, 236(1), 105475, DOI: 10.1016/j.jeconom.2023.105475.

Acknowledgement

This work was supported by the National Research Foundation of Korea(NRF) grant funded by the Korea government(MSIT)
(RS-2023-00211979, NRF-2022R1A5A7033499, NRF-2020R1A4A1018207, and NRF-2020R1C1C1A01013338)

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("bspcov")

1.0.3 by Kyeongwon Lee, a year ago


https://github.com/statjs/bspcov


Browse source code at https://github.com/cran/bspcov


Authors: Kwangmin Lee [aut] , Kyeongwon Lee [aut, cre] , Kyoungjae Lee [aut] , Seongil Jo [aut] , Jaeyong Lee [ctb]


Documentation:   PDF Manual  


GPL-2 license


Imports GIGrvg, coda, progress, BayesFactor, MASS, mvnfast, matrixcalc, matrixStats, purrr, dplyr, RSpectra, Matrix, plyr, CholWishart, magrittr, future, furrr, ks, ggplot2, ggmcmc, caret, FinCovRegularization, mvtnorm, stats, patchwork, reshape2, future.apply

Suggests hdbinseg, POET, tidyquant, tidyr, timetk, quantmod


See at CRAN