R/xcov.R

Defines functions xcov

Documented in xcov

#' @rdname corcov
#' @export
xcov <- function(X, Y, method = c("Unbiased", "ML")) {
  stopifnot(nrow(X) == nrow(Y))
  method    <- match.arg(method)
  norm_type <- ifelse(method == "Unbiased", 0L, 1L)
  ans       <- xcovArma(X = X, Y = Y, norm_type = norm_type) 
  colnames(ans) <- colnames(Y)
  rownames(ans) <- colnames(X)
  return(ans)
}
AEBilgrau/correlateR documentation built on Nov. 15, 2019, 9:21 a.m.