Estimate significance of AUC by permutation test.

permTestAUC(
  d,
  modelName,
  yName,
  yTarget = TRUE,
  ...,
  na.rm = FALSE,
  returnScores = FALSE,
  nrep = 100,
  parallelCluster = NULL
)

Arguments

d

data.frame

modelName

character model column name

yName

character outcome column name

yTarget

target to match to y

...

extra arguments (not used)

na.rm

logical, if TRUE remove NA values

returnScores

logical if TRUE return detailed permutedScores

nrep

number of permutation repetitions to estimate p values.

parallelCluster

(optional) a cluster object created by package parallel or package snow

Value

AUC statistic

Examples

set.seed(25325) d <- data.frame(x1=c(1,2,3,4,5,6,7,7), y=c(FALSE,TRUE,FALSE,FALSE, TRUE,TRUE,FALSE,TRUE)) permTestAUC(d,'x1','y',TRUE)
#> [1] "AUC test alt. hyp. AUC>AUC(permuted): (AUC=0.6562, s.d.=0.2167, p=n.s.)."