Open-source · github.com/YuZh98/Anti-correlation-Gaussian
Code accompanying the paper Gibbs Sampling using Anti-correlation Gaussian Data Augmentation, with Applications to L1-ball-type Models.
Files
| File | Purpose |
|---|---|
SourceCode.R | l1ball.linreg(X, y, ...): blocked Gibbs sampler for the L1-ball-prior linear regression model using the anti-correlation Gaussian data-augmentation step |
SliceSampler.R | Scalar and directional slice samplers (Neal, 2003). Used to update κ; can be sourced standalone |
LinearReg.R | Toy variable-selection demo (n = 300, p = 500) producing estimation, trace, and ACF plots |
TruncatedMVN.R | Extension of the anti-correlation trick to sampling a multivariate normal truncated to a box, plus a 2-D demo |
tests/test_samplers.R | Smoke + correctness tests |
Quick start
| |
To reproduce the paper’s linear-regression figures:
| |
Testing
| |
Checks that truncMVN reproduces the moments of a known truncated MVN, and that l1ball.linreg recovers the support and signs of the true coefficients on a small synthetic problem.