
- Reshape long stata how to#
- Reshape long stata install#
- Reshape long stata archive#
- Reshape long stata code#
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 long 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 long 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. Other users who have found the question cross-posted are encouraged to share the links as a reply as well.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
Reshape long stata how to#
See the sticked "READ ME: How to best ask for help in /r/Stata" post on how to comment here if all else fails. Make sure to include the word "Stata" in your search query. Perform a web search for your question prior to posting here. Stata's online community has been active for many years and many questions and solutions are documented on StataList, which are highly indexed on contemporary search engines (e.g., Google). Stata has extensive and complete documentation you can read before posting here (and you can type help followed by the command name in console to see it, e.g. This is not a place to find Stata tutoring. Do not request that the /r/Stata community do your homework for you. Assume good faith questions and comments.


Be nice when posting or commenting to a post.
Reshape long stata code#
