simuCCP: simuCCP package documentation

Description Usage Arguments Examples

View source: R/simuCPP.R

Description

This function generate multivariate uniform distribution with designed copula family and therotical Concordance probability (C-index, iAUC, AUC)

Usage

1
2
3
4
5
6
7
8
9
simuCCP(
  N,
  metric = "Cind",
  value = 0.7,
  family = c(1, 3, 4),
  c0 = 0.5,
  fam2 = NULL,
  par2 = NULL
)

Arguments

N

sample size

metric

simulate metric (C-index, iAUC, AUC)

value

of therotical value of (C-index, iAUC, AUC)

family

d - 1 dimension of copula family, where d is number of covariates check BiCopPar2Tau for detail.

c0

prevalence; cutoff point of latent uniform parameter (Used in AUC)

fam2

higher order copula family ( dimension: (d^2 - 3d + 2)/2 ) (default: conditional independent)

par2

parameters of higher order copula family ( dimension: (d^2 - 3d + 2)/2 ) (default: all 0)

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
# C-index
#U1 = simuCCP(300, metric = "Cind", value = 0.7, family = c(1,3))$data
#( cor(U1, method = "kendall") + 1 ) / 2

# C-index with a dependent copula
#U1 = simuCCP(300, metric = "Cind", value = 0.7, family = c(1,3), fam2 = 3, par2 = 1)$data
#( cor(U1, method = "kendall") + 1 ) / 2

# AUC
#U1 = simuCCP(300, metric = "AUC", value = 0.7, family = c(1,3))$data
#library(pROC)
#apply(U1[,-1], 2, function(x) auc(U1[,1], x) )

# AUC with a dependent copula
#U1 = simuCCP(300, metric = "AUC", value = 0.7, family = c(1,3), fam2 = 3, par2 = 1)$data
#library(pROC)
#apply(U1[,-1], 2, function(x) auc(U1[,1], x) )

elong0527/simuCPP documentation built on March 29, 2021, 10:03 a.m.