R/beta_k.R

Defines functions beta_k

Documented in beta_k

beta_k <-
function(priorHyperParam, cellCounts){
  n <- sum(cellCounts)
  p <- range(as.numeric(unlist(dimnames(cellCounts))))
  p <- (p[2] - p[1] + 1)^2
  
  if(priorHyperParam == "Jeffreys") prior <- 1/2 else
    if(priorHyperParam == "BLUnif") prior <- 1 else
      if(priorHyperParam == "Perks") prior <- 1/p else
        if(priorHyperParam == "MiniMax") prior <- sqrt(n)/p else
          stop("Unknown Prior")
  
  ans <- list(prior = prior, n = n, p = p)
  return(ans)
}

Try the synRNASeqNet package in your browser

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

synRNASeqNet documentation built on May 2, 2019, 6:01 a.m.