COURSE ID: SUG_GREEK_2027 LANGUAGE:

Stata Programming: Foundations for Reproducible, Efficient Research – Automating your Research in Stata

AI coding assistants are constantly changing how applied research is conducted. Many young researchers now wonder whether learning to code is still worth the effort. IT IS, and it MATTERS MORE than ever.

 

AI can write a Stata do-file in seconds, but it can also make mistakes that are subtle, confident and easy to miss. Sometimes the cause of the error is a vague prompt. Sometimes it is a gap in the AI’s understanding of the data, the methodology or the subject. Only a prepared user who understands both the software and the statistics behind it can tell good code from code that simply looks correct. Used well, AI can greatly speed up your work and take your research to the next step, but such gains will only be achieved when you yourself know what you are doing.

 

This course offers you this foundation: the core Stata programming toolkit for automating, replicating and customising data management, analysis and presentation. It reviews key Stata commands and illustrates how they combine with Stata’s programming constructs. The course then focuses on macros, loops and branching, and on how to use them to write, read, debug and develop your own do-files and programs, whoever (or whatever) wrote the first draft.

 

COURSE OUTCOMES
By the end of the course, you will be able to:

  • Write clean, efficient and reproducible do-files from scratch;
  • Automate repetitive data management and analysis tasks;
  • Read, check and adapt code, whether a colleague or an AI assistant wrote it;
  • Use AI tools with confidence, knowing when to trust the output and when to question it.

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: WORKING WITH MULTIPLE DATASETS AND DATA MANAGEMENT IN A DO-FILE

  1. Working with multiple datasets in memory: preserve, restore, frames (frame create, frame change, frame put, frlink, frget, frame post)
  2. Advanced data management: append, merge, collapse, contract, reshape

 

SESSION II: STATA CONSTRUCTS FOR WORKFLOW PROGRAMMING

  1. Stata syntax
  2. Global and local macros, including Recalling macros
  3. Scalars and matrices
  4. Extended macro functions
  5. Macro increment and decrement functions
  6. Advanced local macro manipulation
  7. Temporary objects: tempvar, tempname, tempfile
  8. Loops: foreach, forvalues, while
  9. Branching with if and else
  10. Explicit subscripts in Stata
  11. Writing and modifying Stata programs: without arguments, with positional arguments, with named positional arguments, storing and retrieving results
  12. Programs with arguments using the syntax construct

 

SESSION III: AUTOMATION, DO-FILE PROGRAMMING IN PRACTICE

  1. A do-file template
  2. Master and using do-files
  3. Speeding up workflows with real examples: alternative specifications, automated estimation tables, returning results (return, ereturn), building and automating graphs
  4. Reproducibility essentials: version, set seed, relative paths, logging, a clean project folder structure
  5. Defensive programming and debugging: assert, confirm, capture with _rc, set trace on, display for checking macro contents

 

SESSION IV: ELEVATING YOUR STATA PROGRAMMING CAPABILITIES WITH AI TOOLS

  1. DEMO – Natural language productions and verification of your Stata workflow
  2. Illustrate typical failure modes: invented options or commands, wrong merge type, outdated syntax, macro quoting errors
  3. Good practice: precise prompts, testing on small subsets, never running code you cannot read

 

SESSION V: INTEGRATING STATA AND PYTHON

  • A live example – time permitting

This course is being offered on the second day of the first Greek Stata Users Conference that will be held on the 28th and 29th of January 2027 at the Athens University of Economics and Business (AUEB).

Giovanni Cerulli, Ph.D. National Research Council of Italy – IRCrES

Conference Only Conference / Training Course
Early Bird Registration for Students* (before 13 November 2026) € 34.00 € 106.00
Students* (after 13 November 2026) € 40.00 € 125.00
Others € 95.00 € 350.00

 

*To be eligible for student prices, participants must provide proof of their full-time student status for the current academic year. All participation fees are subject to VAT (applied at the current Italian rate of 22%); Individuals interested in participating should return their duly completed registration forms to the conference organizers by the 15 January 2027 at the very latest.

 

FUNDING FOR DOCTORAL STUDENTS
TStat is delighted to sponsor, via our project “Investing in Young Researchers”, TWO full-time Ph.D. students from any of the countries for which TStat is the official Stata Distributor. Sponsorship covers both the first day of the conference and the training course. Travel expenses are however, to be paid by the participant.


To request further information or the registration form, please fill in the following form or send an email to training@tstat.eu


Name*


EMAIL*


Subject


Message


Terms and conditions*
I authorise the use of my personal data in accordance with the European Union’s General Data Protection Regulation 2018.
 
TStat S.r.l.’s privacy policy.
 

Kindly note that TStat S.r.l. will include your data in our mailing list regarding new releases of the software we distribute and our software and statistical training courses. You can of course opt out of receiving this information at any time by simply contacting us at privacy@tstat.it

 

AI coding assistants are constantly changing how applied research is conducted. Many young researchers now wonder whether learning to code is still worth the effort. IT IS, and it MATTERS MORE than ever.