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 ...
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
Stata <strong>11</strong> Sample Session Section 3 – Tables and other Types of Analysis<br />
TABLE:1 <strong>Food</strong> Production in calories per adult equivalent per day (Mean, Maximum and Minimum)<br />
---------------------------------------------------------------------------<br />
| Calorie production quartile<br />
district | 1 2 3 4 Total<br />
----------+---------------------------------------------------------------monapo<br />
| 1,248.70 2,539.36 3,997.49 9,150.02 4,206.51<br />
| 1,972.67 3,175.78 5,066.72 28,465.75 28,465.75<br />
| 294.10 1,984.<strong>11</strong> 3,225.95 5,107.12 294.10<br />
|<br />
ribaue | 1,502.24 2,554.49 4,062.53 7,607.72 3,900.85<br />
| 2,030.40 3,141.39 4,983.72 13,123.97 13,123.97<br />
| 429.29 2,082.42 3,190.41 5,151.59 429.29<br />
|<br />
angoche | 1,297.97 2,465.51 3,698.81 8,495.49 3,950.26<br />
| 2,023.65 2,996.37 4,691.52 20,485.10 20,485.10<br />
| 353.88 2,037.20 3,009.46 5,021.75 353.88<br />
|<br />
Total | 1,352.55 2,519.74 3,919.46 8,399.38 4,014.55<br />
| 2,030.40 3,175.78 5,066.72 28,465.75 28,465.75<br />
| 294.10 1,984.<strong>11</strong> 3,009.46 5,021.75 294.10<br />
---------------------------------------------------------------------------<br />
The table command permits you to specify more than one<br />
variable to summarize and also permits <strong>for</strong>matting of the<br />
contents of the table.<br />
Print a table from the Viewer<br />
by district quart sort: summarize cprod_ae<br />
tabulate district quart, summarize(cprod_ae)<br />
nostandard nofreq noobs<br />
table district quart, contents( mean cprod_ae max<br />
cprod_ae min cprod_ae ) row col <strong>for</strong>mat(%<strong>11</strong>.2fc)<br />
A simple way to print a table, you have just created, is to open<br />
the Viewer, select the table and print.<br />
1. Open the Viewer - Click on File then View. A dialog<br />
box opens, asking <strong>for</strong> the name of the file<br />
2. Click on the Browse button and select the file<br />
session3.smcl and click on Ok<br />
3. Scroll down to the table you want to print and block it.<br />
4. Click on File then Print then Viewer. The Print dialog<br />
box opens. Under Page Range click on the radio<br />
button next to Selection. Then click on Print .<br />
5. Another dialog box opens labeled Output Settings In<br />
this box you can specify a Header, a Name and a Project.<br />
If you do not want line numbers and the Stata logo to<br />
print, you should remove the ticks next to the boxes<br />
labeled Print Line #’s and Print Logo.<br />
6. Click on Ok to print the selection.<br />
Exercise 3.1 Produce a similarly <strong>for</strong>matted table using calories retained using<br />
the data file that was created in Exercise 2.1. Include totals by<br />
93