Object Reference : Object View and Procedure Reference : Svector
  
 
freq
Compute frequency tables.
freq performs a one-way frequency tabulation.
Frequencies are computed for all of the rows in the svector. Rows with missing values (blanks) are dropped unless included by option. You may use options to control the order of the entries of the table.
Syntax
svector_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
svec1.freq
tabulates each value of SVEC1 in ascending alphabetical order with counts, percentages, and cumulatives.
svec1.freq(keepna)
tabulates the values of SVEC1 including NAs.
svec1.freq(sort=hilo)
tabulates SVEC1 with the table rows ordered from values with highest frequency to lowest.
Cross-references
See “One-Way Tabulation” for a discussion of frequency tables