Stata Command: crhdreg.ado
This command executes double/debiased machine learning estimation of regression models and IV regression models under clustering. The cluster sampling environments accommodated by this command include the i.i.d. sampling, one-way cluster sampling, and two-way cluster sampling. The four tables below show results of estimating the demand system under i.i.d. sampling (1st table), one-way clustering by markets (2nd table), one-way clustering by products (3rd table), and two-way clustering by both markets and products (4th table).
Double/debiased machine learning under i.i.d. sampling
Double/debiased machine learning under clustering by markets
Double/debiased machine learning under clustering by products
Double/debiased machine learning under two-way clustering by markets and products
Installation:
. ssc install crhdreg
Usage:
. use "blp.dta"
. crhdreg share logprice hpwt* air* mpd* space*, iv(sumotherhpwt)
. crhdreg share logprice hpwt* air* mpd* space*, iv(sumotherhpwt) cluster1(market)
. crhdreg share logprice hpwt* air* mpd* space*, iv(sumotherhpwt) cluster1(model)
. crhdreg share logprice hpwt* air* mpd* space*, iv(sumotherhpwt) cluster1(market) cluster2(model)
Help:
. help crhdreg
Reference: Chiang, H.D., K. Kato, Y. Ma & Y. Sasaki (2021) Multiway Cluster Robust Double/Debiased Machine Learning. Journal of Business & Economic Statistics, 40 (3), pp. 1046-1056. Paper.
Download the manuscript and package in preparation for The Stata Journal (not submitted yet - any comments are welcomed)