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 (user written Stata programs).
At the end of the course, 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
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
merge and joinby
collapse and contract
order, aorder, move, reshape (for panel data)
SESSION III: STATA CONSTRUCTS FOR DO-FILE PROGRAMMING
Global and local macros
Scalars and matrices
Extended macro functions
Macro increment and decrement functions
Advanced local macro manipulation
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
The course will take place in Berlin on the 6th and 7th April 2020.
Due to the current Public Health situation in Europe, we unfortunately have to reschedule this course date. We will be monitoring the virus situation very carefully over the forthcoming weeks, so as to be in a position to publish a feasible updated course schedule as soon as possible. Please accept our apologies for any inconvenience caused.
Full-time students*: € 770.00
Academic: € 1070.00
Commercial: € 1235.00
*To be eligible for student price, participants must provide proof of their full-time student status for the current academic year.
Fees are subject to VAT (applied at the current Italian rate of 22%). Under current EU fiscal regulations, VAT will not however applied to companies, Institutions or Universities providing a valid tax registration number.
Please note that a non-refundable deposit of €100.00 for students and €250.00 for Academic and Commercial participants, is required to secure a place and is payable upon registration. The number of participants is limited to 10. Places, will be allocated on a first come, first serve basis. The course will be officially confirmed, when at least 5 individuals are enrolled.
Course fees cover: teaching materials (handouts, Stata do-files, program templates and datasets to use during the course), a temporary course licence of Stata valid for 30 days from the beginning of the course, light lunch and coffee breaks.
To maximize the usefulness of this training course, we strongly recommend that participants bring their own laptops with them, to enable them to actively participate in the empirical sessions.
Individuals interested in attending this course, must return their completed registration forms to TStat by the 17th March 2020.
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).