
Will make a local copy of the data and dictionary for a given dataset, saving it in the specified folder or the current working directory. Will reshape the WFS data in memory from wide to long format or vice versa using the birth or union histories, as further explained in section 6 below. The clear option overwrites the dataset in memory, if any. The varlist follows Stata conventions, as explained in more detail in section 5 below. Will extract a set of variables from the specified dataset.
#Reshape stata archive#
The dhs option reads the data dictionary from the DHS archive otherwise it assumes you have a local copy. The file name or dataset name should not include an extension. Will open the data dictionary for a given dataset using Stata’s viewer, examples follow in section 4. From there you can navigate to the country pages, as discussed in section 3. Will open the home page of the WFS section of the DHS data archive using your default web browser. In describing the syntax we follow Stata conventions, using a roman font for keywords, italics for user-specified elements, square brackets for options, and underline for minimal abbreviations. For ease of reference we provide below a syntax diagram and a brief description of each variant, followed by a more detailed explanation including examples in sections 3 to 7. The syntax of the command has five variants that address increasing functionality, from viewing to data extraction to reshaping the histories as well as making local copies of files.
#Reshape stata install#
This will install the command and its help file.


To install the command from net-aware Stata, typeĪnd click on the wfs link, or simply type

This allows our command to read the dictionaries as well as the data and to produce self-documented fully labeled Stata datasets.īy automating WFS data extraction, our command is a substantial time saver, but this does not exempt users from familiarizing themselves with the studies, recognizing that there are variations in survey design, questionnaire contents, and recoding of variables, that should inform the analysis of the data. This paper introduces a Stata command that facilitates access to WFS data, with a user-friendly syntax that allows one to view the documentation, extract a set of variables from a survey, reshape the union or birth histories from wide to long format or vice versa, and make local copies of the data and dictionary files, although users also have the option of working directly from the DHS data archive.Ī pioneering feature of the WFS program was its use of machine-readable data dictionaries to document the data files.

Please visit for a list of the surveys available. To ensure that WFS’s valuable datasets continue to be available to the research community, the DHS program has published a large number of public-use data files through its data archive. The World Fertility Survey (WFS) program, the forerunner to the Demographic and Health Surveys (DHS) program, was a groundbreaking demographic data collection effort that conducted over 40 surveys between 19. To encourage and facilitate the use of this data, we provide a Stata command that can be used to extract and reshape the data, using local copies or working directly with the DHS data archive pages. The Demographic and Health Surveys (DHS) program has made available online a large number of public-use files from its predecessor, the World Fertility Survey (WFS) program, see. Extracting and Reshaping World Fertility Survey Data in Stata Germán Rodríguez, Princeton University Trevor Croft, The DHS Program, ICF International 15 March 2017 Abstract
