R/calculateW.R

Defines functions calculateW

.calculateW <- function(meth,size_t,e_t){
  temp_t <- t(t(meth)/size_t)
  q <- temp_t/e_t
  #  q[is.na(q)] <- 0
  resi <- q-rowMeans(q)
  w <- rowSums(resi^2)/(length(size_t)-1)
  w <- pmax(w,1e-8)
  return(w)
}

Try the QNB package in your browser

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

QNB documentation built on Nov. 17, 2017, 8:09 a.m.