This course aims to provide participants with the necessary Stata programming toolkit in order to facilitate, automate, replicate and personalize both data analysis, management and the presentation of Stata results. 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 to write, modify and develop Stata do files (user written Stata routines) incorporating both local and global macros. The focus then shifts to the important issue of workflow automation, illustrating how Stata’s programming capabilities can be implemented in order to both: i) fully automate one’s research workflow; and ii) automate the transfer of results obtained in Stata to other software using Stata’s matrix capabilities. 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, to ultimately be in a position to automate the more repetitive tasks of data management, data analysis and data presentation in Stata.
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 sound working knowledge of Stata. Participants are not however, required to have any programming experience in Stata or in other statistical packages.
SESSION I: ORGANISING, MANIPULATING AND VISUALIZING YOUR DATASETS WITHIN A DO-FILE – A REVIEW
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 II: STATA CONSTRUCTS FOR DO-FILES 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 III: AUTOMATION DO-FILE PROGRAMMING IN PRACTICE – MAKING LIFE 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
SESSION IV: AUTOMATING THE TRANSFER OF STATA RESULTS TO EXTERNAL SOFTWARES – STATA’S MATRIX CAPABILITIES
Stata basic matrix commands
Stata matrix input and output
Matrix input from Stata estimation results
Stata matrix subscripts and combining matrices
Integrating Stata matrix capabilities for DO-file automation: examples
Due to the current COVID-19 situation, the 2020 edition of this Training Course will now be offered ONLINE, on a part-time basis on the 14th, 16th and 17th of December 2020. To this end, this year’s programme has been transformed into a series of module based on 3 sessions from 9.00 am to 1.15 pm Central European Time (CET).
Full-Time Students*: € 655.00
Academic: € 930.00
Commercial: € 1085.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.
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.
Course fees cover: teaching materials (handouts, 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.
Individuals interested in attending this course, must return their completed registration forms to TStat by the 10th December 2020.
This course aims to provide participants with the necessary Stata programming toolkit in order to facilitate, automate, replicate and personalize both data analysis, management and the presentation of Stata results.
Due to the current COVID-19 situation, the 2020 edition of this Training Course will now be offered ONLINE, on a part-time basis on the 14th-16th and 17th of December 2020.