Crosstabs by more than two variables
-
Login or Register
- Log in with
CROSSTABS /Tables=Sex By month By gov By nationality /FORMAT=AVALUE TABLES /CELLS=COUNT /COUNT ROUND CELL.
. webuse lbw, clear (Hosmer & Lemeshow data) . table low smoke race -------------------------------------------------------------------------------- | race and smoked during pregnancy birthweig | ------- white ------ ------- black ------ ------- other ------ ht<2500g | nonsmoker smoker nonsmoker smoker nonsmoker smoker ----------+--------------------------------------------------------------------- 0 | 40 33 11 4 35 7 1 | 4 19 5 6 20 5 -------------------------------------------------------------------------------- .
. webuse lbw, clear (Hosmer & Lemeshow data) . table (low smoke) (race ui) -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | Race | White Black Other Total | Presence, uterine irritability Presence, uterine irritability Presence, uterine irritability Presence, uterine irritability | 0 1 Total 0 1 Total 0 1 Total 0 1 Total ----------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------- Birthweight<2500g | 0 | Smoked during pregnancy | Nonsmoker | 37 3 40 10 1 11 31 4 35 78 8 86 Smoker | 28 5 33 4 4 6 1 7 38 6 44 Total | 65 8 73 14 1 15 37 5 42 116 14 130 1 | Smoked during pregnancy | Nonsmoker | 3 1 4 3 2 5 16 4 20 22 7 29 Smoker | 15 4 19 6 6 2 3 5 23 7 30 Total | 18 5 23 9 2 11 18 7 25 45 14 59 Total | Smoked during pregnancy | Nonsmoker | 40 4 44 13 3 16 47 8 55 100 15 115 Smoker | 43 9 52 10 10 8 4 12 61 13 74 Total | 83 13 96 23 3 26 55 12 67 161 28 189 --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Comment