The RaoScott chisquare test is a designadjusted version of the Pearson chisquare test, which involves differences between observed and expected frequencies. For information about designadjusted chisquare tests, see Lohr (2010, Section 10.3.2), Rao and Scott (1981, 1984, 1987); Thomas, Singh, and Roberts (1996).
PROC SURVEYFREQ provides a firstorder RaoScott chisquare test by default. If you specify the CHISQ(SECONDORDER) option, PROC SURVEYFREQ provides a secondorder (Satterthwaite) RaoScott chisquare test. The firstorder design correction depends only on the design effects of the table cell proportion estimates and, for twoway tables, the design effects of the marginal proportion estimates. The secondorder design correction requires computation of the full covariance matrix of the proportion estimates. The secondorder test requires more computational resources than the firstorder test, but it can provide some performance advantages (for Type I error and power), particularly when the design effects are variable (Thomas and Rao, 1987; Rao and Thomas, 1989).
For oneway tables, the CHISQ option provides a RaoScott (designbased) goodnessoffit test for oneway tables. By default, this is a test for the null hypothesis of equal proportions. If you specify null hypothesis proportions in the TESTP= option, the goodnessoffit test uses the specified proportions.
The firstorder RaoScott chisquare statistic for the goodnessoffit test is computed as

where is the Pearson chisquare based on the estimated totals and D is the firstorder design correction described in the section FirstOrder Design Correction. See Rao and Scott (1979, 1981, 1984) for details.
For a oneway table with C levels, the Pearson chisquare is computed as

where n is the sample size, is the estimated overall total, is the estimated total for level c, and is the expected total for level c under the null hypothesis. For the null hypothesis of equal proportions, the expected total for each level is

For specified null proportions, the expected total for level c equals

where is the null proportion that you specify for level c.
Under the null hypothesis, the firstorder RaoScott chisquare approximately follows a chisquare distribution with (C – 1) degrees of freedom. A better approximation can be obtained by the F statistic,

which has an F distribution with and degrees of freedom under the null hypothesis (Thomas and Rao, 1984, 1987). The value of is the degrees of freedom for the variance estimator, which depends on the sample design and the variance estimation method. The section Degrees of Freedom describes the computation of .
By default for oneway tables, the firstorder design correction is computed from the proportion estimates as

where






as described in the section Design Effect. is the proportion estimate for level c, is the variance of the estimate, f is the overall sampling fraction, and n is the number of observations in the sample. The factor (1 – f) is included only for Taylor series variance estimation (VARMETHOD=TAYLOR) when you specify the RATE= or TOTAL= option. See the section Design Effect for details.
If you specify the CHISQ(MODIFIED) or LRCHISQ(MODIFIED) option, the design correction is computed by using null hypothesis proportions instead of proportion estimates. By default, null hypothesis proportions are equal proportions for all levels of the oneway table. Alternatively, you can specify null proportion values in the TESTP= option. The modified design correction is computed from null hypothesis proportions as

where






The null hypothesis proportion equals for equal proportions (the default), or equals the null proportion that you specify for level c if you use the TESTP= option.
The secondorder (Satterthwaite) RaoScott chisquare statistic for the goodnessoffit test is computed as

where is the firstorder RaoScott chisquare statistic described in the section FirstOrder Test and is the secondorder design correction described in the section SecondOrder Design Correction. For details, see Rao and Scott (1979, 1981); Rao and Thomas (1989).
Under the null hypothesis, the secondorder RaoScott chisquare approximately follows a chisquare distribution with degrees of freedom. The corresponding F statistic is

which has an F distribution with and degrees of freedom under the null hypothesis (Thomas and Rao, 1984, 1987). The value of is the degrees of freedom for the variance estimator, which depends on the sample design and the variance estimation method. The section Degrees of Freedom describes the computation of .
The secondorder (Satterthwaite) design correction for oneway tables is computed from the eigenvalues of the estimated design effects matrix , which are known as generalized design effects. The design effects matrix is computed as

where is the covariance under multinomial sampling (srs with replacement) and is the covariance matrix of the first (C – 1) proportion estimates. See Rao and Scott (1979, 1981) and Rao and Thomas (1989) for details.
By default, the srs covariance matrix is computed from the proportion estimates as

where is an array of (C – 1) proportion estimates. If you specify the CHISQ(MODIFIED) or LRCHISQ(MODIFIED) option, the srs covariance matrix is computed from the null hypothesis proportions as

where is an array of (C – 1) null hypothesis proportions. The null hypothesis proportions equal by default. If you use the TESTP= option to specify null hypothesis proportions, is an array of (C – 1) proportions that you specify.
The secondorder design correction is computed as

where are the eigenvalues of the design effects matrix and is the average of the eigenvalues.
For twoway tables, the CHISQ option provides a RaoScott (designbased) test of association between the row and column variables. PROC SURVEYFREQ provides a firstorder RaoScott chisquare test by default. If you specify the CHISQ(SECONDORDER) option, PROC SURVEYFREQ provides a secondorder (Satterthwaite) RaoScott chisquare test.
The firstorder RaoScott chisquare statistic is computed as

where is the Pearson chisquare based on the estimated totals and D is the design correction described in the section FirstOrder Design Correction. See Rao and Scott (1979, 1984, 1987) for details.
For a twoway tables with R rows and C columns, the Pearson chisquare is computed as

where n is the sample size, is the estimated overall total, is the estimated total for table cell (r, c), and is the expected total for table cell (r,c) under the null hypothesis of no association,

Under the null hypothesis of no association, the firstorder RaoScott chisquare approximately follows a chisquare distribution with (R – 1)(C – 1) degrees of freedom. A better approximation can be obtained by the F statistic,

which has an F distribution with and degrees of freedom under the null hypothesis (Thomas and Rao, 1984, 1987). The value of is the degrees of freedom for the variance estimator, which depends on the sample design and the variance estimation method. The section Degrees of Freedom describes the computation of .
By default for a firstorder test, PROC SURVEYFREQ computes the design correction from proportion estimates. If you specify the CHISQ(MODIFIED) or LRCHISQ(MODIFIED) option for a firstorder test, the procedure computes the design correction from null hypothesis proportions.
Secondorder tests, which you request by specifying the CHISQ(SECONDORDER) or LRCHISQ(SECONDORDER) option, are computed by applying both firstorder and secondorder design corrections to the weighted chisquare statistic. For secondorder tests for twoway tables, PROC SURVEYFREQ always uses null hypothesis proportions to compute both the firstorder and secondorder design corrections.
The firstorder design correction D that is based on proportion estimates is computed as




where






as described in the section Design Effect. is the estimate of the proportion in table cell (r, c), is the variance of the estimate, f is the overall sampling fraction, and n is the number of observations in the sample. The factor (1 – f) is included only for Taylor series variance estimation (VARMETHOD=TAYLOR) when you specify the RATE= or TOTAL= option. See the section Design Effect for details.
The design effects for the estimate of the proportion in row r and the estimate of the proportion in column c ( and , respectively) are computed in the same way.
If you specify the CHISQ(MODIFIED) or LRCHISQ(MODIFIED) option for a firstorder RaoScott test, or if you request a secondorder test for a twoway table (CHISQ(SECONDORDER) or LRCHISQ(SECONDORDER)), the procedure computes the design correction from the null hypothesis cell proportions instead of the estimated cell proportions. For twoway tables, the null hypothesis cell proportions are computed as the products of the corresponding row and column proportion estimates. The modified design correction (based on null hypothesis proportions) is computed as




where

and






The secondorder (Satterthwaite) RaoScott chisquare statistic for twoway tables is computed as

where is the firstorder RaoScott chisquare statistic described in the section FirstOrder Test and is the secondorder design correction described in the section SecondOrder Design Correction. See Rao and Scott (1979, 1981) and Rao and Thomas (1989) for details.
Under the null hypothesis, the secondorder RaoScott chisquare approximately follows a chisquare distribution with degrees of freedom. The corresponding F statistic is

which has an F distribution with and degrees of freedom under the null hypothesis (Thomas and Rao, 1984, 1987). The value of is the degrees of freedom for the variance estimator, which depends on the sample design and the variance estimation method. The section Degrees of Freedom describes the computation of .
The secondorder (Satterthwaite) design correction for twoway tables is computed from the eigenvalues of the estimated design effects matrix , which are known as generalized design effects. The design effects matrix is defined as

where is the covariance matrix of the proportion estimates and is the covariance under multinomial sampling (srs with replacement). See Rao and Scott (1979, 1981) and Rao and Thomas (1989) for details.
The secondorder design correction is computed from the design effects matrix as

where K = (R – 1)(C – 1), are the eigenvalues of , and is the average eigenvalue.
The srs covariance matrix is computed as

where is an matrix that is constructed from the array of (R – 1) row proportion estimates as

Similarly, is a matrix that is constructed from the array of (C – 1) column proportion estimates as

The matrix is computed as

where , , is an array of ones, and is an array of ones. See Rao and Scott (1979, p. 61) for details.