check_consistent_pfs {psm3mkv} | R Documentation |
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).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).
check_consistent_pfs(ds)
ds |
Tibble of complete patient-level dataset
|
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
ponc <- create_dummydata("pharmaonc")
check_consistent_pfs(ponc)