| Title: | Bayesian Double-Penalty Tobit Quantile Regression for Longitudinal Interval-Censored Data |
|---|---|
| Description: | Implements Bayesian Double-Penalty Tobit Quantile Regression methods for longitudinal interval-censored data as proposed by Zhao et al. (2024) <doi:10.3390/math12121782>. Supports Bayesian Tobit quantile regression with double adaptive Lasso penalty ('PDAL-BTQR'), double Lasso penalty ('PDL-BTQR'), and unpenalized mixed-effects ('P-BTQR'). Handles left, right, interval, and bilateral censoring schemes in longitudinal and clustered structures. Includes Gibbs sampling algorithms, parameter estimation, standard error computation, posterior credible intervals, forecast predictions, DIC, LPML, and diagnostic plotting. References: Tobin (1958) <doi:10.2307/1907382>; Koenker and Bassett (1978) <doi:10.2307/1913643>; Zou (2006) <doi:10.1198/016214506000000735>; Alhamzawi and Yu (2012) <doi:10.1016/j.csda.2011.11.018>; Zhao et al. (2024) <doi:10.3390/math12121782>. |
| Authors: | Shikhar Tyagi [aut, cre] (ORCID: <https://orcid.org/0000-0003-1606-0844>), Arvind Pandey [aut], Bhupendra Singh [aut], Vrijesh Tripathi [aut] |
| Maintainer: | Shikhar Tyagi <[email protected]> |
| License: | GPL (>= 3) |
| Version: | 0.1.0 |
| Built: | 2026-10-06 10:17:27 UTC |
| Source: | https://github.com/cran/BDPTobitQR |
Implements Bayesian Double-Penalty Tobit Quantile Regression methods for longitudinal interval-censored data as proposed by Zhao et al. (2024). Supports double adaptive Lasso ('PDAL-BTQR'), double Lasso ('PDL-BTQR'), and unpenalized mixed-effects ('P-BTQR').
| Package: | BDPTobitQR |
| Type: | Package |
| Version: | 0.1.0 |
| Date: | 2026-07-28 |
| License: | GPL (>= 3) |
| LazyData: | true |
The main entry point is bdp_tobit_qr.
Shikhar Tyagi, Arvind Pandey, Bhupendra Singh, Vrijesh Tripathi
Maintainer: Shikhar Tyagi <[email protected]>
Zhao, K., Shu, T., Hu, C., and Luo, Y. (2024). Research on Quantile Regression Method for Longitudinal Interval-Censored Data Based on Bayesian Double Penalty. Mathematics, 12(12), 1782. doi:10.3390/math12121782
Fits Bayesian Tobit quantile regression models for longitudinal or clustered interval-censored data using double adaptive Lasso penalty ('PDAL-BTQR'), double Lasso penalty ('PDL-BTQR'), or unpenalized mixed-effects ('P-BTQR') as proposed by Zhao et al. (2024).
bdp_tobit_qr( formula, random = ~1, data, id, lower = -Inf, upper = Inf, tau = 0.5, method = c("PDAL-BTQR", "PDL-BTQR", "P-BTQR"), n_iter = 5000, burn_in = 1000, thin = 1, hyperparams = list( e0 = 0.1, f0 = 0.1, g0 = 0.1, h0 = 0.1, c0 = 0.001, d0 = 0.001 ), verbose = FALSE )bdp_tobit_qr( formula, random = ~1, data, id, lower = -Inf, upper = Inf, tau = 0.5, method = c("PDAL-BTQR", "PDL-BTQR", "P-BTQR"), n_iter = 5000, burn_in = 1000, thin = 1, hyperparams = list( e0 = 0.1, f0 = 0.1, g0 = 0.1, h0 = 0.1, c0 = 0.001, d0 = 0.001 ), verbose = FALSE )
formula |
Object of class |
random |
Formula or design matrix describing the random-effects part of the model. Default is |
data |
Data frame containing the variables in the model. |
id |
Vector or column name in |
lower |
Lower censoring limit or vector of lower limits. Default is |
upper |
Upper censoring limit or vector of upper limits. Default is |
tau |
Quantile level between 0 and 1. Default is 0.5. |
method |
Fitting method: |
n_iter |
Total number of MCMC iterations. Default is 5000. |
burn_in |
Number of burn-in iterations to discard. Default is 1000. |
thin |
Thinning interval for MCMC chain. Default is 1. |
hyperparams |
List of hyperparameter prior settings: |
verbose |
Logical indicating whether to print MCMC progress. Default is |
The function constructs a double-penalty Bayesian Tobit quantile regression model to perform parameter estimation and variable selection for longitudinal or clustered data restricted by bilateral interval limits. Latent variables are sampled from truncated normal distributions, mixture parameters from Inverse Gaussian distributions, and penalty parameters from Gamma distributions.
An object of class BDPTobitQR containing:
coefficients |
Posterior mean estimates of fixed effects. |
sd |
Posterior standard errors of fixed effects. |
cred_int |
95% equal-tailed posterior credible intervals for fixed effects. |
hdi |
95% highest density intervals for fixed effects. |
random_effects |
Posterior mean estimates of subject-specific random effects. |
sigma |
Posterior estimate of scale parameter sigma. |
fitted.values |
Fitted values for response variable. |
residuals |
Residuals (observed response minus fitted values). |
dic |
Deviance Information Criterion (DIC). |
lpml |
Log Pseudo-Marginal Likelihood (LPML). |
mse |
Mean Squared Error of fitted model. |
mae |
Mean Absolute Error of fitted model. |
mcmc |
List of MCMC chains for fixed effects, random effects, sigma, and penalties. |
call |
Matched call. |
tau |
Quantile level. |
method |
Method name. |
Zhao, K., Shu, T., Hu, C., and Luo, Y. (2024). Research on Quantile Regression Method for Longitudinal Interval-Censored Data Based on Bayesian Double Penalty. Mathematics, 12(12), 1782. doi:10.3390/math12121782
# Simulate longitudinal data dat <- sim_longitudinal_data(n = 10, m = 4, p = 3, tau = 0.5, seed = 123) # Fit PDAL-BTQR model fit <- bdp_tobit_qr( formula = y ~ x1 + x2 + x3, random = ~ 1, data = dat, id = dat$id, lower = dat$lower, upper = dat$upper, tau = 0.5, method = "PDAL-BTQR", n_iter = 500, burn_in = 100 ) summary(fit) print(fit) plot(fit)# Simulate longitudinal data dat <- sim_longitudinal_data(n = 10, m = 4, p = 3, tau = 0.5, seed = 123) # Fit PDAL-BTQR model fit <- bdp_tobit_qr( formula = y ~ x1 + x2 + x3, random = ~ 1, data = dat, id = dat$id, lower = dat$lower, upper = dat$upper, tau = 0.5, method = "PDAL-BTQR", n_iter = 500, burn_in = 100 ) summary(fit) print(fit) plot(fit)
A longitudinal dataset containing interprovincial crime rates and economic indicators across 31 provinces over 7 years (2010–2016), as analyzed in Section 4 of Zhao et al. (2024).
data(crime_data)data(crime_data)
A data frame with 217 rows and 10 variables:
idProvince identifier (1–31).
yearObservation year (2010–2016).
yCrime rate (number of criminal suspects per 10,000 population).
x1Per capita GDP.
x2Urbanization rate.
x3Regional income gap.
x4Educational level.
x5Unemployment rate.
lowerLower limit for interval/tobit censoring.
upperUpper limit for interval/tobit censoring.
Zhao, K., Shu, T., Hu, C., and Luo, Y. (2024). Research on Quantile Regression Method for Longitudinal Interval-Censored Data Based on Bayesian Double Penalty. Mathematics, 12(12), 1782. doi:10.3390/math12121782
data(crime_data) head(crime_data)data(crime_data) head(crime_data)
Generates synthetic longitudinal/panel datasets with interval, left, or right censoring under normal, Student-t, or Asymmetric Laplace random errors, as described in Zhao et al. (2024).
sim_longitudinal_data( n = 20, m = 5, p = 4, beta = NULL, lower_limit = -2, upper_limit = 4, err_dist = c("normal", "t", "ald"), tau = 0.5, seed = NULL )sim_longitudinal_data( n = 20, m = 5, p = 4, beta = NULL, lower_limit = -2, upper_limit = 4, err_dist = c("normal", "t", "ald"), tau = 0.5, seed = NULL )
n |
Number of subjects/clusters. Default is 20. |
m |
Number of time points per subject. Default is 5. |
p |
Number of fixed-effects covariates. Default is 4. |
beta |
Vector of true fixed-effects coefficients. If |
lower_limit |
Lower censoring bound e_N. Default is -2. |
upper_limit |
Upper censoring bound e_M. Default is 4. |
err_dist |
Error distribution: |
tau |
Quantile level for ALD errors. Default is 0.5. |
seed |
Optional random seed. |
A data frame containing simulated longitudinal data with columns id, time, y, y_star, lower, upper, and covariates x1, x2, etc.
Zhao, K., Shu, T., Hu, C., and Luo, Y. (2024). Research on Quantile Regression Method for Longitudinal Interval-Censored Data Based on Bayesian Double Penalty. Mathematics, 12(12), 1782. doi:10.3390/math12121782
dat <- sim_longitudinal_data(n = 10, m = 4, p = 3, seed = 42) head(dat)dat <- sim_longitudinal_data(n = 10, m = 4, p = 3, seed = 42) head(dat)