The SURVEYMEANS Procedure

POSTSTRATA Statement

  • POSTSTRATA variables / PSTOTAL=SAS-data-set | (value-list)  <option>;

  • POSTSTRATA variables / PSPCT=SAS-data-set | (value-list)  <option>;

The POSTSTRATA statement names variables that form the poststrata to adjust the sampling weights for analyzing the survey. The combinations of categories of variables define the poststrata in the sample.

The variables are one or more variables in the DATA= input data set. These variables can be either character or numeric. The formatted values of the variables determine the categorical levels. Thus, you can use formats to group values into levels. For more information, see the FORMAT procedure in Base SAS Procedures Guide and the FORMAT statement and SAS formats in SAS Formats and Informats: Reference.

You must specify either poststratification totals (in a PSTOTAL= option) or poststratification proportions (in a PSPCT= option), but not both, after a slash (/).

PSTOTAL=SAS-data-set | (value-list)
POSTTOTAL=SAS-data-set | (value-list)
PSCONTROL=SAS-data-set | (value-list)

specifies poststratum totals, which the SURVEYMEANS procedure uses to compute weight adjustment for poststratification.

You can specify poststratification totals in either of the following ways:

SAS-data-set

names a SAS data set that contains the poststratification variables and the poststratum totals. This data set is called the poststratum total data set.

A poststratum total data set must contain all the poststratification variables that are listed in the POSTSTRATA statement and all the variables listed in the BY statement. If there are formats associated with POSTSTRATA variables and the BY variables, then the formats in the poststratum total data set for these variables must be consistent with those in the DATA= data set in the PROC SURVEYMEANS statement.

A poststratum total data set must have a variable named _PSTOTAL_ that contains the poststratum totals. The values of _PSTOTAL_ must be positive.

value-list

specifies poststratum totals as a list of positive numbers when their corresponding poststratum levels are easy to identify. You must enclose this list in parentheses.

The ORDER=FORMATTED option in the PROC SURVEYMEANS statement is used to order the levels of poststratum levels.

The number of values in the value-list must equal the number of poststrata in the data. List the values in the value-list in the order of the corresponding poststratum level and separate them with blanks or commas.

PSPCT=SAS-data-set | (value-list)
POSTPCT=SAS-data-set | (value-list)

specifies the poststratum proportions, which the SURVEYMEANS procedure uses to compute weight adjustment for poststratification.

You can specify the poststratification proportions in one of the following ways:

SAS-data-set

names a SAS data set that contains the poststratification variables and the poststratum proportions. This data set is called the poststratum proportion data set.

A poststratum proportion data set must contain all the poststratification variables that are listed in the POSTSTRATA statement and all the variables listed in the BY statement. If there are formats associated with the POSTSTRATA variables and the BY variables, then the formats in the poststratum proportion data set for these variables must be consistent with those in the DATA= data set in the PROC SURVEYMEANS statement.

A poststratum proportion data set must have a variable named _PSPCT_ that contains the poststratum proportions. The values of _PSPCT_ must be positive.

You can provide poststratum proportions either as positive decimal numbers between 0 and 1 for all poststrata or as positive percentages that must be less than 100 for all poststrata. If any of the proportion values is greater than 1, the procedure treats all proportions as percentages instead of decimal numbers.

value-list

specifies the poststratum proportions as a list of positive numbers that correspond to poststrata. You must enclose this list in parentheses.

The ORDER=FORMATTED option in the PROC SURVEYMEANS statement is used to order the levels of poststratum levels.

The number of values in the value-list must equal the number of poststrata in the data. List the values in the value-list in the order of the corresponding poststratum level and separate them with blanks or commas.

If you provide the proportions as decimal numbers, then the sum of these values over all poststrata must be 1. If you provide the proportions as percentages, then the sum of these percentages over all poststrata must be 100.

You can also specify the following option:

OUTPSWGT=SAS-data-set
OUT=SAS-data-set

names a SAS-data-set to contain poststratification weights. For information about poststratification weights, see the section Poststratification.

This option is ignored if you also specify an OUTWEIGHTS= method-option for VARMETHOD=BRR, VARMETHOD=JACKKNIFE, or VARMETHOD=BOOTSTRAP in the PROC SURVEYMEANS statement. In this case, poststratification weights for the full sample and the replication weights adjusted for poststratification are stored in the OUTWEIGHTS= data set.

For more information about the contents of the OUTPSWGT= data set, see the section Poststratification Weights Output Data Set. For more information about the contents of the OUTWEIGHTS= data set, see the section Replicate Weights Output Data Set.

Last updated: December 09, 2022