29.12.2013 Views

Base SAS 9.1.3 Procedures Guide - Acsu Buffalo

Base SAS 9.1.3 Procedures Guide - Acsu Buffalo

Base SAS 9.1.3 Procedures Guide - Acsu Buffalo

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

212 Chapter 3. The UNIVARIATE Procedure<br />

When you specify a different key cell with the KEYLEVEL= option, this cell appears<br />

at the upper left corner.<br />

The length of the KEYLEVEL= value cannot exceed 16 characters and you must<br />

specify a formatted value.<br />

The KEYLEVEL= option does not apply unless you specify a HISTOGRAM,<br />

PROBPLOT, or QQPLOT statement.<br />

FREQ Statement<br />

FREQ variable ;<br />

The FREQ statement specifies a numeric variable whose value represents the frequency<br />

of the observation. If you use the FREQ statement, the procedure assumes<br />

that each observation represents n observations, where n is the value of variable. If<br />

the variable is not an integer, the <strong>SAS</strong> System truncates it. If the variable is less<br />

than 1 or is missing, the procedure excludes that observation from the analysis. See<br />

Example 3.6.<br />

Note: The FREQ statement affects the degrees of freedom, but the WEIGHT statement<br />

does not.<br />

HISTOGRAM Statement<br />

HISTOGRAM < variables >< / options >;<br />

The HISTOGRAM statement creates histograms and optionally superimposes estimated<br />

parametric and nonparametric probability density curves. You cannot use the<br />

WEIGHT statement with the HISTOGRAM statement. You can use any number of<br />

HISTOGRAM statements after a PROC UNIVARIATE statement. The components<br />

of the HISTOGRAM statement are described as follows.<br />

variables<br />

are the variables for which histograms are to be created. If you specify a VAR statement,<br />

the variables must also be listed in the VAR statement. Otherwise, the variables<br />

can be any numeric variables in the input data set. If you do not specify variables in<br />

a VAR statement or in the HISTOGRAM statement, then by default, a histogram is<br />

created for each numeric variable in the DATA= data set. If you use a VAR statement<br />

and do not specify any variables in the HISTOGRAM statement, then by default, a<br />

histogram is created for each variable listed in the VAR statement.<br />

For example, suppose a data set named Steel contains exactly two numeric variables<br />

named Length and Width. The following statements create two histograms, one for<br />

Length and one for Width:<br />

proc univariate data=Steel;<br />

histogram;<br />

run;

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!