| Title: | Semiparametric Bayesian Regression for Dependent Current Status Data |
|---|---|
| Description: | Implements a semiparametric Bayesian regression framework using Bernstein polynomial baseline models for analyzing dependent current status data. The package accommodates proportional hazards (PH) and proportional odds (PO) regression models with Archimedean copulas ('Gumbel', 'Frank', and 'Clayton') to model the joint dependence structure between event and observation or censoring times. Estimation is performed using a Robust Adaptive Metropolis (RAM) Markov Chain Monte Carlo ('MCMC') algorithm. Model comparison metrics including Deviance Information Criterion ('DIC') and posterior summaries with Highest Posterior Density ('HPD') intervals and Kendall's tau are provided. Methodological details are described in Sharma and Balakrishnan (2026) <doi:10.1080/02664763.2026.2701921>. |
| 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-15 10:49:55 UTC |
| Source: | https://github.com/cran/SemiParamBernsteinDepCS |
Compute Kendall's Tau for Copula Families
copula_kendall_tau(alpha, copula = c("gumbel", "frank", "clayton"))copula_kendall_tau(alpha, copula = c("gumbel", "frank", "clayton"))
alpha |
Copula parameter. |
copula |
Character string specifying the copula family. |
Numeric value of Kendall's tau correlation coefficient.
copula_kendall_tau(2.0, "gumbel") copula_kendall_tau(1.5, "clayton") copula_kendall_tau(3.0, "frank")copula_kendall_tau(2.0, "gumbel") copula_kendall_tau(1.5, "clayton") copula_kendall_tau(3.0, "frank")
Fits a semiparametric Bayesian regression model using Bernstein polynomials and Archimedean copulas for dependent current status survival data. Supports Proportional Hazards (PH) and Proportional Odds (PO) models.
fit_semiparam_bernstein_depcs( formula_Y = NULL, formula_T = NULL, data = NULL, time = NULL, status = NULL, delta = NULL, X_Y = NULL, X_T = NULL, model_type = c("PH", "PO"), copula = c("gumbel", "frank", "clayton"), order_m = 2, order_m_Y = NULL, order_m_T = NULL, nu_Y = NULL, nu_T = NULL, n_iter = 2000, n_burn = 500, thin = 1, seed = NULL, priors = NULL ) fit_bernstein_depcs( formula_Y = NULL, formula_T = NULL, data = NULL, time = NULL, status = NULL, delta = NULL, X_Y = NULL, X_T = NULL, model_type = c("PH", "PO"), copula = c("gumbel", "frank", "clayton"), order_m = 2, order_m_Y = NULL, order_m_T = NULL, nu_Y = NULL, nu_T = NULL, n_iter = 2000, n_burn = 500, thin = 1, seed = NULL, priors = NULL )fit_semiparam_bernstein_depcs( formula_Y = NULL, formula_T = NULL, data = NULL, time = NULL, status = NULL, delta = NULL, X_Y = NULL, X_T = NULL, model_type = c("PH", "PO"), copula = c("gumbel", "frank", "clayton"), order_m = 2, order_m_Y = NULL, order_m_T = NULL, nu_Y = NULL, nu_T = NULL, n_iter = 2000, n_burn = 500, thin = 1, seed = NULL, priors = NULL ) fit_bernstein_depcs( formula_Y = NULL, formula_T = NULL, data = NULL, time = NULL, status = NULL, delta = NULL, X_Y = NULL, X_T = NULL, model_type = c("PH", "PO"), copula = c("gumbel", "frank", "clayton"), order_m = 2, order_m_Y = NULL, order_m_T = NULL, nu_Y = NULL, nu_T = NULL, n_iter = 2000, n_burn = 500, thin = 1, seed = NULL, priors = NULL )
formula_Y |
Formula for current status outcome and event covariates, e.g., |
formula_T |
Formula for observation time and censoring covariates, e.g., |
data |
Data frame containing variables in formulas. |
time |
Vector of observation times (if formulas not provided). |
status |
Vector of observation time censoring indicators (1 = uncensored/event for T, 0 = administrative censoring). |
delta |
Vector of current status indicators (1 = Y <= T, 0 = Y > T). |
X_Y |
Design matrix for event time Y covariates. |
X_T |
Design matrix for observation time T covariates. |
model_type |
Character string, either |
copula |
Copula family for dependence structure: |
order_m |
Order of Bernstein polynomial baseline model (default 2). |
order_m_Y |
Order of Bernstein polynomial for Y (defaults to |
order_m_T |
Order of Bernstein polynomial for T (defaults to |
nu_Y |
Upper bound of time domain for Y (defaults to |
nu_T |
Upper bound of time domain for T (defaults to |
n_iter |
Total MCMC iterations (default 2000). |
n_burn |
Burn-in iterations to discard (default 500). |
thin |
Thinning interval (default 1). |
seed |
Optional random seed. |
priors |
List of prior hyperparameters. |
An object of class semiparam_bernstein_depcs containing MCMC chains, posterior summaries, DIC, log-likelihood, and model specifications.
set.seed(123) dat <- sim_bernstein_depcs(n = 100, model_type = "PH", copula = "gumbel") fit <- fit_semiparam_bernstein_depcs( formula_Y = delta ~ x1 + x2, formula_T = time ~ x1 + x2, data = dat, model_type = "PH", copula = "gumbel", order_m = 2, n_iter = 500, n_burn = 100 ) print(fit) summary(fit)set.seed(123) dat <- sim_bernstein_depcs(n = 100, model_type = "PH", copula = "gumbel") fit <- fit_semiparam_bernstein_depcs( formula_Y = delta ~ x1 + x2, formula_T = time ~ x1 + x2, data = dat, model_type = "PH", copula = "gumbel", order_m = 2, n_iter = 500, n_burn = 100 ) print(fit) summary(fit)
A benchmark dataset containing clinical trial information from Primary Biliary Cirrhosis (PBC) patients used to analyze dependent current status data.
data(pbc_depcs)data(pbc_depcs)
A data frame with 100 rows and 8 variables:
Survival/observation time in days.
Censoring indicator for survival time (1 = dead, 0 = censored).
Current status indicator for hepatomegaly onset (1 = present, 0 = absent).
Patient age in years.
Patient gender (1 = male, 0 = female).
Presence of ascites (1 = yes, 0 = no).
Serum bilirubin level in mg/dl.
Serum albumin level in g/dl.
Mayo Clinic trial data on Primary Biliary Cirrhosis (PBC), adapted for dependent current status analysis in Sharma and Balakrishnan (2026) <doi:10.1080/02664763.2026.2701921>.
Plot Predicted Survival Curves or Diagnostics
## S3 method for class 'semiparam_bernstein_depcs' plot(x, type = c("survival", "trace", "hazard"), ...)## S3 method for class 'semiparam_bernstein_depcs' plot(x, type = c("survival", "trace", "hazard"), ...)
x |
An object of class |
type |
Character string indicating plot type: |
... |
Additional graphic parameters. |
Invisible NULL.
Computes predicted marginal survival curves S_Y(t | X_new) and S_T(t | X_new) with HPD intervals.
## S3 method for class 'semiparam_bernstein_depcs' predict(object, newdata = NULL, times = NULL, prob = 0.95, ...)## S3 method for class 'semiparam_bernstein_depcs' predict(object, newdata = NULL, times = NULL, prob = 0.95, ...)
object |
An object of class |
newdata |
Optional data frame or list containing new covariate values. If NULL, uses average covariate values. |
times |
Grid of time points to evaluate predictions. If NULL, defaults to 50 points over [0, nu]. |
prob |
Credible interval level (default 0.95). |
... |
Additional arguments. |
A list containing predicted survival probabilities and HPD bounds for Y and T.
set.seed(123) dat <- sim_bernstein_depcs(n = 100, model_type = "PH", copula = "gumbel") fit <- fit_semiparam_bernstein_depcs( formula_Y = delta ~ x1 + x2, formula_T = time ~ x1 + x2, data = dat, n_iter = 500, n_burn = 100 ) pred <- predict(fit, times = seq(0.1, 2, length.out = 10))set.seed(123) dat <- sim_bernstein_depcs(n = 100, model_type = "PH", copula = "gumbel") fit <- fit_semiparam_bernstein_depcs( formula_Y = delta ~ x1 + x2, formula_T = time ~ x1 + x2, data = dat, n_iter = 500, n_burn = 100 ) pred <- predict(fit, times = seq(0.1, 2, length.out = 10))
Print Summary of Fitted SemiParamBernsteinDepCS Model
## S3 method for class 'semiparam_bernstein_depcs' print(x, ...)## S3 method for class 'semiparam_bernstein_depcs' print(x, ...)
x |
An object of class |
... |
Additional arguments passed to print. |
Invisible x.
Generates synthetic current status data with dependent censoring based on copula models and Weibull/Bernstein marginal distributions.
sim_bernstein_depcs( n = 200, model_type = c("PH", "PO"), copula = c("gumbel", "frank", "clayton"), alpha = NULL, beta_Y = c(0.5, -0.3), beta_T = c(-0.2, 0.4), scale_Y = 1, shape_Y = 1.5, scale_T = 1, shape_T = 1.2, admin_censor = 3, seed = NULL )sim_bernstein_depcs( n = 200, model_type = c("PH", "PO"), copula = c("gumbel", "frank", "clayton"), alpha = NULL, beta_Y = c(0.5, -0.3), beta_T = c(-0.2, 0.4), scale_Y = 1, shape_Y = 1.5, scale_T = 1, shape_T = 1.2, admin_censor = 3, seed = NULL )
n |
Sample size (integer, default 200). |
model_type |
Character string, either |
copula |
Copula family: |
alpha |
Copula dependence parameter (default 2.0 for Gumbel/Clayton, 3.0 for Frank). |
beta_Y |
Numeric vector of true regression coefficients for Y (default c(0.5, -0.3)). |
beta_T |
Numeric vector of true regression coefficients for T (default c(-0.2, 0.4)). |
scale_Y |
Scale parameter for Weibull baseline Y (default 1.0). |
shape_Y |
Shape parameter for Weibull baseline Y (default 1.5). |
scale_T |
Scale parameter for Weibull baseline T (default 1.0). |
shape_T |
Shape parameter for Weibull baseline T (default 1.2). |
admin_censor |
Administrative censoring time limit (default 3.0). |
seed |
Optional random seed. |
A data frame containing simulated columns: time, status, delta, x1, x2.
set.seed(42) dat <- sim_bernstein_depcs(n = 50, model_type = "PH", copula = "gumbel") head(dat)set.seed(42) dat <- sim_bernstein_depcs(n = 50, model_type = "PH", copula = "gumbel") head(dat)
Summarize Fitted SemiParamBernsteinDepCS Model
## S3 method for class 'semiparam_bernstein_depcs' summary(object, prob = 0.95, ...)## S3 method for class 'semiparam_bernstein_depcs' summary(object, prob = 0.95, ...)
object |
An object of class |
prob |
Credible interval level (default 0.95). |
... |
Additional arguments. |
A summary table object.