View source: R/aalen_johansen.R
| aalen_johansen | R Documentation |
Computes nonparametric estimates of transition probabilities using the Aalen-Johansen estimator via Nelson-Aalen cumulative hazard increments and product-integral construction.
aalen_johansen(msdata, s = 0)
msdata |
An |
s |
Legacy numeric starting-time argument. Only |
The Aalen-Johansen estimator generalizes the Kaplan-Meier estimator to multistate models. RFmstate exposes it as a descriptive, covariate-free calendar-time population benchmark from the recorded common baseline.
The estimator uses calendar-time risk sets and is separate from the package's clock-reset semi-Markov forest solver. It is a covariate-free descriptive benchmark from the common baseline. Observed competing exits are transitions, not external censoring. No clipping or row normalization is applied.
An object of class "aj_estimate" containing:
Numeric vector of unique event times.
List of calendar-time product-integral point-estimate matrices from the recorded common baseline at each event time.
Matrix of state occupation probabilities over time. Rows are time points, columns are states.
List of Nelson-Aalen cumulative hazard matrices.
List of hazard increment matrices at each event time.
Matrix of at-risk counts over time.
Data frame of event counts per transition.
The multistate structure used.
The starting time.
Calendar time from the common study origin.
Statement that no validated variance or confidence interval is returned.
Only the recorded common baseline s = 0 is supported. The function
does not support left truncation, general conditional P(s,t) for
s > 0, covariate adjustment, or validated variance/confidence bands.
The point estimate should not be described as the covariate-free form of the
clock-reset forest model.
ms <- clinical_states()
dat <- sim_clinical_data(n = 200, structure = ms, seed = 42)
msdata <- prepare_data(
data = dat, id = "ID", structure = ms,
time_map = list(
Responded = "time_Responded",
Unresponded = "time_Unresponded",
Stabilized = "time_Stabilized",
Progressed = "time_Progressed",
Death = "time_Death"
),
censor_col = "time_censored",
covariates = c("age", "sex", "BMI", "treatment")
)
aj <- aalen_johansen(msdata)
print(aj)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.