R/impute-ic.R
impute_ic_times.RdFor a fitted PAMM with piecewise-constant hazard, draws
\(T_i \sim p(T \mid L_i < T \le R_i, x_i, \theta)\) by inverting the
cumulative-hazard increment between \(L_i\) and \(R_i\). Exact and
right-censored observations are returned unchanged (right-censored subjects
are not imputed: they contribute correctly as censored at ic_L).
impute_ic_times(object, ic, cut, beta = NULL, cache = NULL)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).
Coefficient vector to evaluate the hazard at. Defaults to
coef(object); pass a posterior draw for proper multiple imputation.
Optional pre-built cache from ic_pred_cache; avoids
recomputing the (expensive) design matrix across imputations.
Numeric vector of (possibly imputed) event times, length
nrow(ic).