Chapter Contents

Previous

Next
The UNIVARIATE Procedure

Example 2: Rounding an Analysis Variable and Identifying Extreme Values


Procedure features:
PROC UNIVARIATE statement options:
FREQ
NEXTROBS=
NEXTRVAL=
ROUND=
ID statement
Data set: STATEPOP

This example

Rounding affects all statistical computations. For this example, when the round unit is 1, all the nonnegative values below .5 round to zero.


Program

options nodate pageno=1 linesize=80 pagesize=68;
 Note about code
proc univariate data=statepop freq round=1 nextrobs=2
                nextrval=4;
 Note about code
    var citypop_90;
 Note about code
    id region state;
    title 'United States Census of Population and Housing';
run;


Output
The output includes a message to indicate that the values are rounded to the nearest integer.

The Extreme Observations table lists values of the ID variables, Region and State. Region 4 reports the lowest metropolitan populations, while region 1 and region 4 report the highest populations. The states with the four most extreme observations are AK, WY, NY, and CA.

The Extreme Values table lists the four lowest unique values and the four highest unique values. Because ties occur in the values, the frequency counts of the values are shown.

The Frequency Counts table lists the variable values, the frequencies, the percentages, and the cumulative percentages.

[HTML Output]
 [Listing Output]


Chapter Contents

Previous

Next

Top of Page

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