View source: R/solveThreeStateModel.R
| solveThreeStateModel | R Documentation |
The ill-death model consists of three states, initial, progression,
and death. It can be used to model the progression-free survival (PFS)
and overall survival (OS) in clinical trial simulation. It models the
correlation PFS and OS without assumptions on latent status and copula.
Also, it does not assume PFS and OS satisfy the proportional hazard assumption
simultaneously. The three-state ill-death model ensures a nice property that
PFS <= OS with probability one. However, it requires three hazard parameters
under the homogeneous Markov assumption. In practice, hazard parameters are
hard to specify intuitively especially when no trial data is available at
the planning stage.
This function reparametrizes the ill-death model in term of three parameters,
i.e. median of PFS, median of OS, and correlation between PFS and OS. The
output of this function, which consists of the three hazard parameters, can
be used to generate PFS and OS with desired property. It can be used with
the built-in data generator CorrelatedPfsAndOs3() when defining
endpoints in TrialSimulator.
For more information, refer to this vignette.
solveThreeStateModel(
median_pfs,
median_os,
corr,
h12 = seq(0.05, 0.2, length.out = 50)
)
median_pfs |
numeric. Median of PFS. |
median_os |
numeric. Median of OS. |
corr |
numeric vector. Pearson correlation coefficients between PFS and OS. |
h12 |
numeric vector. A set of hazard from progression to
death that may induce the target correlation |
a data frame with columns:
corrtarget Peason's correlation coefficients.
h01hazard from stable to progression.
h02hazard from stable to death.
h12hazard from progression to death.
errorabsolute error between target correlation and correlation
derived from h01, h02, and h12.
dat <- CorrelatedPfsAndOs3(1e6, h01 = .1, h02 = .05, h12 = .12)
cor(dat$pfs, dat$os) ## 0.65
median(dat$pfs) ## 4.62
median(dat$os) ## 9.61
## find h01, h02, h12 that can match to median_pfs, median_os and corr
## should be close to h01 = 0.10, h02 = 0.05, h12 = 0.12 when corr = 0.65
ret <- solveThreeStateModel(median_pfs = 4.6, median_os = 9.6,
corr = seq(.5, .7, length.out=5))
ret
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.