Displayed Output
PROC FREQ displays one-way frequency tables for all
one-way table requests in the TABLES statements,
unless you specify the NOPRINT option in the PROC
statement or the NOPRINT option in the TABLES
statement. For a one-way table showing the frequency
distribution of a single variable, PROC FREQ displays
the following information:
- the name of the variable and its values
- Frequency counts, giving the number
of observations that have each value
- specified Test Frequency counts, if you specify the
CHISQ and TESTF= options to request a chi-square
goodness-of-fit test for specified frequencies
- Percent, giving the percentage of
the total number of observations with that value.
(The NOPERCENT option suppresses this information.)
- specified Test Percents, if you specify the CHISQ and
TESTP= options to request a chi-square goodness-of-fit
test for specified percents. (The NOPERCENT option
suppresses this information.)
- Cumulative Frequency counts, giving the sum of the
frequency counts of that value and all other values
listed above it in the table. The last cumulative
frequency is the total number of nonmissing
observations. (The NOCUM option suppresses this
information.)
- Cumulative Percent values, giving the percentage of
the total number of observations with that value
and all others previously listed in the table.
(The NOCUM or the NOPERCENT option suppresses this
information.)
- Frequency Missing, or the number of observations with
missing values
For one-way tables, two statistical options are available
in the TABLES statement. The CHISQ option provides a
chi-square goodness-of-fit test, and the BINOMIAL option
provides binomial proportion statistics. PROC FREQ
displays the following information, unless you specify
the NOPRINT option in the PROC statement:
- If you specify the CHISQ option for a one-way table,
PROC FREQ provides a chi-square goodness-of-fit test,
displaying the Chi-Square
statistic, the degrees of freedom (DF), and the probability
value (Pr > ChiSq). If you specify the CHISQ option in the
EXACT statement, PROC FREQ also displays the exact
probability value for this test.
- If you specify the BINOMIAL option for a one-way table,
PROC FREQ displays the estimate of the binomial Proportion,
which is the proportion of observations in the first class
listed in the one-way table. PROC FREQ also displays the
asymptotic standard error (ASE) and the asymptotic and exact
confidence limits for this estimate. For the binomial
proportion test, PROC FREQ displays the asymptotic standard
error under the null hypothesis (ASE Under H0), the standardized
test statistic (Z), and the one-sided and two-sided probability
values. If you specify the BINOMIAL option in the EXACT statement,
PROC FREQ also displays the exact one-sided and two-sided
probability values for this test.
PROC FREQ displays all multiway
table requests in the TABLES statements, unless you
specify the NOPRINT option in the PROC statement or
the NOPRINT option in the TABLES statement.
PROC FREQ displays multiway tables either as crosstabulation
tables (the default) or as lists (when you specify the LIST
option).
For two-way to multiway crosstabulation tables, the values of the last
variable in the table request form the table columns. The values
of the next-to-last variable form the rows. Each level (or combination
of levels) of the other variables form one stratum. PROC FREQ produces
a separate two-way crosstabulation table for each stratum.
Each cell of a crosstabulation table may contain the following
information:
- Frequency, giving the number of observations
that have the indicated values of the two variables.
(The NOFREQ option suppresses this information.)
- the Expected cell frequency under the hypothesis of
independence, if you specify the EXPECTED option
- the Deviation of the cell frequency from the expected
value, if you specify the DEVIATION option
- Cell Chi-Square,
which is the cell's contribution to the total chi-square
statistic, if you specify the CELLCHI2 option
- Tot Pct, or the cell's
percentage of the total frequency, for n-way tables
when n>2, if you specify the TOTPCT option
- Percent, the cell's percentage of the total frequency.
(The NOPERCENT option suppresses this information.)
- Row Pct, or the row percentage, the cell's percentage of the
total frequency count for that cell's row.
(The NOROW option suppresses this information.)
- Col Pct, or column percentage, the cell's percentage of the
total frequency count for that cell's column.
(The NOCOL option suppresses this information.)
- Cumulative Col%, or cumulative column percent, if you
specify the CUMCOL option
- Frequency Missing, or the number of observations with
missing values
If you specify the LIST option in the TABLES statement,
PROC FREQ displays multiway tables in a list format
rather than as crosstabulation tables. PROC FREQ ignores
the LIST option when you also request statistical options.
For a multiway table in list format, PROC FREQ displays
the following information:
- the variable names and values
- Frequency counts, giving the number of observations
with the indicated combination of variable values
- Percent, the cell's percentage of the total number of
observations. (The NOPERCENT option suppresses this
information.)
- Cumulative Frequency counts, giving the sum of the
frequency counts of that cell and all other cells
listed above it in the table. The last cumulative
frequency is the total number of nonmissing
observations. (The NOCUM option suppresses this
information.)
- Cumulative Percent values, giving the percentage
of the total number of observations for that cell
and all others previously listed in the table.
(The NOCUM or the NOPERCENT option suppresses this
information.)
- Frequency Missing, or the number of observations with
missing values
PROC FREQ computes statistical tests and measures for
crosstabulation tables, depending on which statements
and options you specify. You can suppress the display of
all these results by specifying the NOPRINT option in the PROC
statement. With any of the following information, PROC
FREQ also displays the Sample Size and the Frequency
Missing.
- If you specify the SCOROUT option, PROC FREQ displays
the Row Scores and Column Scores that it uses for
statistical computations. The Row Scores table displays
the row variable values and the Score corresponding
to each value. The Column Scores table displays the
column variable values and the corresponding Scores.
PROC FREQ also identifies the score type used to compute
the row and column scores. You can specify the score type
with the SCORES= option in the TABLES statement.
- If you specify the CHISQ option, PROC FREQ displays
the following statistics for each two-way table:
Pearson Chi-Square, Likelihood-Ratio Chi-Square,
Continuity-Adjusted Chi-Square, Mantel-Haenszel Chi-Square,
Fisher's Exact Test (for 2 ×2 tables), the Phi
Coefficient, the Contingency Coefficient, and Cramer's V.
For each test statistic, PROC FREQ also displays the
degrees of freedom (DF) and the probability value (Prob).
If you specify the PCHI option, the LRCHI option, or the
MHCHI option in the EXACT statement, PROC FREQ also
displays the exact probability value for the Pearson
Chi-Square, the Likelihood-Ratio Chi-Square, or the
Mantel-Haenszel Chi-Square, respectively. If you
specify the CHISQ option in the EXACT statement,
PROC FREQ displays exact probability values for
all three of these chi-square tests.
- If you specify the FISHER option in the TABLES statement
(or, equivalently, the FISHER option in the EXACT statement),
PROC FREQ displays the probability value for
Fisher's exact test for tables larger than 2 ×2.
In addition, PROC FREQ displays the CHISQ output
listed earlier, even if you do not also specify the CHISQ option.
- If you specify the MEASURES option, PROC FREQ displays
the following statistics and their asymptotic standard
errors (ASE) for each two-way table: Gamma,
Kendall's Tau-b, Stuart's Tau-c,
Somers' D(C|R), Somers' D(R|C),
Pearson Correlation, Spearman Correlation, Lambda
Asymmetric (C|R), Lambda Asymmetric (R|C), Lambda Symmetric,
Uncertainty Coefficient (C|R), Uncertainty Coefficient (R|C),
and Uncertainty Coefficient Symmetric. If you specify
the CL option, PROC FREQ also displays confidence limits for
these measures.
- If you specify the PLCORR option, PROC FREQ displays the
tetrachoric correlation for 2 ×2 tables or the
polychoric correlation for larger tables. In addition,
PROC FREQ displays the MEASURES output listed earlier, even if
you do not also specify the MEASURES option.
- If you specify the option GAMMA, KENTB, STUTC,
SMDCR, SMDRC, PCORR, or SCORR in the TEST statement,
PROC FREQ displays asymptotic tests for Gamma, Kendall's
Tau-b, Stuart's Tau-c, Somers' D(C|R),
Somers' D(R|C), the Pearson Correlation, or the Spearman
Correlation, respectively. If you specify the MEASURES
option in the TEST statement, PROC FREQ displays all these
asymptotic tests. The test output includes
the statistic, its asymptotic standard error (ASE),
Confidence Limits, the ASE under the null hypothesis H0,
the standardized test statistic (Z), and the one-sided
and two-sided probability values.
- If you specify the PCORR or SCORR option in the EXACT
statement, PROC FREQ displays asymptotic and exact tests
for the Pearson Correlation or the Spearman Correlation,
respectively. The test output includes the correlation,
its asymptotic standard error (ASE), Confidence Limits,
the ASE under the null hypothesis H0, the standardized
test statistic (Z), and the asymptotic and exact one-sided
and two-sided probability values.
- If you specify the RISKDIFF option for 2 ×2 tables,
PROC FREQ displays the Column 1 and Column 2 Risk Estimates.
For each column, PROC FREQ displays Row 1 Risk, Row 2 Risk,
Total Risk, and Risk Difference, together with their
asymptotic standard errors (ASE), Asymptotic Confidence
Limits, and Exact Confidence Limits. Exact confidence limits
are not available for the risk difference.
- If you specify the MEASURES option or the RELRISK option for
2 ×2 tables, PROC FREQ displays Estimates of
the Relative Risk for Case-Control and Cohort studies,
together with their Confidence Limits. These measures
are also known as the Odds Ratio and the Column 1 and 2
Relative Risks. If you specify the OR option in the EXACT
statement, PROC FREQ also displays Exact Confidence Limits
for the Odds Ratio.
- If you specify the TREND option, PROC FREQ displays the
Cochran-Armitage Trend Test for tables that are 2 ×C
or R ×2. For this test, PROC FREQ gives the Statistic (Z)
and the one-sided and two-sided probability values.
If you specify the TREND option in the EXACT statement,
PROC FREQ also displays the exact one-sided and two-sided
probability values for this test.
- If you specify the JT option, PROC FREQ displays the
Jonckheere-Terpstra Test, showing the Statistic (JT),
the standardized test statistic (Z), and the one-sided
and two-sided probability values. If you specify the
JT option in the EXACT statement, PROC FREQ also
displays the exact one-sided and two-sided probability
values for this test.
- If you specify the AGREE option and the PRINTKWT option,
PROC FREQ displays the Kappa Coefficient Weights for
square tables greater than 2 ×2.
- If you specify the AGREE option, for two-way tables PROC FREQ
displays McNemar's Test and the Simple Kappa Coefficient for
2 ×2 tables. For square tables larger than 2 ×2,
PROC FREQ displays Bowker's Test of Symmetry, the Simple Kappa
Coefficient, and the Weighted Kappa Coefficient.
For McNemar's Test and Bowker's Test of Symmetry, PROC FREQ
displays the Statistic (S), the degrees of freedom (DF), and
the probability value (Pr > S). If you specify the
MCNEM option in the EXACT statement, PROC FREQ also displays
the exact probability value for McNemar's test. For the
simple and weighted kappa coefficients, PROC FREQ displays
the kappa values, asymptotic standard errors (ASE), and
Confidence Limits.
- If you specify the KAPPA or WTKAP option in the TEST
statement, PROC FREQ displays asymptotic tests for the
simple kappa coefficient or the weighted kappa coefficient,
respectively. If you specify the AGREE option in the TEST
statement, PROC FREQ displays both these asymptotic tests.
The test output includes the kappa coefficient, its
asymptotic standard error (ASE), Confidence Limits, the
ASE under the null hypothesis H0, the standardized test
statistic (Z), and the one-sided and two-sided
probability values.
- If you specify the KAPPA or WTKAP option in the EXACT
statement, PROC FREQ displays asymptotic an
d exact tests
for the simple kappa coefficient or the weighted kappa
coefficient, respectively. The test output includes the
kappa coefficient, its asymptotic standard error (ASE),
Confidence Limits, the ASE under the null hypothesis H0,
the standardized test statistic (Z), and the asymptotic
and exact one-sided and two-sided probability values.
- If you specify the AGREE option, for multiple strata PROC FREQ
displays Overall Simple and Weighted Kappa Coefficients, with
their asymptotic standard errors (ASE) and Confidence Limits.
PROC FREQ also displays Tests for Equal Kappa Coefficients,
giving the Chi-Squares, degrees of freedom (DF), and probability
values (Pr > ChiSq) for the Simple Kappa and Weighted Kappa.
For multiple strata of 2 ×2 tables, PROC FREQ
displays Cochran's Q, giving the Statistic (Q), the
degrees of freedom (DF), and the probability value (Pr > Q).
- If you specify the CMH option, PROC FREQ displays
Cochran-Mantel-Haenszel Statistics for the following three
alternative hypotheses: Nonzero Correlation, Row Mean
Scores Differ (ANOVA Statistic), and General Association.
For each of these statistics, PROC FREQ gives the degrees
of freedom (DF) and the probability value (Prob).
For 2 ×2 tables, PROC FREQ also displays Estimates
of the Common Relative Risk for Case-Control and Cohort
studies, together with their confidence limits. These
include both Mantel-Haenszel and Logit stratum-adjusted
estimates of the common Odds Ratio, Column 1 Relative Risk,
and Column 2 Relative Risk. Also for 2 ×2 tables,
PROC FREQ displays the Breslow-Day Test for Homogeneity of
the Odds Ratios. For this test, PROC FREQ gives the
Chi-Square, the degrees of freedom (DF), and the probability
value (Pr > ChiSq).
Copyright © 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.