| check_consistent_pfs {psm3mkv} | R Documentation |
Check consistency of PFS definition
Check that PFS is defined consistently with TTP and OS in a dataset. This convenience function compares pfs.durn with the lower of ttp.durn and os.durn, and checks that the event field pfs.flag is consistent with ttp.flag and os.flag (is 1 when either ttp.flag or os.flag is one).
Description
Check consistency of PFS definition
Check that PFS is defined consistently with TTP and OS in a dataset. This convenience function compares pfs.durn with the lower of ttp.durn and os.durn, and checks that the event field pfs.flag is consistent with ttp.flag and os.flag (is 1 when either ttp.flag or os.flag is one).
Usage
check_consistent_pfs(ds)
Arguments
ds |
Tibble of complete patient-level dataset
|
Value
List containing:
-
durn: Logical vector comparing expected and actual PFS durations -
flag: Logical vector comparing expected and actual PFS event flags -
all: Single logical value of TRUE if all durations and flags match as expected, FALSE otherwise
Examples
ponc <- create_dummydata("pharmaonc")
check_consistent_pfs(ponc)