powered by
Treat permutation re-samples as similar to bootstrap replications.
permutationScoreModel( modelValues, yValues, scoreFn, ..., na.rm = FALSE, returnScores = FALSE, nRep = 100, parallelCluster = NULL )
summaries
numeric array of predictions.
numeric/logical array of outcomes, dependent, or truth values
function with signature scoreFn(modelValues,yValues) returning scalar numeric score.
not used, forces later arguments to be bound by name
logical, if TRUE remove NA values
logical if TRUE return detailed permutedScores
integer number of repititions to perform
optional snow-style parallel cluster.
set.seed(25325) y <- 1:5 m <- c(1,1,2,2,2) cor.test(m,y,alternative='greater') f <- function(modelValues,yValues) cor(modelValues,yValues) permutationScoreModel(m,y,f)
Run the code above in your browser using DataLab