R/n_eff_alls.R

#' @export
#' @rdname metrics
n_eff_alls <- function(x, stratum) {
  if (missing(stratum)) {
    1 / (1 - het_exp(x))
  } else {
    t(sapply(split(1:nrow(x), stratum), function(i, g) n_eff_alls(g[i, , ]), g = x))
  }
}
jmsigner/fpga documentation built on May 19, 2019, 1:56 p.m.