R/impute-ic.R
ic_pred_cache.RdConstructs the (subjects \(\times\) intervals) grid on the fixed
cut-points and evaluates the lpmatrix of the fitted PAMM once, so that
across imputations only the linear predictor (and hence the hazard) needs to
be recomputed for a new coefficient draw. Rows are subject-major: the first
n_int rows belong to subject 1, the next n_int to subject 2,
etc., so that matrix(h, nrow = n_int) has one column per subject.
ic_pred_cache(object, ic, cut, cause_levels = NULL, cause_var = "cause")A fitted pamm model used as imputation model.
A data frame as returned by parse_ic_surv (subject-
level, with covariates and ic_L/ic_R/ic_kind).
The fixed vector of interval cut-points (shared across imputations).
Optional character vector of competing-risk cause levels.
When supplied, one lpmatrix per cause is built and returned in
X_list.
Name of the cause column expected by the model.
A list with the interval information ii, n_int,
n_sub, and either a single design matrix X or a list
X_list (competing risks).