UCLA Academic Technology Services HomeServicesClassesContactJobs

SUDAAN FAQ 
How do I analyze survey data with a stratified design with certainty PSUs?

This example is taken from Lehtonen and Pahkinen's Practical Methods for Design and Analysis of Complex Surveys.
page 60 Table 2.8  Estimates under a PPSSYS  design (n = 8); the Province'91 population.
NOTE:  The certainty PSU (the first line of the data) was entered twice and the weight was changed from 1 to .5 for each observation.  This is necessary because you need to have two observations in each strata.
data page60;
  input id str clu wt hou85 ue91 lab91;
  fpc = 32;
  cards;
  1 2 1 0.5 26881 4123 33786
  2 2 1 0.5 26881 4123 33786
  3 1 10 1.004 9230 1623 13727
  4 1 4 1.893 4896 760 5919
  5 1 7 2.173 4264 767 5823
  6 1 32 2.971 3119 568 4011
  7 1 26 4.762 1946 331 2543
  8 1 18 6.335 1463 187 1448
  9 1 13 13.730 675 129 927
  ;
run;

proc sort data = page60;
  by str;
run;

proc descript data = page60 filetype = sas design = wr total;
  weight wt;
  nest str;
  var ue91;
run;
Number of observations read    :      9    Weighted count :       34
Denominator degrees of freedom :      7
Variance Estimation Method: Taylor Series (WR)
by: Variable, One.

-----------------------------------------------------
|                 |                  |
| Variable        |                  | One
|                 |                  | 1            |
-----------------------------------------------------
|                 |                  |              |
| UE91            | Sample Size      |            9 |
|                 | Weighted Size    |        33.87 |
|                 | Total            |     15077.43 |
|                 | SE Total         |       521.12 |
|                 | Mean             |       445.18 |
|                 | SE Mean          |       150.47 |
-----------------------------------------------------
NOTE:  Use the setenv statement to set the decwidth to 5 to show the decimal to five places so that you can see that the standard error is correct.  If  you do not use the setenv decwidth = 5 statement, it appears that the standard error is .00.
proc ratio data = page60 filetype = sas design = wr;
  weight wt;
  nest str;
  numer ue91;
  denom lab91;
  setenv colwidth = 20;
  setenv decwidth = 5;
run;
Number of observations read    :      9    Weighted count :       34
Denominator degrees of freedom :      7
Variance Estimation Method: Taylor Series (WR)
by: Variable, One.

-------------------------------------------------------------
|                 |                  |
| Variable        |                  | One
|                 |                  | 1                    |
-------------------------------------------------------------
|                 |                  |                      |
| UE91/LAB91      | Sample Size      |              9.00000 |
|                 | Weighted Size    |             33.86800 |
|                 | Weighted X-Sum   |         117353.19100 |
|                 | Weighted Y-Sum   |          15077.42800 |
|                 | Ratio Est.       |              0.12848 |
|                 | SE Ratio         |              0.00222 |
-------------------------------------------------------------
proc descript data = page60 filetype = sas design = wr;
  weight wt;
  nest str;
  var ue91;
  percentile / median;
run;
Number of observations read    :      9    Weighted count :       34
Denominator degrees of freedom :      7
Variance Estimation Method: Taylor Series (WR)
by: Variable, One, Percentiles.

for: Variable = UE91.

-----------------------------------------------------------------------------------
One                    Sample     Weighted                  Lower 95%    Upper 95%
   Percentiles         Size       Size           Quantile   Limit        Limit
-----------------------------------------------------------------------------------
1
    50.00                     9        33.87       158.33          .         527.82
-----------------------------------------------------------------------------------


---------------------------------
One                    SE
   Percentiles         Quantile
---------------------------------
1
    50.00                     .
---------------------------------

How to cite this page

Report an error on this page

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


The content of this web site should not be construed as an endorsement of any particular web site, book, or software product by the University of California.