% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/Statistics.R
\name{MAD_Stats}
\alias{MAD_Stats}
\title{Median Absolute Deviation Statistics}
\usage{
MAD_Stats(
  seurat_object,
  group.by = "orig.ident",
  default_var = TRUE,
  mad_var = NULL,
  mad_num = 2
)
}
\arguments{
\item{seurat_object}{Seurat object name.}

\item{group.by}{meta data column to classify samples (default = "orig.ident").}

\item{default_var}{logical.  Whether to include the default meta.data variables of: "nCount_RNA",
"nFeature_RNA", "percent_mito", "percent_ribo", "percent_mito_ribo", and "log10GenesPerUMI"
in addition to variables supplied to \code{mad_var}.}

\item{mad_var}{Column(s) in \verb{@meta.data} to calculate medians for in addition to defaults.
Must be of \code{class()} integer or numeric.}

\item{mad_num}{integer value to multiply the MAD in returned data.frame (default is 2).
Often helpful when calculating a outlier range to base of of median + (X*MAD).}
}
\value{
A data.frame.
}
\description{
Get quick values for X x median absolute deviation for Genes, UMIs, \%mito per cell grouped by meta.data variable.
}
\examples{
\dontrun{
mad_stats <- MAD_Stats(seurat_object = obj, group.by = "orig.ident")
}

}
\concept{stats}
