R/thetaBayes.R

Defines functions thetaBayes

Documented in thetaBayes

thetaBayes <-
function(cellCounts, priorHyperParam = priorHyperParam){
  npprior <- beta_k(priorHyperParam = priorHyperParam,
                            cellCounts = cellCounts)
  B <- npprior$p * npprior$prior
  
  thetak <- (cellCounts + npprior$prior)/(npprior$n + B)
  theta0 <- npprior$prior/(npprior$n + B)
  
  ans <- list(thetak = thetak, theta0 = theta0, p = npprior$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.