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…

Using the margins command with different functional forms: Proportional versus natural logarithm changes

margins is a powerful tool to obtain predictive margins, marginal predictions, and marginal effects. It is so powerful that it can work with any functional form of our estimated parameters by using the expression() option. I am going to show you how to obtain proportional changes of an outcome with respect to changes in the covariates using two different approaches for linear and nonlinear models. Read more…

Comparing transmissibility of Omicron lineages

Monitoring lineages of the Omicron variant of the SARS-CoV-2 virus continues to be an important health consideration. The World Health Organization identifies BA.1, BA.1.1, and the most recent BA.2 as the most common sublineages. A recent study from Japan, Yamasoba et al. (2022), compares, among other characteristics, the transmissibility of these three Omicron lineages with the latest Delta variant. It identifies BA.2 to have the highest transmissibility of the four. Preprint of the study is available at bioarxiv.org. One interesting aspect of the study is the application of Bayesian multilevel models for representing lineage growth dynamics. In this post, I demonstrate how to use Stata’s bayesmh and bayesstats summary commands to perform similar analysis. Read more…

Wharton Research Data Services, Stata 17, and JDBC

Working with Wharton Research Data Services (WRDS) data in Stata is now even easier. I previously wrote about accessing WRDS data via ODBC. With Stata 17, using JDBC makes configuring WRDS and Stata even easier—and the steps to configure are the same across all operating systems. Whether you download WRDS data to your local machine or work in the cloud, the command to use in Stata for JDBC is jdbc. Read more…

Just released from Stata Press: A Visual Guide to Stata Graphics, Fourth Edition

Stata Press is pleased to announce the release of A Visual Guide to Stata Graphics, Fourth Edition by Michael N. Mitchell. This book debuted as Kindle’s #1 New Release in the category Mathematical & Statistical and continues to appear on Kindle’s best-seller list in numerous categories, including Educational Software and Education Statistics. Read more…

Just released from Stata Press: Multilevel and Longitudinal Modeling Using Stata, Fourth Edition

Stata Press is pleased to announce the release of Multilevel and Longitudinal Modeling Using Stata, Volumes I and II, Fourth Edition by Sophia Rabe-Hesketh and Anders Skrondal. This book debuted on the top 10 list for Kindle’s new releases for Probability & Statistics and consistently stayed there for weeks. This book was also on the top 10 list for Kindle’s new releases in Mathematics, competing with many other books. Read more…

Just released from Stata Press: An Introduction to Stata for Health Researchers, Fifth Edition

Stata Press is pleased to announce the release of An Introduction to Stata for Health Researchers, Fifth Edition, by Svend Juul and Morten Frydenberg. This book debuted at #1 on Kindle’s new release list for Probability & Statistics and debuted on the top ten list on Kindle’s new release list for Mathematics. Read more…

Customizable tables in Stata 17, part 7: Saving and using custom styles and labels

In Customizable tables in Stata 17, part 5, I showed you how to use the new and improved table command to create a table of results from a logistic regression model. We are likely to create many more tables of regression results, and we will probably use the same style and labels. In this post, I will show you how to save your styles and labels so that you can use them to format future tables. I will use the Microsoft Word document that we created in part 5 as our goal. Read more…

Customizable tables in Stata 17, part 6: Tables for multiple regression models

In my last post, I showed you how to create a table of statistical tests using the command() option in the new and improved table command. In this post, I will show you how to gather information and create tables using the new collect suite of commands. Our goal is to fit three logistic regression models and create the table in the Adobe PDF document below. Read more…

Customizable tables in Stata 17, part 5: Tables for one regression model

In my last post, I showed you how to use the new and improved table command with the command() option to create a table of statistical tests. In this post, I want to show you how to use the command() option to create a table for a single regression model. Our goal is to create the table in the Microsoft Word document below. Read more…