R/1.4.main.R

Defines functions getSigmaMatrix

getSigmaMatrix <- function(sigma, modelComponents, formula) {
  if (is.character(sigma)) {
    if (sigma == "identity") {
      sigmaMatrix <- getSigmaIdentity(modelComponents)
    } else if (sigma == "exchangeable") {
      sigmaMatrix <- getSigmaExchangeable(modelComponents)
    } else if (sigma == "autoregressive") {
      sigmaMatrix <- getSigmaAutoregressive(modelComponents)
    }
  } else {
    sigmaMatrix <- sigma
    attr(sigmaMatrix, "type") <- "customized"
  }

  return(sigmaMatrix)
}

Try the Mmcsd package in your browser

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

Mmcsd documentation built on March 31, 2023, 7:23 p.m.