The BDPTobitQR package implements the Bayesian
Double-Penalty Tobit Quantile Regression methods for longitudinal or
clustered interval-censored data proposed by Zhao, Shu, Hu,
& Luo (2024) (Mathematics, 12(12), 1782).
Interval-censored and Tobit-restricted longitudinal data occur
frequently in econometrics, social sciences, public health, and
medicine. Standard linear or Tobit mean regression models can fail to
capture the full conditional distribution of responses across different
quantiles. The methods in this package overcome these limitations by
combining: 1. Quantile Regression via the Asymmetric
Laplace Distribution (ALD) normal-exponential mixture decomposition. 2.
Tobit Interval Censoring with latent variable data
augmentation via truncated normal distributions. 3. Double
Penalization on both fixed effects \(\beta\) and random effects \(\alpha_i\): -
PDAL-BTQR: Double Adaptive Lasso penalty
for sparse/dense longitudinal variable selection. -
PDL-BTQR: Double Lasso penalty. -
P-BTQR: Unpenalized Tobit quantile
regression with mixed effects.
library(BDPTobitQR)
# 1. Simulate longitudinal interval-censored dataset
dat <- sim_longitudinal_data(n = 15, m = 4, p = 4, tau = 0.5, seed = 123)
# 2. Fit Bayesian Double Adaptive Lasso Tobit Quantile Regression (PDAL-BTQR)
fit <- bdp_tobit_qr(
formula = y ~ x1 + x2 + x3 + x4,
random = ~ 1,
data = dat,
id = dat$id,
lower = dat$lower,
upper = dat$upper,
tau = 0.5,
method = "PDAL-BTQR",
n_iter = 1000,
burn_in = 200
)
# 3. Print summary table
summary(fit)The package includes the crime_data dataset analyzed in
Section 4 of Zhao et al. (2024), containing crime rates and economic
indicators across 31 provinces from 2010 to 2016.
data("crime_data")
# Fit model at median quantile tau = 0.5
fit_crime <- bdp_tobit_qr(
formula = y ~ x1 + x2 + x3 + x4 + x5,
random = ~ 1,
data = crime_data,
id = crime_data$id,
lower = crime_data$lower,
upper = crime_data$upper,
tau = 0.5,
method = "PDAL-BTQR",
n_iter = 1000,
burn_in = 200
)
# Model selection and accuracy properties
cat("DIC: ", fit_crime$dic, "\n")
cat("LPML:", fit_crime$lpml, "\n")
cat("MSE: ", fit_crime$mse, "\n")