Object Reference : Object View and Procedure Reference : Group
  
 
freq
Compute frequency tables for the series in a group.
The freq command performs a one-way or N-way frequency tabulation.
When used with a group containing a single series, freq performs a one-way frequency tabulation.
When used with a group containing multiple series, freq produces an N-way frequency tabulation for all of the series in the group.
Frequencies are computed for the current sample of observations. Observations with NAs are excluded unless included by option. You may use options to control automatic binning (grouping) of numeric values and the order of the entries of the table.
Syntax
group_name.freq(options)
Options
Options common to both one-way and N-way frequency tables
 
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.
nolimit
Remove prompt warning for continuing when the total number of cells is very large.
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.
Options for one-way tables
 
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.
Options for N-way tables
 
table (default)
Display in table mode.
list
Display in list mode.
rowm (default) / norowm
[Display / Do not display] row marginals.
colm (default) / nocolm
[Display / Do not display] column marginals.
tabm (default) / notabm
[Display / Do not display] table marginals—only for more than two series.
subm (default) / nosubm
[Display / Do not display] sub marginals—only for “l” option with more than two series.
full (default) / sparse
(Full/Sparse) tabulation in list display.
totpct / nototpct (default)
[Display / Do not display] percentages of total observations.
tabpct / notabpct (default)
[Display / Do not display] percentages of table observations—only for more than two series.
rowpct / norowpct (default)
[Display / Do not display] percentages of row total.
colpct / nocolpct (default)
[Display / Do not display] percentages of column total.
exp / noexp (default)
[Display / Do not display] expected counts under full independence.
tabexp / notabexp (default)
[Display / Do not display] expected counts under table independence—only for more than two series.
test (default) / notest
[Display / Do not display] tests of independence.
Examples
group g1 hrs
g1.freq(nov, noa)
tabulates each value (no binning) of HRS in ascending value order with counts, percentages, and cumulatives.
group g2 inc
g2.freq(v=200, b=100, keepna, noa)
tabulates INC including NAs. The values will be binned if INC has more than 200 distinct values; EViews will create at most 100 equal value-width bins. The number of bins may be less than 100.
group labor lwage gender race
labor.freq(v=10, norowm, nocolm)
displays tables of binned LWAGE against GENDER for each bin/value of RACE. The table will not contain row and column marginals.
labor.freq(v=10, norowm, nocolm, sort=freqhilo)
displays the same table with the table rows and columns ordered by values with highest frequency to lowest.
Cross-references
See “One-Way Tabulation” and “N-Way Tabulation” for a discussion of frequency tables.