| Title: | Low Rank Correction Quantile Variational Bayesian Algorithm for Multi-Source Heterogeneous Models |
| Version: | 1.0.0 |
| Description: | A Low Rank Correction Variational Bayesian algorithm for high-dimensional multi-source heterogeneous quantile linear models. More details have been written up in a paper submitted to the journal Statistics in Medicine, and the details of variational Bayesian methods can be found in Ray and Szabo (2021) <doi:10.1080/01621459.2020.1847121>. It simultaneously performs parameter estimation and variable selection. The algorithm supports two model settings: (1) local models, where variable selection is only applied to homogeneous coefficients, and (2) global models, where variable selection is also performed on heterogeneous coefficients. Two forms of parameter estimation are output: one is the standard variational Bayesian estimation, and the other is the variational Bayesian estimation corrected with low-rank adjustment. |
| License: | MIT + file LICENSE |
| Encoding: | UTF-8 |
| RoxygenNote: | 7.3.2 |
| Imports: | Rcpp (≥ 1.0.0), glmnet, lava, stats, MASS |
| LinkingTo: | Rcpp, RcppEigen |
| NeedsCompilation: | yes |
| Packaged: | 2025-10-21 01:52:59 UTC; 11877 |
| Author: | Lu Luo [aut, cre], Huiqiong Li [aut] |
| Maintainer: | Lu Luo <luolu@stu.ynu.edu.cn> |
| Repository: | CRAN |
| Date/Publication: | 2025-10-25 12:00:07 UTC |
Global Low Rank Correction Quantile VB
Description
A variational Bayesian algorithm is proposed for multi-source heterogeneous quantile models under the Spike-and-Slab prior, enabling simultaneous variable selection for both homogeneous and heterogeneous covariates.
Usage
lr_qvb_global(X, Z, y, tau, eps = 0.001)
Arguments
X |
Homogeneous covariates |
Z |
Heterogeneous covariates |
y |
Response covariates |
tau |
Quantile Levels |
eps |
Algorithm convergence tolerance, Defaut:1e-3 |
Value
The mean of the homogeneous coefficient:mu; Low-rank correction of homogeneous coefficients:lr_mu; The variance of homogeneous coefficient:sigma; Selection homogeneous coefficient:rho; The mean of the heterogeneous coefficient:beta; Low-rank correction of heterogeneous coefficients:lr_beta; The variance of heterogeneous coefficient:sigma_beta; Selection heterogeneous coefficient:rho_beta.
Local Low Rank Correction Quantile VB
Description
A variational Bayesian algorithm is proposed for multi-source heterogeneous quantile models under the Spike-and-Slab prior, and focuses on variable selection exclusively for the homogeneous covariates.
Usage
lr_qvb_local(X, Z, y, tau, eps = 0.001)
Arguments
X |
Homogeneous covariates |
Z |
Heterogeneous covariates |
y |
Response covariates |
tau |
Quantile Levels |
eps |
Algorithm convergence tolerance, Default:1e-3 |
Value
The mean of the homogeneous coefficient:mu; Low-rank correction of homogeneous coefficients:lr_mu; The variance of homogeneous coefficient:sigma; Selection coefficient:rho; The mean of the heterogeneous coefficient:beta; The variance of heterogeneous coefficient:sigma_beta.
Low Rank Correction Variational Bayesian Algorithm for Multi-Source Heterogeneous Models.
Description
This package implements a variational Bayesian algorithm for high-dimensional multi-source quantile heterogeneous linear models. It simultaneously performs parameter estimation and variable selection. The algorithm supports two model settings: (1) local models, where variable selection is only applied to homogeneous coefficients, and (2) global models, where variable selection is also performed on heterogeneous coefficients. Two forms of parameter estimation are output: one is the standard variational #' Bayesian estimation, and the other is the variational Bayesian estimation corrected with low-rank adjustment.
Usage
vbms(X, Z, y, global, tau, eps = 0.001)
Arguments
X |
Homogeneous covariates |
Z |
Heterogeneous covariates |
y |
Response covariates |
global |
Indicates whether variable selection is required for het coefficients, if TRUE, Variable selection will be made for het coefficients. |
tau |
Quantile Levels |
eps |
Algorithm convergence tolerance, Defaut:1e-3 |
Value
mu_hom |
The mean of the homogeneous coefficients |
lr_mu_hom |
The low rank correction estimation of homogeneous coefficients |
sigma_hom |
The variance of homogeneous coefficients |
gamma_hom |
Selection indicators for homogeneous coefficients |
mu_het |
The mean of the heterogeneous coefficients |
lr_mu_het |
The low rank correction estimation of heterogeneous coefficients |
sigma_het |
The variance of heterogeneous coefficients |
gamma_het |
Selection indicators for heterogeneous coefficients (NULL for local models) |
Examples
# Simulate multi-source heterogeneous data
n <- 50 # number of samples per source
K <- 3 # number of sources
p <- 100 # number of homogeneous covariates
q <- 5 # number of heterogeneous covariates
tau <- 0.5
set.seed(1)
theta <- matrix(c(c(-1,0.5,1,-0.5,2),rep(0,p-5)), ncol = 1)
beta <- matrix(1, nrow = q, ncol = K)
for (k in 1:K) {
beta[,k] <- matrix(c(rep(log(k+1),5),rep(0,q-5)), ncol = 1)
}
zdata <- MASS::mvrnorm(K*n, rep(0,q), diag(q))
Z <- array(data=zdata,dim=c(n,q,K))
xdata <- MASS::mvrnorm(K*n, rep(0,p), diag(p))
X <- array(data=xdata,dim=c(n,p,K))
Y <- matrix(0, nrow = n, ncol = K)
for (k in 1:K) {
Y[,k] <- MASS::mvrnorm(1, X[,,k]%*%theta+Z[,,k]%*%beta[,k], diag(n))
}
# Fit local model with Laplace prior
res <- vbms(X, Z, Y, global=FALSE, tau=tau)
# View results
print(head(res$mu_hom)) # Homogeneous coefficients mean
print(head(res$lr_mu_hom)) # Low rank correction estimation
print(head(res$gamma_hom)) # Homogeneous variable selection
print(res$mu_het) # Heterogeneous coefficients mean