R/thresdic.R

Defines functions thresdic

Documented in thresdic

thresdic <- function(T){

  n <- size(T)[2]

  term1 <- 0

  for (i in 1:n){
    if (T[i] == 0){
      term1 <- term1 + 1
    }
  }

  if (term1 == 0){ term1 <- .5; n <- n + 1}

  term1 <- term1 / n

  b <- qnorm(term1)

}

Try the InDisc package in your browser

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

InDisc documentation built on June 16, 2021, 9:09 a.m.