The SURVEYFREQ Procedure

Balanced Repeated Replication (BRR) Method

When you specify the VARMETHOD=BRR option, PROC SURVEYFREQ uses balanced repeated replication (BRR) for variance estimation. The BRR variance estimation method requires a stratified sample design with two PSUs in each stratum. You can provide replicate weights for BRR variance estimation by using a REPWEIGHTS statement, or the procedure can construct replicate weights for the analysis. PROC SURVEYFREQ estimates the parameter of interest (a proportion, total, odds ratio, or other statistic) from each replicate, and then uses the variability among replicate estimates to estimate the overall variance of the parameter estimate. For more information about BRR variance estimation, see Wolter (1985) and Lohr (2010).

Replicate Weight Construction

If you do not provide replicate weights by using a REPWEIGHTS statement, PROC SURVEYFREQ constructs replicates based on the stratified design with two PSUs in each stratum. This section describes replicate construction by the traditional BRR method. If you specify the FAY method-option for VARMETHOD=BRR, the procedure uses Fay’s modified BRR method, which is described in the section Fay’s BRR Method.

With the traditional BRR method, each replicate is obtained by deleting one PSU per stratum according to the corresponding Hadamard matrix of dimension R, where R is the number of replicates. The number of replicates is the smallest multiple of 4 that is greater than the number of strata H. Alternatively, you can specify the number of replicates with the REPS= method-option. If a Hadamard matrix cannot be constructed for the REPS= value that you specify, the value is increased until a Hadamard matrix of that dimension can be constructed. Therefore, it is possible for the actual number of replicates used to be larger than the REPS= value that you specify.

You can provide a Hadamard matrix for BRR replicate construction by using the HADAMARD= method-option. Otherwise, PROC SURVEYFREQ generates an appropriate Hadamard matrix. For more information, see the section Hadamard Matrix. You can display the Hadamard matrix by specifying the PRINTH method-option.

PROC SURVEYFREQ constructs replicates by using the first H columns of the upper R times upper R Hadamard matrix, where H denotes the number of strata. The rth replicate (r equals 1 comma 2 comma ellipsis comma upper R) is drawn from the full sample according to the rth row of the Hadamard matrix as follows:

  • If element (r, h) of the Hadamard matrix is 1, then the first PSU of stratum h is included in the rth replicate, and the second PSU of stratum h is excluded.

  • If element (r, h) of the Hadamard matrix is –1, then the second PSU of stratum h is included in the rth replicate, and the first PSU of stratum h is excluded.

For the PSUs included in replicate r, the original weights are doubled to form the replicate r weights. For the PSUs not included in replicate r, the replicate r weights equal 0. You can use the OUTWEIGHTS= method-option to store the replicate weights in a SAS data set. For information about the contents of the OUTWEIGHTS= data set, see the section Replicate Weight Output Data Set. You can provide these replicate weights to the procedure for subsequent analyses by using a REPWEIGHTS statement.

Variance Estimation

Let theta denote the population parameter to be estimated—for example, a proportion, total, odds ratio, or other statistic. Let ModifyingAbove theta With caret denote the estimate of theta from the full sample, and let ModifyingAbove theta With caret Subscript r denote the estimate from the rth BRR replicate, which is computed by using the replicate weights. The BRR variance estimate for ModifyingAbove theta With caret is computed as

ModifyingAbove upper V With caret left-parenthesis ModifyingAbove theta With caret right-parenthesis equals StartFraction 1 Over upper R EndFraction sigma-summation Underscript r equals 1 Overscript upper R Endscripts left-parenthesis ModifyingAbove theta With caret Subscript r Baseline minus ModifyingAbove theta With caret right-parenthesis squared

where R is the total number of replicates.

If you specify the CENTER=REPLICATES method-option, the BRR variance estimate is computed as

ModifyingAbove upper V With caret left-parenthesis ModifyingAbove theta With caret right-parenthesis equals StartFraction 1 Over upper R EndFraction sigma-summation Underscript r equals 1 Overscript upper R Endscripts left-parenthesis ModifyingAbove theta With caret Subscript r Baseline minus theta overbar right-parenthesis squared

where theta overbar is the average of the replicate estimates and is computed as follows:

theta overbar equals StartFraction 1 Over upper R EndFraction sigma-summation Underscript r equals 1 Overscript upper R Endscripts ModifyingAbove theta With caret Subscript r

If a parameter cannot be estimated from one or more replicates, the variance estimate is computed by using those replicates from which the parameter can be estimated. For example, suppose the parameter is a column proportion—the proportion of column j for table cell (i, j). If a replicate r contains no observations in column j, then the column j proportion is not estimable from replicate r. In this case, the BRR variance estimate is computed as

ModifyingAbove upper V With caret left-parenthesis ModifyingAbove theta With caret right-parenthesis equals StartFraction 1 Over upper R prime EndFraction sigma-summation Underscript r equals 1 Overscript upper R Superscript prime Baseline Endscripts left-parenthesis ModifyingAbove theta With caret Subscript r Baseline minus ModifyingAbove theta With caret right-parenthesis squared

where the summation is over the replicates for which the parameter theta is estimable and where upper R prime is the number of those replicates.

Hadamard Matrix

PROC SURVEYFREQ uses a Hadamard matrix to construct replicates for BRR variance estimation. You can provide a Hadamard matrix for replicate construction in the HADAMARD= method-option for VARMETHOD=BRR. Otherwise, PROC SURVEYFREQ generates an appropriate Hadamard matrix. You can display the Hadamard matrix by specifying the PRINTH method-option.

A Hadamard matrix bold upper A of dimension R is a square matrix that has all elements equal to 1 or –1. A Hadamard matrix must satisfy the requirement that bold upper A prime bold upper A equals upper R bold upper I, where bold upper I is an identity matrix. The dimension of a Hadamard matrix must equal 1, 2, or a multiple of 4.

For example, the following matrix is a Hadamard matrix of dimension k = 8:

StartLayout 1st Row 1st Column 1 2nd Column 1 3rd Column 1 4th Column 1 5th Column 1 6th Column 1 7th Column 1 8th Column 1 2nd Row 1st Column 1 2nd Column negative 1 3rd Column 1 4th Column negative 1 5th Column 1 6th Column negative 1 7th Column 1 8th Column negative 1 3rd Row 1st Column 1 2nd Column 1 3rd Column negative 1 4th Column negative 1 5th Column 1 6th Column 1 7th Column negative 1 8th Column negative 1 4th Row 1st Column 1 2nd Column negative 1 3rd Column negative 1 4th Column 1 5th Column 1 6th Column negative 1 7th Column negative 1 8th Column 1 5th Row 1st Column 1 2nd Column 1 3rd Column 1 4th Column 1 5th Column negative 1 6th Column negative 1 7th Column negative 1 8th Column negative 1 6th Row 1st Column 1 2nd Column negative 1 3rd Column 1 4th Column negative 1 5th Column negative 1 6th Column 1 7th Column negative 1 8th Column 1 7th Row 1st Column 1 2nd Column 1 3rd Column negative 1 4th Column negative 1 5th Column negative 1 6th Column negative 1 7th Column 1 8th Column 1 8th Row 1st Column 1 2nd Column negative 1 3rd Column negative 1 4th Column 1 5th Column negative 1 6th Column 1 7th Column 1 8th Column negative 1 EndLayout

For BRR replicate construction, the dimension of the Hadamard matrix must be at least H, where H denotes the number of first-stage strata in your design. If a Hadamard matrix of a given dimension exists, it is not necessarily unique. Therefore, if you want to use a specific Hadamard matrix, you must provide the matrix as a SAS data set in the HADAMARD=SAS-data-set method-option. You must ensure that the matrix that you provide is actually a Hadamard matrix; PROC SURVEYFREQ does not check the validity of your Hadamard matrix.

For information about how the Hadamard matrix is used to construct replicates for BRR variance estimation, see the sections Balanced Repeated Replication (BRR) Method and Fay’s BRR Method.

Last updated: December 09, 2022