This function calculates the Aalen Johansen estimator of
adverse events observed in [0, tau].
Please also refer to stegherr_estimating_2021;textualsavvyr.
Usage
aalen_johansen(data, ce, tau)
Value
(vector) with the following entries:
ae_prob: Estimated probability of AE.
ae_prob_var: Variance of that estimate.
ce_prob: Estimated probability of competing events.
ce_prob_var: Variance of competing events.
Arguments
data
(data.frame) with columns including
time_to_event: Time to the first AE, death or soft competing event.
type_of_event: 0 for censored, 1 for AE, 2 for death, 3 for soft competing event.
ce
(number) code for competing event.
tau
(number) milestone at which Aalen-Johansen is computed.