Date: May 31, 2012
Instructors: Kerstin Hoenig, Sebastian Wenz, and Sven-Oliver Spieß
Venue: DIW Berlin
German Institue for Economic Research
Mohrenstraße 58
10117 Berlin
Cost: € 65

Workshop: Applied Data Management Using Stata

This workshop covers how to use Stata for data management tasks, both basic and advanced. It is targeted to participants with limited knowledge of Stata and to those who use Stata for estimating models but do the data management in other sofware.

We'll start the workshop with various ways to input data into Stata. We then discuss data cleaning and various special problems of data manangement, including data management in datasets with hierarchical structures. Each topic will be illustrated with examples and deepened with practical exercises.


9:00–9:15 Reception
9:15–10:30 Data management I: Importing and combining data
  1. Importing data
    • Stata (data signature)
    • Copy/paste (Data Editor)
    • Excel
    • SPSS
    • Character-separated values (using online data)
    • Fixed format
    • input
  2. Combining datasets
    • append
    • merge
  3. Data storage types and missing values
    • Numerical missings (e.g. mvdecode)
    • String vs. numerical variables (e.g. destring)
  4. Exercises and open questions
10:30–10:45 Break
10:45–12:00 Data management II: Data cleaning and labeling
  1. preserve, restore, and snapshots
  2. Data cleaning
    • Duplicates
    • Implausible values
  3. Cosmetics
    • Labeling
      • Datasets
      • Variables
      • Values
    • Notes
    • Display formats
    • Variable order
  4. Creating variables
    • generate, replace, and recode
    • Using loops for repetitive data-management tasks
    • Subscripting
    • Grand-mean centering using macros
    • Group-mean centering using the by prefix
    • egen
    • Random variables
  5. Exercises and open questions
12:00–1:00 Lunch
1:00–1:15 Stata resources
  1. StataCorp
    • Stata blog
    • STB/SJ and Stata Press
    • Netcourses, Stata Conference, and DPC Seminars
  2. Stata Community
    • Statalist
    • SSC
    • Ado-files from the Internet
    • UCLA, etc.
1:15–2:00 Data management III: Special problems
  1. Dealing with subgroups
  2. The wide and long of data shapes
  3. Exercises and open questions
2:00–4:45 Applied Examples
  1. Simple regression with advanced data preparation and model comparison
    • Model 1
    • Factor variables
    • Model 2 with polytomous dummies and interaction terms
    • Postestimation (e.g., test, predict, margins)
    • Exporting results tables with estout
    • Plotting results with marginsplot
3:00–3:30 Break
  1. Reporting of evaluation/survey data
    • Import fixed-format data
    • Data cleaning
    • Creating necessary variables
    • Computing results for units using loops
    • Exporting results using graphs and report templates
4:45–5:00 Further questions and end of workshop

Instructional methods

This workshop will combine slides, practical examples, and assisted exercises using Stata.

A limited number of 20 participants will have access to computers with Stata 12 installed (provided by the DIW and DPC). Up to 15 participants who have their own laptops with Stata 12 installed can also participate in the workshop.

Presenter backgrounds

Kerstin Hoenig studied Social Sciences at the University of Mannheim and Johns Hopkins University. She works as a researcher at the German National Education Panel Study (NEPS). Her research interests include sociology of education and theories of action, especially educational inequality, educational decisions, and quantitative methods.

Sebastian E. Wenz studied Social Sciences at the University of Mannheim and Indiana University–Bloomington. He is a researcher in the German National Education Panel Study (NEPS) at the University of Bamberg. His research interests include comparative social stratification and educational inequality, discrimination in educational contexts, and quantitative methods.

Sven Oliver Spieß studied Social Sciences at the University of Mannheim and works as a researcher at the University of Osnabrück. He is the author of the user-written Stata program wabacorr.

Return to meeting details.





The Stata Blog: Not Elsewhere Classified Find us on Facebook Follow us on Twitter LinkedIn YouTube Instagram
© Copyright 1996–2019 StataCorp LLC   •   Terms of use   •   Privacy   •   Contact us