R/fbtr.R

Defines functions fbtr

###
### R routines for the R package mixmeta (c)
#
fbtr <-
function(A,k) {
#
################################################################################
# FUNCTION TO COMPUTE THE (BLOCK-DIAGONAL) TRACE OF A MATRIX
  btrA <- 0
  for(i in seq(dim(A)[1]/k)) {
    ind <- (i-1)*k+1:k
    btrA <- btrA + A[ind,ind]
  }
#
  btrA
}

Try the mixmeta package in your browser

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

mixmeta documentation built on Oct. 16, 2021, 5:09 p.m.