Package 'SemiParamBernsteinDepCS'

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

Help Index


Compute Kendall's Tau for Copula Families

Description

Compute Kendall's Tau for Copula Families

Usage

copula_kendall_tau(alpha, copula = c("gumbel", "frank", "clayton"))

Arguments

alpha

Copula parameter.

copula

Character string specifying the copula family.

Value

Numeric value of Kendall's tau correlation coefficient.

Examples

copula_kendall_tau(2.0, "gumbel")
copula_kendall_tau(1.5, "clayton")
copula_kendall_tau(3.0, "frank")

Fit Semiparametric Bayesian Regression for Dependent Current Status Data

Description

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.

Usage

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
)

Arguments

formula_Y

Formula for current status outcome and event covariates, e.g., delta ~ x1 + x2.

formula_T

Formula for observation time and censoring covariates, e.g., time ~ x1 + x2.

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 "PH" for Proportional Hazards or "PO" for Proportional Odds.

copula

Copula family for dependence structure: "gumbel", "frank", or "clayton".

order_m

Order of Bernstein polynomial baseline model (default 2).

order_m_Y

Order of Bernstein polynomial for Y (defaults to order_m).

order_m_T

Order of Bernstein polynomial for T (defaults to order_m).

nu_Y

Upper bound of time domain for Y (defaults to max(time) * 1.05).

nu_T

Upper bound of time domain for T (defaults to max(time) * 1.05).

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.

Value

An object of class semiparam_bernstein_depcs containing MCMC chains, posterior summaries, DIC, log-likelihood, and model specifications.

Examples

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)

Primary Biliary Cirrhosis (PBC) Dependent Current Status Dataset

Description

A benchmark dataset containing clinical trial information from Primary Biliary Cirrhosis (PBC) patients used to analyze dependent current status data.

Usage

data(pbc_depcs)

Format

A data frame with 100 rows and 8 variables:

time

Survival/observation time in days.

status

Censoring indicator for survival time (1 = dead, 0 = censored).

delta

Current status indicator for hepatomegaly onset (1 = present, 0 = absent).

age

Patient age in years.

sex

Patient gender (1 = male, 0 = female).

ascites

Presence of ascites (1 = yes, 0 = no).

bilirubin

Serum bilirubin level in mg/dl.

albumin

Serum albumin level in g/dl.

Source

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

Description

Plot Predicted Survival Curves or Diagnostics

Usage

## S3 method for class 'semiparam_bernstein_depcs'
plot(x, type = c("survival", "trace", "hazard"), ...)

Arguments

x

An object of class semiparam_bernstein_depcs.

type

Character string indicating plot type: "survival", "trace", or "hazard".

...

Additional graphic parameters.

Value

Invisible NULL.


Predict Survival and Cumulative Hazards for New Data

Description

Computes predicted marginal survival curves S_Y(t | X_new) and S_T(t | X_new) with HPD intervals.

Usage

## S3 method for class 'semiparam_bernstein_depcs'
predict(object, newdata = NULL, times = NULL, prob = 0.95, ...)

Arguments

object

An object of class semiparam_bernstein_depcs.

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.

Value

A list containing predicted survival probabilities and HPD bounds for Y and T.

Examples

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

Description

Print Summary of Fitted SemiParamBernsteinDepCS Model

Usage

## S3 method for class 'semiparam_bernstein_depcs'
print(x, ...)

Arguments

x

An object of class semiparam_bernstein_depcs.

...

Additional arguments passed to print.

Value

Invisible x.


Simulate Dependent Current Status Data

Description

Generates synthetic current status data with dependent censoring based on copula models and Weibull/Bernstein marginal distributions.

Usage

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
)

Arguments

n

Sample size (integer, default 200).

model_type

Character string, either "PH" for Proportional Hazards or "PO" for Proportional Odds.

copula

Copula family: "gumbel", "frank", or "clayton".

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.

Value

A data frame containing simulated columns: time, status, delta, x1, x2.

Examples

set.seed(42)
dat <- sim_bernstein_depcs(n = 50, model_type = "PH", copula = "gumbel")
head(dat)

Summarize Fitted SemiParamBernsteinDepCS Model

Description

Summarize Fitted SemiParamBernsteinDepCS Model

Usage

## S3 method for class 'semiparam_bernstein_depcs'
summary(object, prob = 0.95, ...)

Arguments

object

An object of class semiparam_bernstein_depcs.

prob

Credible interval level (default 0.95).

...

Additional arguments.

Value

A summary table object.