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 />
Notice that the number of decimals is not uni<strong>for</strong>m. We can fix<br />
that with the tabstat command.<br />
1. From the menus click on Statistics then<br />
Summaries, tables & tests then Tables then<br />
Table of summary statistics<br />
The table - Tables of summary statistics dialog box opens.<br />
2. Press the Reset button to clear the boxes. Under<br />
the Main tab select district in the Row variable:<br />
box<br />
3. Click in the box ✓ next to Column variable and<br />
select quart in the box below.<br />
4. In the Statistics section, #1, select Mean from the<br />
drop down box.<br />
5. In the box to the right specify the variable to use <strong>for</strong><br />
the Mean statistic - cprod_ae<br />
We would also like to see the minimum and maximum<br />
values.<br />
7. Click on the drop down box next to #2 and scroll<br />
down to Maximum and select that statistic. For the<br />
variable select cprod_ae<br />
8. Click on the drop down box next to #3 and scroll<br />
down to Minimum and select that statistic. For the<br />
variable select cprod_ae<br />
9. Under the Options tab check ✓ Add row totals<br />
and also check ✓ Add column totals<br />
10. To <strong>for</strong>mat the numbers, check ✓ next Override<br />
display <strong>for</strong>mat <strong>for</strong> numbers in cells. Click on<br />
the Create button to the right of this box.<br />
<strong>11</strong>. In the “Create a display <strong>for</strong>mat” dialog box ,<br />
check ✓“Customize <strong>for</strong>mat” and change the<br />
contents to read: %<strong>11</strong>.2fc. The Help <strong>for</strong>mat...<br />
button shows different <strong>for</strong>mats that can be specified.<br />
This <strong>for</strong>mat says to use a width of <strong>11</strong> with 2<br />
decimals. (fc) means fixed <strong>for</strong>mat with a comma.<br />
Click on Ok.<br />
12. 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 />
For each district, the first row is the mean, the second row<br />
is the maximum and the third row is the minimum.<br />
The three Stata commands are:<br />
92