10.04.2013 Views

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 ...

SHOW MORE
SHOW LESS

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 2 – Restructuring Data Files – Table Lookup & Aggregation<br />

22. Click on Ok .<br />

The statements we need are detailed in the table below.<br />

Numeric value If statement<br />

1 ca4 == 1 & ca3 >=10<br />

.84 ca4 == 2 & (ca3 >=10 & ca3 =20<br />

.6 ca3 =10<br />

replace ae = .84 if ca4==2 & ca3 >=10 & ca3 =20<br />

replace ae = .6 if ca3 < 10<br />

label variable ae "Adult equivalents"<br />

To verify that the new adult equivalent variable, ae, has<br />

been calculated, display a frequency table <strong>for</strong> it.<br />

1. From the menus click on<br />

Statistics..then Summaries, tables & tests<br />

then Tables then One-way tables<br />

The tabulate1 - One-way Tables dialog box opens.<br />

2. Select the variable name ae in the Categorical<br />

Variables box which is found under the tab labeled<br />

Main.<br />

3. Check the box ✓ next to Treat missing values<br />

like other values<br />

68

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!