COURSE ID: D-IN16 LANGUAGE:

STATA PROGRAMMING “A LITTLE BIT OF PROGRAMMING GOES AN AWFULLY LONG WAY…”

This course aims to provide participants with the fundamental Stata programming toolkit in order to facilitate, automate, replicate and personalize both data analysis, management and presentation. The course begins by reviewing some general Stata commands, illustrating how they can be combined with some powerful Stata programming constructs for looping and branching. During the two days, participants will be shown how to write, modify and develop do files (Stata programs). At the end of the program, it is expected that participants are able to personalize existing Stata commands and develop their own do files in order to organize their workload in a more automated, efficient, flexible and reproducible manner. Enabling them, for example, to ultimately be in a position to automate the more repetitive tasks of data management, data analysis and data presentation in Stata.

In common with TStat’s course philosophy, each individual session is composed of both a theoretical component (in which the techniques are explained), and an applied (hands-on) segment, during which participants have the opportunity to implement the techniques using real data under the watchful eye of the course tutor. Throughout the course, theoretical sessions are reinforced by case study examples, in which the course tutor discusses and highlights potential pitfalls and the advantages of individual programming techniques.

Researchers or professionals with previous programming skills in other software wishing to work effectively in Stata. Existing Stata users wishing to acquire the “standard” Stata programming toolkit in order to implement basic programming techniques to effectively automate a substantial part of their empirical data analysis.

It is expected that individuals wishing to follow this course have a familiarity/working knowledge of Stata. Participants are not however, required to have any programming experience in Stata or in other statistical packages.

SESSION I: FUNDAMENTAL CONCEPTS/COMMANDS FOR STATA PROGRAMMING: A QUICK REVIEW

Developing effective DO-files in Stata

Tracking your workflow

DO-files, LOG-files and labelling

Managing directories and folders:

pwd, mkdir, cd, dir, copy, erase, type

The Stata command syntax

Reading data into Stata

Import and exporting data from Excel and delimited .txt files

Variable and data types

numeric, string and missing data

Data examination

Sub-setting the data using the if and in qualifiers

Stata’s exploratory data analysis commands – browse, edit, assert, describe,   codebook, summarize, tabulate, inspect, graph

Creating and manipulating variables

generate, egen, replace, rename, recode and replace

Converting strings to numerics and vice versa

tostring, destring, encode

Codifying missing values

mvdecode and mvencode

Generate dummy variables, lags and leads

Working with dates in Stata

 

SESSION II: ORGANISING, MANIPULATING AND VISUALIZING YOUR DATASETS WITHIN A DO-FILE

Saving the dataset

save, preserve, restore

Advanced data management commands

keep and drop

sort and gsort

by-processing

append

merge and joinby

collapse and contract

order, aorder, move, reshape (for panel data)

 

SESSION III: STATA CONSTRUCTS FOR DO-FILE PROGRAMMING

Stata syntax

Global and local macros

Global macros

Local macros

Recalling macros

Scalars and matrices

Extended macro functions

Macro increment and decrement functions

Advanced local macro manipulation

Temporary objects

Temporary variables: tempvar

Temporary Matrices and vectors: tempname

Temporary Files: tempfile

Looping in Stata

Looping using foreach

Looping using forvalues

Looping using while

Branching in Stata with: if and else

Writing and modifying a Stata program

Programs without arguments

Programs with positional arguments

Programs with named positional arguments

Storing and retrieving program results

Programs with arguments using the syntax construct

 

SESSION IV: AUTOMATION DO-FILE PROGRAMMING IN PRACTICE – MAKING LIFE A EASIER!

A DO-file template

Master and Using DO-files

Speeding-up your workflow within a DO-file: real examples

Running estimations under alternative model specifications

Building, modifying and automating tables of estimation output

Returning estimation (return, ereturn)

Building, modifying and automating graphs

Stata graphic capabilities

The syntax of the graph command

Customizing graphs

 

 

 

 

 

The course will be held in Frankfurt am Main the 18th and 19th of December 2017 from 9.00 am to 17.00 pm.

 

COURSE LOCATION: FLEMING’S DELUXE HOTEL FRANKFURT-CITY ♦ Eschenheimer Tor 2, 60318 Frankfurt am Main

 

Students*: € 526.00
University: € 781.00
Government / Nonprofit: € 986.00
Commercial: € 1095.00

 

*To be eligible for student prices, participants must provide proof of their full-time student status for the current academic year.

All fees are subject to VAT (applied at the current Italian rate of 22%).

The number of participants is limited to 8. Places, will be allocated on a first come, first serve basis. The course will be officially confirmed, when at least 5 individuals are enrolled.

The course fee covers: course materials and a temporary licence of Stata valid for 30 days from the beginning of the course; light lunch and coffee break. The course materials comprise the theoretical handouts, along with the Stata do-files, ado-files and data-sets required to replicate all the empirical demonstrations implemented in the course sessions under the guidance of the course leader.

In order to maximize the usefulness of this course, we recommend that participants bring their own laptops with them, to be able to actively participate in the empirical sessions.

Individuals interested in attending the training course, must return their completed registration forms either by email (training@tstat.eu) or by fax (+39 0864 206014) to TStat by the 1st of December 2017.


NAME

EMAIL

OBJECT

ADDITIONAL COMMENTS

I authorise the use of my personal data pursuant to Article 13 of L. Decree no 196 / 2003

This course aims to provide participants with the fundamental Stata programming toolkit in order to facilitate, automate, replicate and personalize both data analysis, management and presentation. The course begins by reviewing some general Stata commands, illustrating how they can be combined with some powerful Stata programming constructs for looping and branching. During the two days, participants will be shown how to write, modify and develop do files (Stata programs).