SAS Macro Programs: outlier
$Version: 1.5-2 (01 Aug 2008)
The OUTLIER macro calculates robust Mahalanobis distances for each
observation in a data set. The results are robust in that
potential outliers do not contribute to the distance of any other
observations. For a multivariate normal sample, the points will lie on a straight line of unit slope; outliers will have squared distances well above the line. A high-resolution plot may be constructed from the
output data set; see the examples in "Section 9.3"
The macro makes one or more passes through the data. Each pass
assigns 0 weight to observations whose DSQ value has
Prob ( chi² ) < PVALUE. The number of
passes should be determined empirically so that no new observations
are trimmed on the last step.
- Name of the data set to analyze
- List of input variables
- Name of an optional ID variable to identify
- Name of the output data set for plotting.
The robust squared distances are named DSQ.
The corresponding theoretical quantiles are
named EXPECTED. The variable _WEIGHT_ has the
value 0 for observations identified as possible
- Probability value of chi²
statistic used to trim observations.
- Number of passes of the iterative trimming
- Print the OUT= data set?