As discussed in the previous task, specifying the survey design to analyze data using SUDAAN typically requires four key elements. However, when you wish to analyze subgroups of the data, a fifth element is required. This fifth element is the SUBPOPN statement, which allows you to define your subgroup of interest for the analysis, without removing respondents from your master dataset.
Code | Element |
---|---|
proc sort; by sdmvstra sdmvpsu ; run; |
Element 1 |
proc <SUDAAN procedure> design=WR ; |
Element 2 |
nest sdmvstra sdmvpsu ; |
Element 3 |
weight <appropriate sample weight variable>; |
Element 4 |
<more SUDAAN procedure syntax>; |
|
subpopn (<logical expression defining subgroup>) | Element 5 |
run; |
|