|
|
|
||||
|
|
|||||
This example is taken from Levy and Lemeshow's Sampling of Populations.
This example uses the dogcats data set.
proc descript data = dogscats filetype=sas design=wor; nest _one_; totcnt n; weight weight; subgroup type; levels 2; var totexp; postvar type; postwgt 850 450; run;
Number of observations read : 50 Weighted count : 1300 Denominator degrees of freedom : 49 Variance Estimation Method: Taylor Series (WOR) Post-stratified estimates by: Variable, TYPE. ----------------------------------------------------------------------------------- | | | | Variable | | TYPE | | | Total | 1 | 2 | ----------------------------------------------------------------------------------- | | | | | | | TOTEXP | Sample Size | 50 | 32 | 18 | | | Weighted Size | 1300.00 | 850.00 | 450.00 | | | Total | 52149.67 | 42379.67 | 9770.00 | | | Mean | 40.12 | 49.86 | 21.71 | | | SE Mean | 1.16 | 1.44 | 1.97 | -----------------------------------------------------------------------------------
This example is taken from Lehtonen and Pahkinen's Practical Methods for Design and Analysis of Complex Surveys.
page 97 Table 3.10 A simple random sample drawn without replacement from the Province'91 population with poststratum weights.
data page97; input id str clu wt ue91 lab91 poststr gwt postwt sruv srcvs ; fpc = 32; cards; 1 1 1 4 4123 33786 1 .5833 2.333 .25 .43 2 1 4 4 760 5919 1 .5833 2.333 .25 .43 3 1 5 4 721 4930 1 .5833 2.333 .25 .43 4 1 15 4 142 675 2 1.2500 5.0000 .25 .20 5 1 18 4 187 1448 2 1.2500 5.0000 .25 .20 6 1 26 4 331 2543 2 1.2500 5.0000 .25 .20 7 1 30 4 127 1084 2 1.2500 5.0000 .25 .20 8 1 31 4 219 1330 2 1.2500 5.0000 .25 .20 ; run;
poststratified conditional estimates
Note that you cannot get the deff with the postvar/postwgt statements. The numbers on the postwgt statement must be integers (i.e., whole numbers) and are the population totals.
proc descript data = page97 filetype = sas design = wor totals ; weight wt; nest _one_; totcnt fpc; var ue91; subgroup poststr; levels 2; postvar poststr; postwgt 7 25; run;
Number of observations read : 8 Weighted count : 32 Denominator degrees of freedom : 7 Variance Estimation Method: Taylor Series (WOR) Post-stratified estimates by: Variable, POSTSTR. ----------------------------------------------------------------------------------- | | | | Variable | | POSTSTR | | | Total | 1 | 2 | ----------------------------------------------------------------------------------- | | | | | | | UE91 | Sample Size | 8 | 3 | 5 | | | Weighted Size | 32.00 | 7.00 | 25.00 | | | Total | 18106.00 | 13076.00 | 5030.00 | | | SE Total | 6013.65 | 5966.47 | 751.81 | | | Mean | 565.81 | 1868.00 | 201.20 | | | SE Mean | 187.93 | 852.35 | 30.07 | -----------------------------------------------------------------------------------
poststratified unconditional estimates
This has been skipped for now.
pure design-based estimated under srs
proc descript data = page97 filetype = sas design = wor totals deff; weight wt; nest _one_; totcnt fpc; var ue91; run;
Number of observations read : 8 Weighted count : 32 Denominator degrees of freedom : 7 Variance Estimation Method: Taylor Series (WOR) by: Variable, One. ----------------------------------------------------- | | | | Variable | | One | | | 1 | ----------------------------------------------------- | | | | | UE91 | Sample Size | 8 | | | Weighted Size | 32.00 | | | Total | 26440.00 | | | SE Total | 13282.26 | | | Mean | 826.25 | | | SE Mean | 415.07 | | | DEFF Mean #4 | 0.75 | | | DEFF Total #4 | 0.75 | -----------------------------------------------------
UCLA Researchers are invited to our Statistical Consulting Services
We recommend others to our list of Other Resources for Statistical Computing Help
These pages are Copyrighted (c) by UCLA Academic Technology Services