In this task, you will use SUDAAN to calculate a t-statistic and assess whether the mean systolic blood pressures (SBP) in males and females age 20 years and older are statistically different.
Follow the steps in the summary table below to produce the mean SBP using the SUDAAN procedure proc descript.
These programs use variable formats listed in the Tutorial Formats page. You may need to format the variables in your dataset the same way to reproduce results presented in the tutorial.
Statements | Explanation |
---|---|
data =analysis_data; by sdmvstra sdmvpsu; ; |
Use the SUDAAN procedure, proc sort, to sort the data by strata (sdmvstra) and PSU (sdmvpsu). |
data=analysis_data design=wr; |
Use the proc descript procedure to generate means and specify the sample design using the design option WR (with replacement). |
nest sdmvstra sdmvpsu; |
Use the nest statement with strata and PSU to account for the design effects. |
weight wtmec4yr; |
Use the weight statement to account for the unequal probability of sampling and non-response. In this example, the MEC weight for 4 years of data (wtmec4yr) is used. |
subpopn ridageyr >= 20 ; |
Use the subpopn statement to select those 20 years and older. Because only those 20 years and older are of interest in this example, use the subpopn statement to select this subgroup. Please note that for accurate estimates of the standard error , it is preferable to use subpopn in SUDAAN to select a subgroup for analysis, rather than select the study subgroup in SAS when preparing the data file. (See Section 5.4 of Korn and Graubard Analysis of Data from Health Surveys, pp 207-211.) |
class riagendr/NoFREQ; |
Use a class statement for categorical variables in version 9.0. In earlier versions, you need a subgroup and levels statement. Use the nofreq option to suppress frequencies. |
var bpxsar; |
Use the var statement to choose the continuous variable, systolic blood pressure (bpxsar). |
print nsum mean semean/style=nchs; &nbp; |
Use the print statement to obtain the N (nsum), mean (mean) and standard error of the mean (semean) for the t-test. |
rformat riagendr sexfmt. ; |
Use the rformat statement to read the SAS formats into SUDAAN. |
rtitle
"Mean
systolic blood pressure: NHANES 1999-2002"
; |
Use the rtitle statement to title the output. |
A t-test is used to test whether the mean SBP between males and females obtained in the previous step is statistically significant different.
Request the t-test from the SUDAAN procedure proc descript and follow the steps in the summary table below.
Note that this program and the previous program to produce means in Step 1 are identical up to the var statement.
These programs use variable formats listed in the Tutorial Formats page. You may need to format the variables in your dataset the same way to reproduce results presented in the tutorial.
Statements | Explanation |
---|---|