% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/statistics_reports.R
\name{outlier_report}
\alias{outlier_report}
\title{Flag univariate and multivariate outliers}
\usage{
outlier_report(
  data,
  variables = NULL,
  method = c("zscore", "iqr", "mahalanobis"),
  z_cut = 3,
  iqr_multiplier = 1.5,
  p_cut = 0.975
)
}
\arguments{
\item{data}{A data.frame.}

\item{variables}{Character vector of numeric variables to screen. When
\code{NULL}, all numeric columns are used.}

\item{method}{Outlier rule. \code{"zscore"} flags absolute z scores above
\code{z_cut}; \code{"iqr"} flags values outside Tukey fences; \code{"mahalanobis"}
flags rows above the chi-square cutoff for the selected variables.}

\item{z_cut}{Numeric cutoff for \code{"zscore"}. Defaults to \code{3}.}

\item{iqr_multiplier}{Numeric multiplier for \code{"iqr"} fences. Defaults to
\code{1.5}.}

\item{p_cut}{Probability cutoff for \code{"mahalanobis"}. Defaults to \code{0.975}.}
}
\value{
An object of class \code{sframe_outlier_report} with the method, screened
variables, a result table, flagged row numbers, and a reporting prompt.
}
\description{
Uses transparent screening rules for numeric survey response variables. The
report supports data review before modelling, not automatic deletion.
}
\examples{
demo <- sframe_demo_data()
outliers <- outlier_report(
  demo$responses,
  variables = c("dm_1", "dm_2", "sat_1"),
  method = "zscore"
)
outliers$flagged_rows
}
