Nothing to download.

heterogeneity and heteroskedasticity in endogenous switching models: estimating the effects of physician advice on calorie consumption (replication data)

This replication packet contains all the data and Stata do-files to reproduce all tables and figures in "Heterogeneity and Heteroskedasticity in Endogenous Switching Models: Estimating the Effects of Physician Advice on Calorie Consumption." by Riju Joshi and Jeffrey M. Wooldridge


Included folders and short description. ........................................

[I] Simulation.zip folder includes

  1. Simulations.do This is a Stata do-file that replicated the Monte Carlo simulations.

  2. README_simulations.txt This file contains instructions on how to replicate the simulations.


[II] Data.zip folder includes

  1. rawdata_2007_2016.dta. This is the raw NHANES dataset. This dataset has been compiled using the Stata do-file "compiling.do" and merged using the Stata do-file "merging.do". Both Stata do-files are in the Application.zip folder.

  2. data_2007_2016.dta This is the cleaned and prepped dataset. This dataset is cleaned using "prepping.do". This Stata do-file is in the Application.zip folder.


[III] Application.zip folder incudes

  1. compiling.do This is a Stata do-file that compiles NHANES datasets directly from the website. We compile data on several characteristics for each year.

  2. merging.do This is a Stata do-file that merges all the raw NAHNES datasets collected using compiled.do. We merge them for each year and then we append the yearly files. The final raw dataset is named rawdata_2007_2016.dta

  3. prepping.do This is a Stata do-file that prepares the rawdata_2007_2016.dta dataset for analysis. The cleaned dataset is named as data_2007_2016.dta

  4. analysis.do This is a Stata do-file that conducts the analysis.

  5. README_application.txt This file contains instructions on how to replication the application.

Any questions and concerns with replication can be sent to Riju Joshi (riju@pdx.edu)

Data and Resources

Suggested Citation

JOSHI, RIJU; WOOLDRIDGE, JEFFREY (2025): Heterogeneity and Heteroskedasticity in Endogenous Switching Models: Estimating the Effects of Physician Advice on Calorie Consumption (replication data). Version: 1.0. Journal of Applied Econometrics. Dataset. http://dx.doi.org/10.15456/jae.2025087.2159666707

JEL Codes