Poverty Analysis Toolkit

A case study on the use of Stata.

Stata makes a difference at the World Bank: Automated poverty analysis.

The World Bank supports the United Nations Millennium Development Goals of eliminating poverty and providing for sustained development. To ameliorate poverty in an area, one must first know who is most affected by poverty and how poverty is distributed among society’s members.

Poverty Assessments are key to the World Bank’s poverty-reduction strategy. These reports are routinely produced for virtually every country the Bank studies. Each Poverty Assessment includes various statistics on poverty and income inequality and reports on how well each country is achieving its povertyreduction targets. Historically, producing a Poverty Assessment for a country would involve hiring a consultant, often a newly minted PhD or a graduate student. The consultant would learn the principles of poverty analysis and write Stata programs to produce the requisite tables and graphs. This approach was prone to error because no standards were in place; instead, Stata programs and documentation were produced by people with varying degrees of skill. Methodologies and assumptions were often vague, and results were difficult to replicate. Maintaining the code and preparing data were costly procedures. To do an analysis similar to an existing one, a researcher would often have to start from scratch rather than reuse the existing code.

Poverty Analysis Toolkit

To rectify and streamline the process of producing Poverty Assessments, Michael Lokshin, a lead economist in the Development Research Group at the World Bank, and his team, including Sergiy Radyakin and Zurab Sajaia, wrote a set of ado-files to implement various poverty measurement and analysis algorithms. These ado-files eventually became known as the Poverty Analysis Toolkit, which was widely used throughout the World Bank. The popular user-written command xml_tab, available from the Statistical Software Components (SSC) archive, also grew out of this work; xml_tab allows users to save Stata results in a format that is easily incorporated into Microsoft Excel spreadsheets.

The Poverty Analysis Toolkit includes several programs for dynamic policy analysis, including commands for plotting growth incidence curves; for plotting poverty incidence, deficit, and severity curves; and for analysing the changes in poverty over time that are due to sectoral and population changes, and growth and redistribution.

The Toolkit greatly simplified the study of poverty at the World Bank by making available a standard set of Stata commands that researchers could use without having to reinvent the wheel. However, having a collection of programs instead of a single interface raised the learning curve for new researchers and limited researchers’ ability to produce standard output that could easily be included in reports.

ADePT

To make the Poverty Analysis Toolkit appeal to a wider audience, Lokshin and his team decided to combine the separate routines and to provide a single easy-to-use graphical interface. The Toolkit was renamed ADePT (which stands for Automated DEC Poverty Tables) and was quickly adopted by researchers around the world. In contrast to the Toolkit, the ADePT software, available at www.worldbank.org/adept/, is no longer a set of isolated components, but rather an integrated platform. Having an integrated platform allows the components to work together and simplifies the development of additional modules.

ADePT was developed using a combination of Stata’s ado-language, Mata, and dialog programming language, including over 150,000 lines of code. Certain routines were also developed in C++ and assembly language for maximum performance and used Stata’s plug-in facilities. One example of such a routine is the usespss command, which is available from the SSC archive; this command allows Stata users to read datasets in SPSS format.

Different modules within ADePT perform an array of statistical analyses, from simple cross-tabulations to estimation of simultaneous equations via maximum likelihood. Routines allow one to estimate standard errors for many poverty and inequality measures. ADePT even makes running complex simulations easy.

To use early versions of ADePT, a researcher had to have Stata installed on his or her computer. This requirement posed an impediment to the widespread adoption of ADePT among users who did not already have Stata, especially in low-income and developing countries, where poverty research is most critical.

Numerics by Stata

In 2009, StataCorp announced Numerics by Stata, an embedded version of Stata that allows software developers to create applications in the language of their choice and to call on Numerics by Stata to perform the same types of computations and analyses that Stata users have come to depend on. Organizations use Numerics by Stata to create in-house applications with user interfaces that match their needs while still garnering all the analytic power of Stata. Those applications do not require that end-users have Stata installed on their machines.

In late 2009, the World Bank harnessed the power of Numerics by Stata and modified ADePT to work with it. As a result, researchers across the globe who did not own Stata and therefore could not use earlier versions of ADePT became able to download the new version from the Bank’s web site and begin using it immediately.

Stata's Automation features allowed developers to create the user interface in C# using standard Windows components while continuing to perform statistical analyses using Stata’s programming language. This separation of the front end from the back end also allowed developers to create localized versions of ADePT. In addition to the English version, Bahasa Indonesian and Russian language versions are also available; work is underway to produce Spanish, Bulgarian, Romanian, Georgian, Portuguese, and other versions, as well. Having versions of ADePT in local languages makes adopting ADePT easier for researchers.

Localization is not limited to changing the language used in the interface. For example, in November 2009, the Indonesia Poverty Team collaborated with ADePT developers to customize the software so that analyses could be conducted at the kabupaten (district) level. That customization allowed researchers to answer policy questions specific to Indonesia using nationally representative household survey data.

Lokshin estimates that more than 1,500 registered users of ADePT currently exist. As the number of users continues to grow, more testing and refinement of the software occurs. For example, when difficult cases and exceptions are encountered by users, the ADePT team is able to modify the code to be more robust in response to those situations. The development team also uses an automated testing procedure to ensure that results from newer versions of the program agree with those from earlier versions.

ADePT reduces the time needed for data analysis, giving users more time to focus on results. Users can also simulate results to explore the possible outcomes from various policy alternatives such as cash transfers or subsidies. Most importantly, ADePT is easy to use and, with appropriate data preparation, improves accuracy and consistency.

Summary

The World Bank is committed to reducing poverty worldwide, and Stata has played a pivotal role in this regard for many years. Stata’s flexibility helped make the Poverty Analysis Toolkit possible and improved the efficiency of researchers worldwide. World Bank developers used Stata’s programmable dialog boxes, Mata, and class system to create ADePT, which elevated poverty analysis to a higher level. The recently announced Numerics by Stata lets poverty researchers around the world conduct their analyses effectively and economically.

Brian Poi, Executive Editor and Senior Economist

Reproduced with permission from The Stata News Vol 25, No 2, June 2010