Introduction to Stata

Instructors: Oliver Lipps & Ursina Kuhn

Modality: Online

Preliminary workshop: 8 - 9 August 2024

 

Workshop contents and objectives

Introduction for researchers who use Stata for their analysis or to attend a course using Stata at the Lugano Summer School. A first aim is to familiarize participants with the Stata Interface and the basic logic. Second, participants will learn to understand and write their own Stata syntax for data preparation and analysis. 

 

Workshop design

We will use presentation mode (ppt), demonstration with prepared examples in Stata, and hands-on exercises. Each day, we plan to have approx. 4 presentations and exercise sessions. To stimulate exchange, the exercises will be organized in breakout sessions (approx. 4 participants per room) with time to discuss questions and best practices.

 

Detailed lecture plan (daily schedule)

Day 1.
Morning: we will present the Stata environment, how to load data, set a working directory and inspect data. We will start with clicking in drop-down menus, then discuss why it is preferrable to use syntax and scripts for reproducibility, transparency and efficiency, and switch to syntax for the rest of the course
Afternoon: simple descriptive statistics and data manipulation, such as recoding variables, subsetting data sets, creating and removing variables. We will also look at how Stata treats missing data and variable labels and address particularities of Stata to avoid frequent problems in data analysis.

Day 2.
Morning: more advanced practices to make data management simpler, such as using loops, local and global macros, observation subscripts _n and _N, and lagged values. Furthermore, we will demonstrate how to combine information from different data files using merge and append.
Afternoon: working with strings and wide and long data formats. We show how to carry out data analysis (notably regression) and create graphs, although we will not go into much detail about these aspects. There will also be room for questions and discussions.

 

Class materials

  • The compendia “Stata Basics” and “Stata Data Management”, provide an introduction, give an overview of the most important commands and example syntax.
  • Prepared student data sets with exercises based on data from the Swiss Household Panel.

 

Prerequisites

Participants should have minimal experience with quantitative statistics and have already worked with other software used in quantitative social sciences, such as SPSS, SAS, or R.

 

Recommended readings or preliminary material

PC / laptop with Stata installed (can be a 1 week trial version).