New FAQs about customizable tables are here!

The new table features introduced in Stata 17 and Stata 18 have made it easy to create and customize tables of descriptive statistics, regression results, and more. These powerful features became popular among our users very soon after they were introduced, and we often get questions from users who want to know how to accomplish specific customizations for their tables. To provide our community with more learning resources, we carefully selected some of the questions that we answered frequently, and turned them into a series of example-enriched FAQs: Read more…

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

25 April 2023

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…

Heteroskedasticity robust standard errors: Some practical considerations

Introduction

Some discussions have arisen lately with regard to which standard errors should be used by practitioners in the presence of heteroskedasticity in linear models. The discussion intrigued me, so I took a second look at the existing literature. I provide an overview of theoretical and simulation research that helps us answer this question. I also present simulation results that mimic or expand some of the existing simulation studies. I’ll share the Stata code I used for the simulations in hopes that it might be useful to those that want to explore how the various standard-error estimators perform in situations that are relevant to your research. Read more…

Just released from Stata Press: Microeconometrics Using Stata, Second Edition

Stata Press is pleased to announce the release of Microeconometrics Using Stata, Second Edition, Volumes I and II, by A. Colin Cameron and Pravin K. Trivedi. This book not only debuted as Kindle’s #1 New Release but also immediately ranked high on Kindle’s competitive best-seller lists in categories such as Statistics, Microeconomics, Econometrics & Statistics, Education Software, Education Statistics, and Mathematical & Statistical. Read more…

Bayesian threshold autoregressive models

Autoregressive (AR) models are some of the most widely used models in applied economics, among other disciplines, because of their generality and simplicity. However, the dynamic characteristics of real economic and financial data can change from one time period to another, limiting the applicability of linear time-series models. For example, the change of unemployment rate is a function of the state of the economy, whether it is expanding or contracting. A variety of models have been developed that allow time-series dynamics to depend on the regime of the system they are part of. The class of regime-dependent models include Markov-switching, smooth transition, and threshold autoregressive (TAR) models. Read more…