Training Calendar

Stata Programming Workshop

London, Work Foundation 3 days (7th September 2020 - 9th September 2020) Stata Introductory
Automation, Medical statistics, Programming


Stata Programming Workshop is an opportunity for graduate students, academics, researchers and professionals to expand their knowledge of Stata. This 3-day course introduces programming skills to those who have never written a program in Stata.


Day 1

Session 1 - Programming: Some Fundamental Concepts

  • Do and ado files in Stata
  • Data types: Working with dates and time, time series operators, factor variables
  • Debugging – the capture command
  • Protecting your data with preserve and restore
  • Guidelines for writing programs in Stata

Session 2 - Programming Stata Do-Files - Some Basic Programming Commands and Tools

  • Transformation of string and numeric variables
  • Recoding discrete and continuous variables
  • Recoding missing variables
  • Generate and egen functions
  • Local and global macros
  • Extended macro functions and list functions
  • Scalars and matrices
  • Temporary variables and tempnames
  • Looping commands: forvalues and foreach
  • By, statsby, rolling and other prefix commands
  • Transforming data with reshape
  • Combining datasets with append and merge

Day 2

Session1 - Programming Concepts and Tools in Action

  • Tabulating and computing statistics across a set of variables and groups
  • Computing durations and aggregating transactions data
  • Summarising group characteristics over observations
  • Adding aggregate characteristics to micro observations
  • Reusing results : return and ereturn commands
  • Accessing estimation results and margins

Session 2 - Automation - Do-File Programming Makes Life a lot Easier

  • Storing results in matrices
  • Stata’s post and postfile commands
  • Automating estimation output – the user-written commands estout and tabout, saveresults
  • Automating graphical output

Day 3

Session1 - ADO-File Programming

  • structure of an ado-file
  • syntax and return statements
  • using program options
  • including a subset of observations
  • generalizing commands to handle multiple variables
  • rendering commands byable
  • writing an e-class program
  • programs for egen, ml, nl
  • programs for gmm
  • Guidelines for ado-file programming style

Session 2 - Introduction to Mata

  • Mata Fundamentals
  • A simple Mata function
  • Components of a Mata function
  • Calling Mata functions
  • Mata’s st_interface functions
  • Mata-based likelihood function evaluators
  • Creating arrays of temporary objects with pointers
  • Structures
  • Additional Mata features

Learning Ratio 50% Theory, 35% Demonstration and 15% Practical

Principal texts for pre-course reading:

  • Mitchell, M. N. (2010). Data Management using Stata A Practical Handbook. Stata Press

Principal texts for post-course reading:

  • Baum, C. F. (2016). An Introduction to Stata Programming, second edition 2016

Daily Timetable (subject to minor changes)

09:00-09:20 Registration

09:30-11:00 Session 1

11:00-11:15 Tea/coffee break

11:15-12:45 Session 1 Continued

12:45-14:00 Lunch

14:00-15:15 Session 2

15:15-15:30 Tea/coffee break
(Feedback Session)

15:30-17:00 Session 2 Continued


In terms of econometric knowledge: knowledge of basic statistics concepts
In terms of software knowledge: basic knowledge of Stata.

For full Training Courses Terms & Conditions please click here.

Payment of course fees required prior to the course start date.

Registration closes 5-calendar days prior to the start of the course.

  • 100% fee returned for cancellations made over 28-calendar days prior to start of the course.
  • 50% fee returned for cancellations made 14-calendar days prior to the start of the course.
  • No fee returned for cancellations made less than 14-calendar days prior to the start of the course.

  •  CommercialAcademicStudent
    3 Day Pass (07/09/2020 - 09/09/2020)

All prices exclude VAT or local taxes where applicable.

* Required Fields

Post your comment

Timberlake Consultants