Archive

Archive for 2023

From datasets to framesets and alias variables: Data management advances in Stata

The aim of this blog is to describe two novel features introduced in Stata 18 (released in 2023): 1) framesets and 2) alias variables across frames. These features enable Stata to deal with a multiplicity of potentially very large datasets efficiently and conveniently. Framesets allow you to bundle, save on file, and load in memory a set of related frames that hold datasets. Alias variables allow you to access variables in other frames as if they were part of the current frame, with very little memory overhead. Read more…

StataCorp’s Author Support Program—Publish with confidence

Are you writing a book featuring Stata programs or output? We’re here to help! We know you want your book to be modern and accurate in all aspects, including any portions that discuss and demonstrate Stata. That’s why we created the Author Support Program—a program that gives you direct access to Stata experts who will review all the Stata-related content in your book to make sure it is accurate, up to date, and reflective of best practices. Read more…

A Stata command to run ChatGPT

Artificial intelligence (AI) is a popular topic in the media these days, and ChatGPT is, perhaps, the most well-known AI tool. I recently tweeted that I had written a Stata command called chatgpt for myself that runs ChatGPT. I promised to explain how I did it, so here is the explanation. Read more…

Creating tables of descriptive statistics in Stata 18: The new dtable command

In Stata 17, we introduced the new collect suite of commands for creating and customizing tables and the etable command for easily creating and exporting a table of estimation results. Stata 18 offers another new command, dtable, that easily builds and exports a table of descriptive statistics, often called Table 1 in publications. Now generating tables of descriptive statistics for both categorical and continuous variables is easier than ever. It is worth mentioning that the twin commands etable and dtable are both built on the collect framework we introduced in Stata 17, so they share a lot of properties.

In this post, I’ll demonstrate how to create and export simple tables of descriptive statistics and more complex ones that display statistics by group, test for differences across groups, and more. I will also show how you can use the collect suite of commands to further customize the look of your tables and how to include tables created with dtable in complete reports.

Read more…

Stata 18 released

Just released from Stata Press: A Gentle Introduction to Stata, Revised Sixth Edition

Stata Press is pleased to announce the release of A Gentle Introduction to Stata, Revised Sixth Edition by Alan C. Acock. If you, or someone you know, are new to Stata, you will want to check out the revised edition of Stata Press’s longtime best seller, which is now available and fully updated for Stata 17. Read more…