The chi-square statistic is requested from the SUDAAN procedure
*proc crosstab*. The summary table below provides an example
of how to code for a chi-square test in SUDAAN.

IMPORTANT NOTE

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 SAS procedure, |

data=analysis_data design=wr; |
Use |

nest sdmvstra sdmvpsu; |
Use the |

weight wtmec4yr; |
Use the |

subpopn ridageyr >= 20 ; |
Use the
Please note that for accurate estimates of the standard
error, it is preferable to use |

recode bpacsz = (1 3 4 5 ); |
Use the |

class riagendr bpacsz/NoFreq; |
Use the |

table riagendr*bpacsz; |
Use the |

print nsum rowper colper/tests=all; |
Use the |

rformat riagendr
sexfmt. ; rformat bpacsz csz1fmt. ; |
Use the |

rtitle
"Chi-square test for blood pressure cuff size: NHANES
1999-2002" ; ; |
Use the |

IMPORTANT NOTE

SUDAAN Version 9.0 *proc crosstab* provides only limited
chi-square results (Wald) with p-values based on
unadjusted F-statistics (not the recommended statistic
for complex survey data). However, the SUDAAN regression
procedures do produce the recommended F adjusted
chi-square statistics (e.g. Rao-Scott and Satterthwaite)
for use in analyzing NHANES data.

- 9,094 respondents have information on blood pressure cuff size.
- The row percentages indicate that males tend to have a larger cuff size than females.
- Because the p-value is less than 0.05, you would reject the null hypothesis that gender and blood pressure cuff size are independent. The probability of obtaining a value of 274.74 or more is approximately zero.