| simKHCE | R Documentation |
hce datasetSimulate a kidney disease hce dataset, capturing eGFR (Estimated Glomerular Filtration Rate) progression over time, along with
a competing and dependent terminal event: KFRT (Kidney Failure Replacement Therapy)
simKHCE(
n,
CM_A,
CM_P = -4,
n0 = n,
TTE_A = 1000,
TTE_P = TTE_A,
fixedfy = 2,
Emin = 20,
Emax = 100,
sigma = NULL,
Sigma = 3,
m = 10,
theta = -0.4605,
phi = 0,
two_meas = c("no", "base", "postbase", "both")
)
n |
sample size in the active treatment group. |
CM_A |
annualized eGFR slope in the active group. |
CM_P |
annualized eGFR slope in the control group. |
n0 |
sample size in the control treatment group. |
TTE_A |
event rate per year in the active group for KFRT. |
TTE_P |
event rate per year in the placebo group for KFRT. |
fixedfy |
length of follow-up in years. |
Emin |
lower limit of eGFR at baseline. |
Emax |
upper limit of eGFR at baseline. |
sigma |
within-patient standard deviation. |
Sigma |
between-patient standard deviation. |
m |
number of equidistant visits. |
theta |
coefficient of dependence of eGFR values and the risk of KFRT. |
phi |
coefficient of proportionality (between 0 and 1) of the treatment effect. The case of 0 corresponds to the uniform treatment effect. |
two_meas |
determines whether to use duplicate measurements at baseline and/or at |
The default setting is TTE_A = TTE_P because, conditional on eGFR level,
the treatment effect does not influence the event rate of KFRT. In this model,
the effect of treatment on KFRT operates entirely through its impact on eGFR decline.
The parameters TTE_A and theta are chosen so that when GFR is 15, the event rate
is 1 per patient per year, and when GFR is 25, the event rate is 0.01 per patient per year. These
parameter values are obtained by solving the equation rate0*exp(GFR*theta) = rate for rate0
and theta. When the observed eGFR is above 30, the event rate is set to a very low value (10E-7),
while when the observed eGFR is below or equal to 7, the event rate is set to a very high value (10E5). This ensures that patients with observed low eGFR values
always experience KFRT, while those with high eGFR values do not.
By default, the standard deviation for within-patient variability, sigma, is set to NULL. When left as NULL, sigma
is calculated as sqrt(0.67*predicted eGFR). This approach results in time-dependent variability for measurements,
where lower predicted eGFR values lead to reduced variability.
Given the overall effect Delta and the placebo progression rate CM_P, a fully uniform (purely additive) treatment effect—meaning the same average effect
applies to all patients regardless of baseline progression—is implemented by setting phi = 0 and CM_A = Delta + CM_P.
A fully proportional treatment effect—no additive component, the effect scales with the baseline rate—is implemented by setting CM_A = CM_P and phi = Delta / |CM_P|.
A more relativistic intermediate effect (half additive and half proportional) is obtained by setting phi = Delta / (2 · |CM_P|) and CM_A = Delta / 2.
The kidney hierarchical composite endpoint is defined in the following order: (1) Kidney Failure Replacement Therapy (KFRT); (2) Sustained eGFR < 15; (3) Sustained 57 percent or more decline in eGFR; (4) Sustained 50 percent or more decline in eGFR; (5) Sustained 40 percent or more decline in eGFR; and (6) Change in eGFR. In practice, because KFRT is frequently initiated when true eGFR is very low, sustained eGFR < 15 events are rarely observed.
a list containing the dataset GFR for longitudinal measurements of
eGFR and the competing KFRT events, the dataset ADET for the time-to-event
kidney outcomes (sustained declines or sustained low levels of eGFR),
and the combined HCE dataset for the kidney hierarchical composite endpoint.
simHCE() for a general function of simulating hce datasets.
# Example 1 - minimal example
set.seed(2022)
L <- simKHCE(n = 1000, CM_A = -3.25)
dat <- L$HCE
calcWO(dat)
# Example 2 - using the most important variables
set.seed(2022)
## The overall treatment effect
Delta <- 0.75
## The placebo progression rate
CM_P <- - 4.5
## Intermediate effect (half additive and half proportional)
delta <- Delta/2
CM_A <- delta + CM_P
phi <- Delta / (2*abs(CM_P))
L <- simKHCE(n = 1000, CM_A = CM_A, CM_P = CM_P,
fixedfy = 4, Emin = 25, Emax = 75, phi = phi)
dat <- L$HCE
calcWO(dat)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.