R/var_ic.R

Defines functions var_ic

Documented in var_ic

#' @export
var_ic <- function(x, ...) {
  N <- crossprod(!is.na(x))
  V <- var(x, use="pairwise.complete.obs")*(N-1)/N^2
  V[N==0] <- 0
  return(V)
}
kkholst/lava documentation built on Feb. 22, 2024, 4:07 p.m.