R/1.2.1.getResidualMatrix.R

Defines functions getResidualMatrix

getResidualMatrix <- function(fit) {
  responseMatrix <- do.call(rbind, lapply(fit$individuals, function(ind) t(ind$yi)))
  residuals <- responseMatrix - fit$fitted

  rownames(residuals) <- paste0("ind", seq(fit$info$N))

  return(residuals)
}

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.