STATA 11 for Windows SAMPLE SESSION - Food Security Group ...
STATA 11 for Windows SAMPLE SESSION - Food Security Group ...
STATA 11 for Windows SAMPLE SESSION - Food Security Group ...
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
Stata <strong>11</strong> Sample Session Section 3 – Tables and other Types of Analysis<br />
+-------------------+<br />
| Key |<br />
|-------------------|<br />
| frequency |<br />
| row percentage |<br />
| column percentage |<br />
+-------------------+<br />
1. File/Open...<br />
2. Select q1a-age.dta<br />
3. Click on Open<br />
4. Copy the command, paste it into the new do-file<br />
and add comments.<br />
First, do a simple two-way table using the tabulate.<br />
1. From the menus click on Statistics then<br />
Summaries, tables & tests then Tables then<br />
Two-way tables with measures of association<br />
The tabulate2 - Two-way tables dialog box opens.<br />
2. In the Row Variable box select ca2<br />
3. In the Column Variable box select age_gp<br />
4. Under Cell Contents click in the box next to Within<br />
column relative frequencies to put a ✓.<br />
5. Click in the box ✓ next to Within row relative<br />
frequencies.<br />
6. Click on the copy button, switch to the do-file<br />
editor, paste the command, switch back to the<br />
dialog box and click on Ok.<br />
The Stata command is:<br />
tabulate ca2 age_gp, column row<br />
Below is the output.<br />
relation to | Age group<br />
head | 0 to l0 <strong>11</strong> to 19 20 to 60 61 and ol| Total<br />
---------------+--------------------------------------------+----------<br />
head | 0 6 296 41 | 343<br />
| 0.00 1.75 86.30 <strong>11</strong>.95 | 100.00<br />
| 0.00 2.22 47.13 83.67 | 22.57<br />
---------------+--------------------------------------------+----------<br />
wife/husband | 0 25 280 5 | 310<br />
| 0.00 8.06 90.32 1.61 | 100.00<br />
| 0.00 9.26 44.59 10.20 | 20.39<br />
---------------+--------------------------------------------+----------<br />
son/daughter | 503 184 31 0 | 718<br />
| 70.06 25.63 4.32 0.00 | 100.00<br />
| 87.78 68.15 4.94 0.00 | 47.24<br />
---------------+--------------------------------------------+----------<br />
mother/father | 0 0 5 1 | 6<br />
| 0.00 0.00 83.33 16.67 | 100.00<br />
| 0.00 0.00 0.80 2.04 | 0.39<br />
---------------+--------------------------------------------+----------<br />
other relative | 70 55 16 2 | 143<br />
| 48.95 38.46 <strong>11</strong>.19 1.40 | 100.00<br />
| 12.22 20.37 2.55 4.08 | 9.41<br />
---------------+--------------------------------------------+----------<br />
Total | 573 270 628 49 | 1,520<br />
| 37.70 17.76 41.32 3.22 | 100.00<br />
| 100.00 100.00 100.00 100.00 | 100.00<br />
89