R/criterion.function.R

Defines functions MaxEfficiency.criterion ROC01.criterion MaxProdSpSe.criterion Youden.criterion criterion.function

criterion.function <- function(method = c("Youden", "MaxProdSpSe", "ROC01", "MaxEfficiency"), pop.prev = NULL, se.v, sp.v){

  criterion <- eval(parse(text = paste(method, ".criterion",sep = "")))(pop.prev = pop.prev, se.v = se.v, sp.v = sp.v)
  return(criterion)

}

Youden.criterion <- function(pop.prev = NULL, se.v, sp.v){

  criterion <- se.v + sp.v - 1
  return(criterion)

}

MaxProdSpSe.criterion <- function(pop.prev = NULL, se.v, sp.v){

  criterion <- sp.v * se.v
  return(criterion)

}


ROC01.criterion <- function(pop.prev = NULL, se.v, sp.v){

  criterion <- (sp.v-1)^2+(se.v-1)^2
  return(criterion)

}


MaxEfficiency.criterion <- function(pop.prev, se.v, sp.v){

  criterion <- pop.prev*se.v+(1-pop.prev)*sp.v
  return(criterion)

}

Try the svyROC package in your browser

Any scripts or data that you put into this service are public.

svyROC documentation built on Oct. 25, 2024, 9:07 a.m.