Competing Risks with Relative Entropy Integration with a Competing Risk Prior Model
Source:R/CompRiskRE_CP.R
CompRiskRE_CP.Rd
This function implements the Relative Entropy (RE) framework for discrete-time competing risk models with the prior model is a competing risk prior model.
Usage
CompRiskRE_CP(
beta_cor = 0.9,
eta,
N_ext = 5000,
N_loc = 2000,
N_val = 200,
N_test = 5000,
nCause = 2,
mu = 1,
sigma = 0.05,
seed = 123
)
Arguments
- beta_cor
Numeric correlation level between external and local models. Must be one of
1.0, 0.9, 0.7, 0.5, 0.4, 0.3, 0.1, 0
.- eta
Numeric vector of Relative Entropy regularization parameters.
- N_ext
Sample size for external data (default: 5000).
- N_loc
Sample size for local data (default: 2000).
- N_val
Sample size for validation data (default: 200).
- N_test
Sample size for test data (default: 5000).
- nCause
Number of competing causes (default: 2).
- mu
Mean of covariates (default: 1).
- sigma
Standard deviation of covariates (default: 0.05).
- seed
Random seed for reproducibility.
Value
A list with two components:
- models
Fitted models:
prior
,local
,joint
, andKL
(per eta value).- metrics
Performance results including validation/test deviance, C-indices, and AIC across eta values.
Examples
if (FALSE) { # \dontrun{
eta <- generate_eta(method = "exponential", n = 30, max_eta = 30)
res <- CompRiskRE_CP(beta_cor = 0.9, eta = eta, seed = 2024)
res$metrics
} # }