CHAPTER 10/HYPOTHESIS TESTING: CATEGORICAL DATA 237
Missing 1 2 3
All 171 273 444
Tabulated statistics: Mat_curr, elbow
Rows: Mat_curr Columns: elbow
0 1 All
Wood 50 62 112
Tabulated statistics: Str_curr, elbow
Rows: Str_curr Columns: elbow
0 1 All
To test for an effect of gender, we construct a 2×2 table and use the Chi-Square test statistic
. tabulate sex elbow, chi2
| elbow
Sex | 0 1 | Total
———–+———————-+———-
For the “type” and “weight” variables, we note that a natural ordering exists, and so we decide to use Chi-
Square trend tests, excluding observations listed as either “missing” or “don’t know” . (“Don’t know” was
only reported 4 times in the data set).
. nptrend elbow if typ_curr<4, by( typ_curr )
typ_curr score obs sum of ranks