truncate_pred_surv: Truncate 'pred_surv' object to minimal that covers a time...

View source: R/pred_surv_class.R

truncate_pred_survR Documentation

Truncate pred_surv object to minimal that covers a time window

Description

Truncate the time and survival probabilities in a pred_surv object to minimal so that predicted/fitted survival probability at end is kept. This function can be used before applying transformations (e.g., DRtransform, Gtransform, IPWtransform) to avoid unnecessary computation. No truncation is applied if end is greater than or equal to the last time in the pred_surv object.

Usage

truncate_pred_surv(pred_surv_obj, end = Inf)

Arguments

pred_surv_obj

pred_surv object.

end

ending point (inclusive) of at which truncation applies. Default is Inf.

Value

A pred_surv object with truncated times.


QIU-Hongxiang-David/SDRsurv documentation built on March 29, 2024, 8:41 a.m.