inst/poolCov.R

poolCov <- function(weightMat, listOfMatrices, row) {
  prods <- lapply(1:length(listOfMatrices), function(i) {
    listOfMatrices[[i]] * weightMat[row, i]
  })
  Reduce("+", prods) / sum(weightMat[row,])
}
BenBarnard/covEstR documentation built on May 7, 2019, 7:58 a.m.