CODICE CORSO: I-SS11 LINGUA: RESIDENZIALE

Stata Programming “A little bit of Programming goes an awfully long way…”

“A little bit of Stata Programming goes an awfully long way”…. The underlying objective of this summer school is to illustrate the ways in which some very basic programming tools can be easily implemented in Stata in order to facilitate, automate, replicate and personalize both data analysis/management and data presentation. To this end participants are provided with a core set of programming tools and techniques, that are prerequisites for a more effective, time saving use of the software.

 

During the course of the summer school, participants will be shown how to write, modify and develop do files (Stata programs). At the end of the three days, 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, flexible, reproducible manner. This would allow them, for example, to ultimately be in a position to delegate the more repetitive tasks of data management, data analysis and data presentation in Stata.

 

In common with TStat’s workshop philosophy, each individual session is composed of both a theoretical component (in which the techniques and underlying principles behind them 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 summer school, theoretical sessions are reinforced by case study examples, in which the course tutor discusses and highlights potential pitfalls and the advantages of individual techniques.

This school will prove invaluable to both researchers and professionals across a wide spectrum of fields (Biostatistics, Economics, Epidemiology, Political and Social Sciences, Public Health), wishing to progress to a more advanced, efficient and automated use of Stata.

Familiarity/working knowledge of Stata. Participants are not however, required to have any programming experience in Stata or in other statistical packages.

DAYS 1-2

FUNDAMENTALS OF STATA PROGRAMMING

 

SESSION I – PROGRAMMING: Some Fundamental Concepts

Do and ado files in Stata

Data types: Working with Dates and Time, Time Series Operators, Factor Variables

Debugging – the capture command

Protecting your data with preserve and restore

Guidelines for writing programs in Stata

 

SESSION II – PROGRAMMING STATA DO-FILES: Some Basic Programming Commands and Tools

Local macros

Global macros

Transformation of string and numeric variables

Recoding discrete and continuous variables

Recoding missing variables

Generate and egen functions

Local and global macros

Extended macro functions and list functions

Scalars and matrices

Temporary variables and tempnames

Looping commands: forvalues and foreach

By, statsby, rolling and other prefix commands

Transforming data with reshape

Combining datasets with append and merge

 

DAYS 2-3 PROGRAMMING EXAMPLES AND AUTOMATION

SESSION III – Programming Concepts and Tools in Action

Tabulating and computing statistics across a set of variables and groups

Computing durations and aggregating transactions data

Summarizing group characteristics over observations

Sdding aggregate characteristics to micro observations

Reusing results : return and ereturn commands

Accessing estimation results and margins

 

SESSION IV – AUTOMATION: Do-file Programming Makes Life a Lot Easier

Storing results in matrices

Stata’s post and postfile commands

Automating estimation output – the user-written commands estout and tabout, saveresults

Automating graphical output

 

DAY 3 –  ADO- FILE PROGRAMMING AND MATA PROGRAMMING

SESSION V  – Ado File Programming

Structure of an ado-file

Syntax and return statements

Using program options

Including subset of observations

Generalizing commands to handle multiple variables

Rendering commands byable

Writing an e-class program

Programs for egen, ml, nl

Programs for gmm

Guidelines for ado-file programming style

 

SESSION VI –  Introduction to Mata

Mata Fundamentals

A simple Mata function

Components of a Mata function

Calling Mata functions

Mata’s st_interface functions

Mata-based likelihood function evaluators

Creating arrays of temporary objects with pointers

Structures

Additional Mata features

 


L’iscrizione al corso dovrà avvenire tramite lo specifico modulo di registrazione e pervenire a TStat S.r.l. almeno 15 giorni prima dell’inizio del corso stesso. E’ possibile richiedere il modulo di registrazione compilando il seguente form oppure inviando una mail a formazione@tstat.it


NOME*


EMAIL*


OGGETTO


IL TUO MESSAGGIO


Termini e condizioni*
Autorizzo il trattamento dei dati personali ai sensi dell'articolo 13 del D.lgs. n.196/2003 - Testo completo



The underlying objective of this summer school is to illustrate the ways in which some very basic programming tools can be easily implemented in Stata in order to facilitate, automate, replicate and personalize both data analysis/management and data presentation.