permutationScoreModel: Empirical permutation test of significance of...

Description Usage Arguments Value Examples

View source: R/EmpiricalFns.R

Description

Treat permutation re-samples as similar to bootstrap replications.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
permutationScoreModel(
  modelValues,
  yValues,
  scoreFn,
  ...,
  na.rm = FALSE,
  returnScores = FALSE,
  nRep = 100,
  parallelCluster = NULL
)

Arguments

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.

Value

summaries

Examples

1
2
3
4
5
6
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)

sigr documentation built on June 12, 2021, 9:07 a.m.