R/EmpiricalFns.R
permutationScoreModel.Rd
Treat permutation re-samples as similar to bootstrap replications.
permutationScoreModel( modelValues, yValues, scoreFn, ..., na.rm = FALSE, returnScores = FALSE, nRep = 100, parallelCluster = NULL )
modelValues | numeric array of predictions. |
---|---|
yValues | numeric/logical array of outcomes, dependent, or truth values |
scoreFn | function with signature scoreFn(modelValues,yValues) returning scalar numeric score. |
... | not used, forces later arguments to be bound by name |
na.rm | logical, if TRUE remove NA values |
returnScores | logical if TRUE return detailed permutedScores |
nRep | integer number of repititions to perform |
parallelCluster | optional snow-style parallel cluster. |
summaries
#> #> Pearson's product-moment correlation #> #> data: m and y #> t = 3, df = 3, p-value = 0.02883 #> alternative hypothesis: true correlation is greater than 0 #> 95 percent confidence interval: #> 0.1526678 1.0000000 #> sample estimates: #> cor #> 0.8660254 #>#> [1] "Studentized permutation test: is observed score greater than permuted score, summary: p=0.04162"