A learning event conducted by International Food Policy Research Institute in collaboration with National Agriculture Research Institute (NARI)
DATE – October 13th – October 16th
Lae, Papua New Guinea
Training Objectives
Household and agricultural data can provide a wealth of knowledge and insights into the economic activities and welfare of rural populations. These datasets can help to answer a variety of important policy questions, such as: Which households are engaged in agriculture, and do they have additional sources of income? What share of the population is consuming a healthy diet? What are the drivers of poverty across the country? However, to answer questions such as these, it is necessary to have a firm understanding of the nature of the underlying microdata, the ways in which the microdata should be managed, and the analytical tools that can be employed appropriately.
The objective of this learning event was to provide a thorough and hands-on introduction to Stata, a powerful statistical software package commonly used to analyze household datasets and many other types of data. During the training, participants explored how Stata can be used effectively to answer a wide range of policy-relevant questions. The training covered the use of Stata to generate descriptive statistics, tables, and cross-tabulations from household surveys and agricultural data, with a focus on the skills needed to produce descriptive tables from producer survey data. Although this was an introductory course, it also covered a variety of economic analysis topics and Stata codes relevant to participants with prior Stata experience. The material covered in this introduction also provides a foundation for subsequent Stata training courses.
The workshop was structured around three related topics: (1) exploring datasets and describing data; (2) building descriptive tables and cross-tabulations; and (3) transforming data to achieve analysis goals. On October 13 and 14, these topics were taught using the 2023 PNG Rural Household Survey datasets. On October 15 and 16, participants applied the same skills to the 2026 Vegetable Farmer/Producer Survey.
Stata Descriptive Tables Manual
Training Schedule – October 13th (09:00 – 16:00)
| Time | Agenda |
| 8:30 – 9:00 | Registration and Coffee / Tea |
| 9:00 – 9:30 | Welcome, introductions and background of the practice data Training objectives; the 2023 PNG Rural Household Survey files used in the exercises; how the lessons apply to the producer survey |
| 9:30 – 10:30 | Lesson 1 – Getting to know Stata and your data The Stata screen; matching variables to the questionnaire; browsing data; how variables are stored (numeric, categorical, string); count; codebook |
| 10:30 – 10:45 | Coffee / Tea |
| 10:45 – 12:30 | Lesson 2 – One-variable descriptive tables Frequency tables with tabulate; reading “other, specify” responses; histograms; summary statistics with summarize and the detail option (median and percentiles) |
| 12:30 – 13:30 | Lunch |
| 13:30 – 14:45 | Lesson 3 – Cross-tabulations Two-way tables; choosing the right percentage: cell, row and column |
| 14:45 – 15:00 | Coffee / Tea |
| 15:00 – 15:45 | Lesson 3 – Restricting tables with conditional commands The if qualifier and logical operators; finding the number behind a label; practice: roof type by number of rooms; the missing-value caution |
| 15:45 – 16:00 | Day 1 wrap-up and questions |
Training Schedule – October 14th (09:00 – 16:00)
| Time | Agenda |
| 8:30 – 9:00 | Coffee / Tea |
| 9:00 – 9:15 | Recap of Day 1 |
| 9:15 – 10:30 | Lesson 4 – Cleaning existing variables Household-level and person-level data; finding and fixing missing-value codes (888); recode and replace; renaming and labeling variables |
| 10:30 – 10:45 | Coffee / Tea |
| 10:45 – 12:30 | Lesson 4 – Creating new variables and checking data Dummy (indicator) variables and the missing-value trap; value labels; bar graphs of prevalence by group; checking and treating outliers |
| 12:30 – 13:30 | Lunch |
| 13:30 – 14:45 | Lesson 5 – Changing the unit of analysis Collapsing person-level data to the household level; merging two household-level files (1:1) and checking _merge; statistics by group with bysort |
| 14:45 – 15:00 | Coffee / Tea |
| 15:00 – 15:30 | Lesson 5 – Merging household data onto person-level data One-to-many (1:m) merges; deciding the unit of a table: “one row per what?” |
| 15:30 – 16:00 | Getting help and good practice for descriptive tables The help command; command reference; seven habits for good tables; questions |
Training Schedule – October 15th (09:00 – 16:00)
| Time | Agenda |
| 9:00 – 16:00 | Understanding the 2026 Vegetable Farmer/Producer Survey and Conducting Preliminary Analysis |
Training Schedule – October 16th (09:00 – 16:00)
| Time | Agenda |
| 9:00 – 16:00 | Understanding the 2026 Vegetable Farmer/Producer Survey and Conducting Preliminary Analysis |

