The FREQ Procedure

TEST Statement

TEST test-options ;

The TEST statement requests asymptotic tests for measures of association and measures of agreement. The test-options identify which tests to compute. Table 3.19 lists the available test-options, together with their corresponding TABLES statement options. Descriptions of the test-options follow the table in alphabetical order.

For each measure of association or agreement that you request in the TEST statement, PROC FREQ provides an asymptotic test that the measure equals zero. The procedure displays the asymptotic standard error under the null hypothesis, the test statistic, and the one-sided and two-sided p-values. Additionally, PROC FREQ reports the confidence limits for the measure. The ALPHA= option in the TABLES statement determines the confidence level, which by default equals 0.05 and provides 95% confidence limits. See the sections Asymptotic Tests and Confidence Limits for details. Also see the sections Measures of Association and Tests and Measures of Agreement for information about the individual measures.

You can also request exact tests for selected measures of association and agreement by using the EXACT statement. See the section Exact Statistics for more information.

Using the TEST Statement with the TABLES Statement

You must use a TABLES statement with the TEST statement. If you use only one TABLES statement, you do not need to specify the same options in both the TABLES and TEST statements; when you specify an option in the TEST statement, PROC FREQ automatically invokes the corresponding TABLES statement option. However, when you use the TEST statement with multiple TABLES statements, you must specify options in the TABLES statements to request statistics. PROC FREQ then provides asymptotic tests for those statistics that you also specify in the TEST statement.

Table 3.19: TEST Statement Options

Test Option

Asymptotic Tests

Required TABLES Statement Option

AGREE

Simple and weighted kappa coefficients

AGREE

GAMMA

Gamma

ALL or MEASURES

KAPPA

Simple kappa coefficient

AGREE

KENTB

Kendall’s tau-b

ALL or MEASURES

MEASURES

Gamma, Kendall’s tau-b, Stuart’s tau-c,

ALL or MEASURES

 

Somers’ $D(C|R)$, Somers’ $D(R|C)$,

 
 

Pearson and Spearman correlations

 

PCORR

Pearson correlation coefficient

ALL or MEASURES

PLCORR

Polychoric correlation

PLCORR

SCORR

Spearman correlation coefficient

ALL or MEASURES

SMDCR

Somers’ $D(C|R)$

ALL or MEASURES

SMDRC

Somers’ $D(R|C)$

ALL or MEASURES

STUTC

Stuart’s tau-c

ALL or MEASURES

WTKAP

Weighted kappa coefficient

AGREE


You can specify the following test-options in the TEST statement.

AGREE

requests asymptotic tests for the simple kappa coefficient and the weighted kappa coefficient. See the sections Simple Kappa Coefficient and Weighted Kappa Coefficient for details.

The AGREE option in the TABLES statement provides estimates, standard errors, and confidence limits for kappa coefficients. You can request exact tests for kappa coefficients by using the EXACT statement.

Kappa coefficients are defined only for square tables, where the number of rows equals the number of columns. Kappa coefficients are not computed for tables that are not square. For $2 \times 2$ tables, the weighted kappa coefficient is identical to the simple kappa coefficient, and PROC FREQ presents only the simple kappa coefficient.

GAMMA

requests an asymptotic test for the gamma statistic. See the section Gamma for details. The MEASURES option in the TABLES statement provides the gamma statistic and its asymptotic standard error.

KAPPA

requests an asymptotic test for the simple kappa coefficient. See the section Simple Kappa Coefficient for details.

The AGREE option in the TABLES statement provides the kappa statistic, its standard error, and its confidence limits. You can request an exact test for the simple kappa coefficient by specifying the KAPPA option in the EXACT statement.

Kappa coefficients are defined only for square tables, where the number of rows equals the number of columns. PROC FREQ does not compute kappa coefficients for tables that are not square.

KENTB | TAUB

requests an asymptotic test for Kendall’s tau-b. See the section Kendall’s Tau-b for details.

The MEASURES option in the TABLES statement provides Kendall’s tau-b and its standard error. You can request an exact test for Kendall’s tau-b by specifying the KENTB option in the EXACT statement.

MEASURES

requests asymptotic tests for the following measures of association: gamma, Kendall’s tau-b, Pearson correlation coefficient, Somers’ $D(C|R)$, Somers’ $D(R|C)$, Spearman correlation coefficient, and Stuart’s tau-c. See the section Measures of Association for details.

The MEASURES option in the TABLES statement provides measures of association and their asymptotic standard errors. You can request exact tests for selected measures by using the EXACT statement.

PCORR

requests an asymptotic test for the Pearson correlation coefficient. See the section Pearson Correlation Coefficient for details.

The MEASURES option in the TABLES statement provides the Pearson correlation and its standard error. You can request an exact test for the Pearson correlation by specifying the PCORR option in the EXACT statement.

PLCORR

requests Wald and likelihood ratio tests for the polychoric correlation coefficient. See the section Polychoric Correlation for details.

The PLCORR option in the TABLES statement provides the polychoric correlation and its standard error.

SCORR

requests an asymptotic test for the Spearman correlation coefficient. See the section Spearman Rank Correlation Coefficient for details.

The MEASURES option in the TABLES statement provides the Spearman correlation and its standard error. You can request an exact test for the Spearman correlation by specifying the SCORR option in the EXACT statement.

SMDCR

requests an asymptotic test for Somers’ $D(C|R)$. See the section Somers’ D for details.

The MEASURES option in the TABLES statement provides Somers’ $D(C|R)$ and its standard error. You can request an exact test for Somers’ $D(C|R)$ by specifying the SMDCR option in the EXACT statement.

SMDRC

requests an asymptotic test for Somers’ $D(R|C)$. See the section Somers’ D for details.

The MEASURES option in the TABLES statement provides Somers’ $D(R|C)$ and its standard error. You can request an exact test for Somers’ $D(R|C)$ by specifying the SMDRC option in the EXACT statement.

STUTC | TAUC

requests an asymptotic test for Stuart’s tau-c. See the section Stuart’s Tau-c for details.

The MEASURES option in the TABLES statement provides Stuart’s tau-c and its standard error. You can request an exact test for Stuart’s tau-c by specifying the STUTC option in the EXACT statement.

WTKAP

requests an asymptotic test for the weighted kappa coefficient. See the section Weighted Kappa Coefficient for details.

The AGREE option in the TABLES statement provides the weighted kappa statistic, its standard error, and its confidence limits. You can request an exact test for weighted kappa by specifying the WTKAP option in the EXACT statement.

Kappa coefficients are defined only for square tables, where the number of rows equals the number of columns. PROC FREQ does not compute kappa coefficients for tables that are not square. For $2 \times 2$ tables, the weighted kappa coefficient is identical to the simple kappa coefficient, and PROC FREQ presents only the simple kappa coefficient.