Chapter Contents Previous Next
 The FREQ Procedure

### Measures of Association

When you specify the MEASURES option in the TABLES statement, PROC FREQ computes several statistics that describe the association between the two variables of the contingency table. The following are measures of ordinal association that consider whether the variable Y tends to increase as X increases: gamma, Kendall's tau-b, Stuart's tau-c, and Somers' D. These measures are appropriate for ordinal variables, and they classify pairs of observations as concordant or discordant. A pair is concordant if the observation with the larger value of X also has the larger value of Y. A pair is discordant if the observation with the larger value of X has the smaller value of Y. Refer to Agresti (1996) and the other references cited in the discussion of each measure of association.

The Pearson correlation coefficient and the Spearman rank correlation coefficient are also appropriate for ordinal variables. The Pearson correlation describes the strength of the linear association between the row and column variables, and it is computed using the row and column scores specified by the SCORES= option in the TABLES statement. The Spearman correlation is computed with rank scores. The polychoric correlation (requested by the PLCORR option) also requires ordinal variables and assumes that the variables have an underlying bivariate normal distribution. The following measures of association do not require ordinal variables, but they are appropriate for nominal variables: lambda asymmetric, lambda symmetric, and uncertainty coefficients.

PROC FREQ computes estimates of the measures according to the formulas given in the discussion of each measure of association. For each measure, PROC FREQ computes an asymptotic standard error (ASE), which is the square root of the asymptotic variance denoted by var in the following sections.

#### Confidence Limits

If you specify the CL option in the TABLES statement, PROC FREQ computes asymptotic confidence limits for all MEASURES statistics. The confidence coefficient is determined according to the value of the ALPHA= option, which by default equals 0.05 and produces 95% confidence limits.

The confidence limits are computed as

where est is the estimate of the measure, is the percentile of the standard normal distribution, and ASE is the asymptotic standard error of the estimate.

#### Asymptotic Tests

For each measure that you specify in the TEST statement, PROC FREQ computes an asymptotic test of the null hypothesis that the measure equals zero. Asymptotic tests are available for the following measures of association: gamma, Kendall's tau-b, Stuart's tau-c, Somers' D(R|C), Somers' D(C|R), the Pearson correlation coefficient, and the Spearman rank correlation coefficient. To compute an asymptotic test, PROC FREQ uses a standardized test statistic z, which has an asymptotic standard normal distribution under the null hypothesis. The standardized test statistic is computed as

where est is the estimate of the measure and var0(est) is the variance of the estimate under the null hypothesis. Formulas for var0(est) are given in the discussion of each measure of association.

Note that the ratio of est to is the same for the following measures: gamma, Kendall's tau-b, Stuart's tau-c, Somers' D(R|C), and Somers' D(C|R). Therefore, the tests for these measures are identical. For example, the p-values for the test of H0: gamma = 0 equal the p-values for the test of H0: tau-b = 0.

PROC FREQ computes one-sided and two-sided p-values for each of these tests. When the test statistic z is greater than its null hypothesis expected value of zero, PROC FREQ computes the right-sided p-value, which is the probability of a larger value of the statistic occurring under the null hypothesis. A small right-sided p-value supports the alternative hypothesis that the true value of the measure is greater than zero. When the test statistic is less than or equal to zero, PROC FREQ computes the left-sided p-value, which is the probability of a smaller value of the statistic occurring under the null hypothesis. A small left-sided p-value supports the alternative hypothesis that the true value of the measure is less than zero. The one-sided p-value P1 can be expressed as

where Z has a standard normal distribution. The two-sided p-value P2 is computed as

#### Exact Tests

Exact tests are available for two measures of association, the Pearson correlation coefficient and the Spearman rank correlation coefficient. If you specify the PCORR option in the EXACT statement, PROC FREQ computes the exact test of the hypothesis that the Pearson correlation equals zero. If you specify the SCORR option in the EXACT statement, PROC FREQ computes the exact test of the hypothesis that the Spearman correlation equals zero. See the section "Exact Statistics" for information on exact tests.

#### Gamma

The estimator of gamma is based only on the number of concordant and discordant pairs of observations. It ignores tied pairs (that is, pairs of observations that have equal values of X or equal values of Y). Gamma is appropriate only when both variables lie on an ordinal scale. It has the range . If the two variables are independent, then the estimator of gamma tends to be close to zero. Gamma is estimated by

G = [(P-Q)/(P + Q)]
with asymptotic variance

The variance of the estimator under the null hypothesis that gamma equals zero is computed as

For 2 ×2 tables, gamma is equivalent to Yule's Q. Refer to Goodman and Kruskal (1979), Agresti (1990), and Brown and Benedetti (1977).

#### Kendall's Tau-b

Kendall's tau-b is similar to gamma except that tau-b uses a correction for ties. Tau-b is appropriate only when both variables lie on an ordinal scale. Tau-b has the range .It is estimated by
with
where

The variance of the estimator under the null hypothesis that tau-b equals zero is computed as

Refer to Kendall (1955) and Brown and Benedetti (1977).

#### Stuart's Tau-c

Stuart's tau-c makes an adjustment for table size in addition to a correction for ties. Tau-c is appropriate only when both variables lie on an ordinal scale. Tau-c has the range .It is estimated by
tc = [(m(P - Q))/(n2(m - 1))]
with
where

The variance of the estimator under the null hypothesis that tau-c equals zero is

var0(tc) = var

Refer to Brown and Benedetti (1977).

#### Somers' D (C |R ) and D (R |C )

Somers' D(C|R) and Somers' D(R|C) are asymmetric modifications of tau-b. C|R denotes that the row variable X is regarded as an independent variable, while the column variable Y is regarded as dependent. Similarly, R|C denotes that the column variable Y is regarded as an independent variable, while the row variable X is regarded as dependent. Somers' D differs from tau-b in that it uses a correction only for pairs that are tied on the independent variable. Somers' D is appropriate only when both variables lie on an ordinal scale. It has the range . Formulas for Somers' D(R|C) are obtained by interchanging the indices.
with
where

The variance of the estimator under the null hypothesis that D(C|R) equals zero is computed as

Refer to Somers (1962), Goodman and Kruskal (1979), and Liebetrau (1983).

#### Pearson Correlation Coefficient

PROC FREQ computes the Pearson correlation coefficient using the scores specified in the SCORES= option. The Pearson correlation is appropriate only when both variables lie on an ordinal scale. It has the range . The Pearson correlation coefficient is computed as

with

The row scores Ri and the column scores Cj are determined by the SCORES= option in the TABLES statement, and

Refer to Snedecor and Cochran (1989) and Brown and Benedetti (1977).

To compute an asymptotic test for the Pearson correlation, PROC FREQ uses a standardized test statistic , which has an asymptotic standard normal distribution under the null hypothesis that the correlation equals zero. The standardized test statistic is computed as

where var0(r) is the variance of the correlation under the null hypothesis.

The asymptotic variance is derived for multinomial sampling in a contingency table framework, and it differs from the form obtained under the assumption that both variables are continuous and normally distributed. Refer to Brown and Benedetti (1977).

PROC FREQ also computes the exact test for the hypothesis that the Pearson correlation equals zero when you specify the PCORR option in the EXACT statement. See the section "Exact Statistics" for information on exact tests.

#### Spearman Rank Correlation Coefficient

The Spearman correlation coefficient is computed using rank scores R1i and C1j, defined in the section "Scores". It is appropriate only when both variables lie on an ordinal scale. It has the range .The Spearman correlation coefficient is computed as
rs = [v/w]
with
where

Refer to Snedecor and Cochran (1989) and Brown and Benedetti (1977).

To compute an asymptotic test for the Spearman correlation, PROC FREQ uses a standardized test statistic ,which has an asymptotic standard normal distribution under the null hypothesis that the correlation equals zero. The standardized test statistic is computed as

where var0(rs) is the variance of the correlation under the null hypothesis.

where

The asymptotic variance is derived for multinomial sampling in a contingency table framework, and it differs from the form obtained under the assumption that both variables are continuous and normally distributed. Refer to Brown and Benedetti (1977).

PROC FREQ also computes the exact test for the hypothesis that the Spearman rank correlation equals zero when you specify the SCORR option in the EXACT statement. See the section "Exact Statistics" for information on exact tests.

#### Polychoric Correlation

When you specify the PLCORR option in the TABLES statement, PROC FREQ computes the polychoric correlation. This measure of association is based on the assumption that the ordered, categorical variables of the frequency table have an underlying bivariate normal distribution. For 2 ×2 tables, the polychoric correlation is also known as the tetrachoric correlation. Refer to Drasgow (1986) for an overview of polychoric correlation. The polychoric correlation coefficient is the maximum likelihood estimate of the product-moment correlation between the normal variables, estimating thresholds from the observed table frequencies. The range of the polychoric correlation is from -1 to 1. Olsson (1979) gives the likelihood equations and an asymptotic covariance matrix for the estimates.

To estimate the polychoric correlation, PROC FREQ iteratively solves the likelihood equations by a Newton-Raphson algorithm using the Pearson correlation coefficient as the initial approximation. Iteration stops when the convergence measure falls below the convergence criterion or when the maximum number of iterations is reached, whichever occurs first. The CONVERGE= option sets the convergence criterion, and the default value is 0.0001. The MAXITER= option sets the maximum number of iterations, and the default value is 20.

#### Lambda Asymmetric

Asymmetric lambda, , is interpreted as the probable improvement in predicting the column variable Y given knowledge of the row variable X. Asymmetric lambda has the range . It is computed as
with
where
Also, let li be the unique value of j such that ri=nij, and let l be the unique value of j such that r = n·j.

Because of the uniqueness assumptions, ties in the frequencies or in the marginal totals must be broken in an arbitrary but consistent manner. In case of ties, l is defined here as the smallest value of j such that r = n·j. For a given i, if there is at least one value j such that nij=ri=cj, then li is defined here to be the smallest such value of j. Otherwise, if nil=ri, then li is defined to be equal to l. If neither condition is true, then li is taken to be the smallest value of j such that nij=ri. The formulas for lambda asymmetric (R|C) can be obtained by interchanging the indices.

Refer to Goodman and Kruskal (1979).

#### Lambda Symmetric

The nondirectional lambda is the average of the two asymmetric lambdas, and .Lambda symmetric has the range . Lambda symmetric is defined as
with
where
Refer to Goodman and Kruskal (1979).

#### Uncertainty Coefficients (C |R ) and (R |C )

The uncertainty coefficient, U(C|R), is the proportion of uncertainty (entropy) in the column variable Y that is explained by the row variable X. It has the range . The formulas for U(R|C) can be obtained by interchanging the indices.
with
where
Refer to Theil (1972, pp. 115 -120) and Goodman and Kruskal (1979).

#### Uncertainty Coefficient (U )

The uncertainty coefficient, U, is the symmetric version of the two asymmetric coefficients. It has the range . It is defined as
U = [( 2(H(X) + H(Y) - H(XY)) )/( H(X) + H(Y) )]
with
Refer to Goodman and Kruskal (1979).

 Chapter Contents Previous Next Top