R/addThetas.R

Defines functions addThetas

addThetas <- function(thetas = thetas, iTheta = iTheta, keep = keep) {

  totalTheta <- vector(mode = "list", length = length(iTheta$commonEffect))
  names(totalTheta) <- colnames(iTheta$indEffect)

  for (i in seq_along(totalTheta)) {
    totalTheta[[i]] <- thetas[keep, iTheta$commonEffect[i]] + thetas[keep, iTheta$indEffect[, i]]
  }

  return(totalTheta)
}

Try the quid package in your browser

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

quid documentation built on Dec. 9, 2021, 9:06 a.m.