iefolder is a Stata command within
ietoolkit. It sets up the DataWork folder, a standardized project folder structure for reproducible research. In addition to setting up the DataWork folder,
iefolder creates master do-files linking to all main folders in the folder structure. These master do-files are updated whenever more rounds, units of observations, and subfolders are added to the project folder using this command. It is important to use
iefolder at the beginning of a research project in order to employ the DataWork folder throughout the entire project.
- To install all commands in
ssc install ietoolkitin Stata.
- For instructions on how to use
iefolderand for a complete list of available options, type
help iefolderin Stata.
- For more information on the folder structure that
iefoldersets up, see DataWork Folder
To set up the DataWork folder and the main master do-file, specify
new project. For the command to work properly, do not change the name of this folder or do-file.
global folder "C:\Users\username\DropBox\ProjectABC" //Update this to your folder iefolder new project, projectfolder("$folder")
To add folders to an already existing DataWork folder, specify
subfolder, depending on the folder you wish to create. Note that you do not have to create all these folders immediately when you set up the project folder. You may add them as the need arises throughout the project.
Unit of Observation Folders
Unit of Observation folders provide a place to store master data for different units of observation.
unitofobs creates a master data folder for each new unit of observation in two places: in the MasterData folder and the Encrypted folder.
global folder "C:\Users\username\DropBox\ProjectABC" //Update this to your folder //Create a place to store all time invariant data on households and clinics iefolder new unitofobs households, projectfolder("$folder") iefolder new unitofobs clinics, projectfolder("$folder")
Round folders are specific to a data collection round (baseline, endline, follow-up, etc.). When adding a new round,
round adds a round folder to the DataWork folder that follows the DataWork Survey Round structure; it contains a Datasets folder, Dofiles folder, Outputs folder, Documentation folder and Questionnaire folder. Each round folder contains a master do-file that references the main folders in the folder structure specific to the round. Whenever you create a new round folder,
iefolder creates a partner folder for each round in the Survey Encrypted Data folder.
Subfolders are single, empty folders within a parent folder.
subfolder updates the master do-file with a global to the new folder. This is useful if, for example, you collected data on multiple units of observation in a given survey round. Imagine that your project has baseline data collection for students, teachers, and schools. In this case, you could use
subfolder to create an empty Baseline folder and within the subfolder, use
round to create Baseline folders for students, teachers and schools.
//Create a subfolder for all baseline rounds iefolder new subfolder baseline, projectfolder("$folder") //Create a folder for each data collection activity, see that they are organized into the subfolder iefolder new round farmer_baseline, projectfolder("$folder") subfolder(baseline) iefolder new round clincs_baseline, projectfolder("$folder") subfolder(baseline)
Back to Parent
This article is part of the topic ietoolkit