Skip to contents

Generate PFS and OS using the three-states model

Usage

CorrelatedPfsAndOs3(n, h01, h02, h12, pfs_name = "pfs", os_name = "os")

Arguments

n

integer. Number of observations.

h01

constant transition hazard from state "stable" to state "progression".

h02

constant transition hazard from state "stable" to state "death".

h12

constant transition hazard from state "progression" to state "death".

pfs_name

column name of PFS in returned data frame. It must be consistent with `name` in the function `endpoint()`.

os_name

column name of OS in returned data frame. It must be consistent with `name` in the function `endpoint()`.

Value

A data frame of four columns, including PFS, OS and their event indicators. The event indicators are all 1s.

Examples


pfs_and_os_trt <- CorrelatedPfsAndOs3(1e4, 0.06, 0.30, 0.30, 'PFS', 'OS')
pfs_and_os_pbo <- CorrelatedPfsAndOs3(1e4, 0.10, 0.40, 0.30, 'PFS', 'OS')