Tim Plante, MD MHS

ZIP code and county data sets for use in epidemiological research

Everyone knows their (5-digit) ZIP and it can be linked to population-level data. ZIP Codes have limitations since they were designed for mail delivery and not for population details. You can easily get county data from these data as well. In epidemiological studies (especially EMR and survey data), you’ll almost certainly have a ZIP code …

Use Stata to download the NY Times COVID-19 database and render a Twitter-compatible US mortality figure

Note: this code probably doesn’t work anymore with changes in the NY Times database. I’m keeping it here for historical purposes (4/22/2022). Here’s the figure! Code follows Comments are in-line below. Some unique strategies in this code: This will automatically download the latest NY Times dataset, but the date of “last day of follow-up” needs …

Downloading and analyzing NHANES datasets with Stata in a single .do file

Learn to love NHANES NHANES is a robust, nationally-representative cross-sectional study. For the past ~18 years it sampled different communities across the US in 2 year continuous cycles. A few of these years are linked to National Death Index data, so you can assess risk factors at the time of the survey and use time-to-event …

Skip to toolbar