Archive for February 2020

Just released from Stata Press: Introduction to Time Series Using Stata, Revised Edition

Stata Press is pleased to announce the release of Introduction to Time Series Using Stata, Revised Edition, by Sean Becketti. This edition has been updated for Stata 16 and is available in paperback, eBook, and Kindle format. In this book, Becketti introduces time-series techniques—from simple to complex—and explains how to implement them using Stata. The many worked examples, concise explanations that focus on intuition, and useful tips based on the author’s experience make the book insightful for students, academic researchers, and practitioners in industry and government. Read more…

Bayesian inference using multiple Markov chains


Markov chain Monte Carlo (MCMC) is the principal tool for performing Bayesian inference. MCMC is a stochastic procedure that utilizes Markov chains simulated from the posterior distribution of model parameters to compute posterior summaries and make predictions. Given its stochastic nature and dependence on initial values, verifying Markov chain convergence can be difficult—visual inspection of the trace and autocorrelation plots are often used. A more formal method for checking convergence relies on simulating and comparing results from multiple Markov chains; see, for example, Gelman and Rubin (1992) and Gelman et al. (2013). Using multiple chains, rather than a single chain, makes diagnosing convergence easier.

As of Stata 16, bayesmh and its bayes prefix commands support a new option, nchains(), for simulating multiple Markov chains. There is also a new convergence diagnostic command, bayesstats grubin. All Bayesian postestimation commands now support multiple chains. In this blog post, I show you how to check MCMC convergence and improve your Bayesian inference using multiple chains through a series of examples. I also show you how to speed up your sampling by running multiple Markov chains in parallel. Read more…

Adding recession shading to time-series graphs


Sometimes, I like to augment a time-series graph with shading that indicates periods of recession. In this post, I will show you a simple way to add recession shading to graphs using data provided by import fred. This post also demostrates how to build a complex graph in Stata, beginning with the basic pieces and finishing with a polished product.

Read more…
Categories: Graphics Tags: ,