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")
)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.
sample size in the active treatment group.
annualized eGFR slope in the active group.
annualized eGFR slope in the control group.
sample size in the control treatment group.
event rate per year in the active group for KFRT.
event rate per year in the placebo group for KFRT.
length of follow-up in years.
lower limit of eGFR at baseline.
upper limit of eGFR at baseline.
within-patient standard deviation.
between-patient standard deviation.
number of equidistant visits.
coefficient of dependence of eGFR values and the risk of KFRT.
coefficient of proportionality (between 0 and 1) of the treatment effect. The case of 0 corresponds to the uniform treatment effect.
determines whether to use duplicate measurements at baseline and/or at fixedfy. The default is to use a single measurement.
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 (0.001),
while when the observed eGFR is below 10, the event rate is set to a very high value (10000). 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.
When phi = 0, the treatment effect is fully additive - the same average treatment effect
applies to all patients, regardless of their baseline disease progression rate (CM_P).
When phi = 1, the treatment effect is fully proportional - there is no additive component
(the value of CM_A is irrelevant).
The more relativistic intermediate treatment effect (half proportional and half additive)
can be obtained by setting phi = abs(CM_A - CM_P)/(2*abs(CM_P)).
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.
simHCE() for a general function of simulating hce datasets.
# Example 1
set.seed(2022)
L <- simKHCE(n = 1000, CM_A = -3.25)
dat <- L$HCE
calcWO(dat)
Run the code above in your browser using DataLab