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
- by-processing
- append
- merge and joinby
- collapse and contract
- order, aorder, move, reshape (for panel data)
SESSION II: STATA CONSTRUCTS FOR DO-FILES 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 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
- Customizing graphs
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
- Data/Matrix conversion
- Integrating Stata matrix capabilities for DO-file automation: examples
SUGGESTED READING
- Baum, Christopher F. (2016). An Introduction to Stata Programming. Second Edition, Stata Press.