Object Reference : Object View and Procedure Reference : Vector
  
 
freq
Compute frequency tables.
The freq command performs a one-way frequency tabulation.
Frequencies are computed for all of the rows in the vector. Rows with NAs 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
vector_name.freq(options)
Options
 
dropna (default) / keepna
[Drop/Keep] NA as a category.
v=integer (default=1000)
Make bins if the number of distinct values or categories exceeds the specified number.
nov
Do not make bins on the basis of number of distinct values; ignored if you set “v=integer.”
a=number
(optional) Make bins if average count per distinct value is less than the specified number.
b=integer (default=50)
Maximum number of categories to bin into if performing automatic binning.
n, obs, count (default)
Display frequency counts.
nocount
Do not display frequency counts.
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
vec1.freq(nov, noa)
tabulates all values (no binning) of VEC1, with entries in ascending value order. The table will display counts, percentages, and cumulative frequencies.
vec1.freq(v=200, b=50, keepna, noa)
tabulates VEC1 including NAs. The observations will be binned if VEC1 has more than 200 distinct values; EViews will create at most 50 equal value-width bins. The number of bins may be smaller than 50.
vec1.freq(sort=freqhilo)
tabulates VEC1 with the table rows ordered from values with highest frequency to lowest.
Cross-references
See “One-Way Tabulation” for a discussion of frequency tables.