Chapter Contents

Previous

Next
The UNIVARIATE Procedure

Example 3: Computing Robust Estimators


Procedure features:
PROC UNIVARIATE statement options:
ROBUSTSCALE
TRIMMED=
WINSORIZED=
Data set: STATEPOP

This example


Program
 Note about code
options nodate pageno=1 linesize=80 pagesize=72;

proc univariate data=statepop robustscale trimmed=6 .25
                winsorized=.1;
 Note about code
    var citypop_90;
 Note about code
   title 'United States 1990 Census of Population and Housing';
run;


Output
Because each value of population is unique, the mode is missing.

Both the trimmed and Winsorized means are smaller than the arithmetic mean. This may be due to the positive skewness of the data. PROC UNIVARIATE trims 6 observations or 11.76 percent of the data from the tails. When you request to trim 25 percent of the data, PROC UNIVARIATE trims 13 observations or 25.49 percent of the data from the tails. This is because the number of observations trimmed is the smallest integer greater than or equal to 12.75 (.25×51). Likewise, when you compute a Winsorized mean for 10 percent of the data (.1×51=5.1), PROC UNIVARIATE uses 6 observations or 11.76 percent of the data from the tails.

[HTML Output]
 [Listing Output]


Chapter Contents

Previous

Next

Top of Page

Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.