Stata ados 

Sendemails is a Stata package that allows instructors, researchers, or students to send emails through Stata, to the benefit of their pedagogical or scientific tasks. sendemails is a simple general and flexible tool, which can be used by anyone and is based on PowerShell, which is open-source and cross-platform since 2016. It allows useful applications such as sending several personalized emails to students or colleagues (e.g., to communicate grades, to spread info to a newsletter, to communicate the end of a long Stata task). The user can insert object, Cc, Bcc, several attachments, and personalize the font through html code. Because of these features, sendemails could be used to conduct online experiments as well, such as correspondence audit tests, without needing coding proficiency.

Related files:

Ado file

STHLP file

Examples package

This paper discusses sendemails in greater detail


Milito22. You often run do files/computations that might take a while to be done, but they are not so long (e.g. you are not done with your day and have not left the office). Maybe you keep working at the desk but on something else, or you start doing house tasks (ah, pandemic lockdowns!). If that is the case, you do not need to keep looking at the Stata output to check when it is done doing computations. This simple (and fun) package, milito22, solves this "very important" issue.

What does it do? When the computations are done and Stata reaches the line with the command milito22 (no options needed), Stata will open a software of your choice (e.g. wmplayer) and play a file of your choice (e.g. an mp3 file). You simply have to adjust two parts of one line in the ado file (you find it further down):

!"C:\Program Files\Windows Media Player\wmplayer" "C:\Users\luca_\Documents\Stata 14\ado\personal\gol_di_milito.mp3" 

Adjust the path of the software and the name of the software; adjust the path to the file that the software will open. You can change also the number of times this file will be played in a loop and the time from one repeat to the next one (the ado file contains brief comments on that).

Note: 22 does not stand for the version of the ado, it stands for the jersey number of Diego Milito in FC International Milan.

Related files:

Ado file

[PS1: If, like me, you are a supporter of FC International Milan, you can download here the mp3 with the Italian commentary of Diego Milito's goal against Bayern Munich (Champions League final, 2010)]

[PPS: if, differently from me, you are not an FC Inter supporter, you can change the name of the package too] 


Onlyuseful is a Stata package designed to automate dataset reduction by retaining only the variables explicitly used in a Stata script. By leveraging PowerShell, it enhances reproducibility and efficiency in data management for large datasets and supports research replicability. Imagine you would like to do the following thing. You got a paper accepted and want to share the (very large) .dta and the .do file in a public repository; however, the .do file uses only a few of the variables contained in the dataset. Thus, you can drop all of those variables that you do not use in the .do file. To do that, you need a list of those variables you used, but the .do file is BIG!! How boring and time consuming to go through it! onlyuseful does all you need automagically (this package, like the other two in this page, is a byproduct of a study I conducted. I did not mean to prepare a package, but I ultimately did it due to the great interest generated by a tweet of mine, X--former Twitter)

Related files:

Ado file

STHLP file

Examples package

This paper discusses onlyuseful in greater detail