This example is taken from Levy and Lemeshow’s Sampling of Populations.
page 173 stratified random sampling with poststratification
Also, a text file called dogspost was created that contains the strata and
poststratification totals needed. This file was created in SAS and exported as a text file. Note that when doing this, you need to open the file in a text editor, such as Notepad or Wordpad, to ensure that there is nothing in the file other than the numbers. Many programs, when creating such a text file, will put the variable name on the first line. This variable name, and any other text, needs to be deleted before the file can be used in WesVar.
In this example, the variable weight is used as the weight variable, the variable id is used as the VarUnit, and the variable totexp is used as the analysis variable. The variable type is used to make the table. The jackknife-1 (jk1) method of creating the replicate weight is used because we do not have stratification in this design.
The output is given below.
The marginal sum_wts value of 1300 is the estimated population total. In the next row, we see that 42379.6719 is the estimated total of the variable totexp for strata 1, and in the next row, 9770 is the estimated total of totexp for strata 2. The marginal totexp value of 52149.6719 is the estimated total of the variable totexp (including both strata), and its standard error is 1574.2557. The estimated mean value of totexp for strata 1 is 49.8584 and for strata 2 the estimated mean value of totexp is 21.7111. The marginal mean value of 40.1151 is the estimated mean of the variable totexp, and 1.2110 is its standard error.