% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/resid.R
\name{residuals}
\alias{residuals}
\alias{residuals,MSAassess-method}
\title{Calculate model residuals}
\usage{
\S4method{residuals}{MSAassess}(object, vars, type = c("response", "pearson"), ...)
}
\arguments{
\item{object}{\linkS4class{MSAassess} object returned by \code{fit_MSA()}}

\item{vars}{Character vector to indicate which residuals will be calculated.
Available choices from \linkS4class{MSAdata} object are:
"Cinit_mfr", "Cobs_ymfr", "CAAobs_ymafr", "CALobs_ymlfr",
"Iobs_ymi", "IAAobs_ymai", "IALobs_ymli", "SC_ymafrs"}

\item{type}{Character, 'response' for the \code{log(observed/predicted)} values or 'pearson' for calculating Z-scores.
Composition data always use 'pearson'.}

\item{...}{Not used}
}
\value{
A named list based on \code{vars} argument.
}
\description{
Extract residuals from fitted model
}
