library(simuCCP) library(mvtnorm)
We can use simuCCP::simuCCP
to simulate data with pre-defined C-index and time dependent AUC.
metrics
define different preditive metrics family
define the copula familyFor a Gaussian copula (family = 1
), we can simulate a dataset for C-index = 0.7.
db1 <- simuCCP(N = 200, metric = "Cind", value = 0.7, family = 1) head(db1$data)
For two markers with Gaussian and Clayton copulas (family = c(1,3)
), we can simulate data for C-index both equal to 0.7. The conditional copula between two markers is Gumbel (fam2 = 4
) with parameter 1 (par2 = 1
)
db2 <- simuCCP(300, metric = "Cind", value = 0.7, family = c(1,3), fam2 = 4, par2 = 1) head(db2$data)
There are a set of functions to calculate parameter to predictive metric and vice versa.
simuCCP::BiCopCind2Par
and simuCCP::BiCopPar2Cind
simuCCP::BiCopAUC2Par
and simuCCP::BiCopPar2AUC
For example, we can find a clayton copula parameter for C-index equal to 0.75.
simuCCP::BiCopCind2Par(family = 3, Cind = 0.75)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.