Object Reference : Object View and Procedure Reference : Alpha
  
 
freq
Compute frequency tables.
freq performs a one-way frequency tabulation.
Frequencies are computed for the current sample of observations. Observations with NAs (blank strings) are dropped unless included by option. You may use options to control automatic binning (grouping) of values and the order of the entries of the table.
Syntax
alpha_name.freq(options)
Options
 
dropna (default) / keepna
[Drop/Keep] NA as a category.
n, obs, count (default)
Display frequency counts.
nocount
Do not display frequency counts.
prompt
Force the dialog to appear from within a program.
p
Print the table.
total (default) / nototal
[Display / Do not display] totals.
pct (default) / nopct
[Display / Do not display] percent frequencies.
cum (default) / nocum
(Display/Do not) display cumulative frequency counts/percentages.
sort=arg (default=“lohi”)
Sort order for entries in the frequency table: high data value to low ("hilo"), low data value to high ("lohi" –default), high frequency to low ("freqhilo"), low frequency to high ("freqlohi").
prompt
Force the dialog to appear from within a program.
p
Print the table.
Examples
names.freq
tabulates the values in NAMES in ascending alphabetical order, displaying counts, percentages, and cumulatives.
names.freq(sort=freqhilo)
tabulates NAMES with the table rows ordered from values with highest frequency to lowest.
Cross-references
See “One-Way Tabulation” for a discussion of frequency tables.