Hello,
Using Stata 17, I am trying to run a Bartik-style IV-regression with 10 year and 73 township fixed effects (balanced panel), controlling for two-way clustered standard errors.
I get an error message (see below) that seems to be pretty common. Usually, the advice people give is to use the partial option and that then solves the problem. However, in my case the error still persist when I do so.
Both, the endogenous variable and the instrument are continuous variables. There is no singleton dummy.
I am clustering by year and by township. Given that I use both year FE and township FE, as well as an exogenous instrument, #clusters < (#exogenous regressors + #excluded instruments) is true and might be part of the problem. Strangely, clustering with less clusters attenuates the problem. Using 10 year + 20 district clusters (while still controlling for 10 + 73 FE) gives me the same error message, but Stata is now able to compute standard errors. Using 10 year + 2 state clusters (again, with 10 + 73 FE), the problem disappears. If an insufficient number of clusters causes this behavior, this seems counterintuitive.
Using Stata 17, I am trying to run a Bartik-style IV-regression with 10 year and 73 township fixed effects (balanced panel), controlling for two-way clustered standard errors.
Code:
ivreg2 conflict_events (mmr_to_chn_area_miousd = chn_from_lmic_area_miousd) i.year i.township, cluster(township year) partial(i.year i.township)
Both, the endogenous variable and the instrument are continuous variables. There is no singleton dummy.
I am clustering by year and by township. Given that I use both year FE and township FE, as well as an exogenous instrument, #clusters < (#exogenous regressors + #excluded instruments) is true and might be part of the problem. Strangely, clustering with less clusters attenuates the problem. Using 10 year + 20 district clusters (while still controlling for 10 + 73 FE) gives me the same error message, but Stata is now able to compute standard errors. Using 10 year + 2 state clusters (again, with 10 + 73 FE), the problem disappears. If an insufficient number of clusters causes this behavior, this seems counterintuitive.
Code:
IV (2SLS) estimation -------------------- Estimates efficient for homoskedasticity only Statistics robust to heteroskedasticity and clustering on township and year Number of clusters (township) = 73 Number of obs = 730 Number of clusters (year) = 10 F( 1, 9) = . Prob > F = . Total (centered) SS = 80716.59178 Centered R2 = 0.0301 Total (uncentered) SS = 80716.59178 Uncentered R2 = 0.0301 Residual SS = 78284.80313 Root MSE = 10.36 ---------------------------------------------------------------------------------------- | Robust conflict_events | Coefficient std. err. z P>|z| [95% conf. interval] -----------------------+---------------------------------------------------------------- mmr_to_chn_area_miousd | -.1136036 . . . . . ---------------------------------------------------------------------------------------- Underidentification test (Kleibergen-Paap rk LM statistic): 0.919 Chi-sq(1) P-val = 0.3379 ------------------------------------------------------------------------------ Weak identification test (Cragg-Donald Wald F statistic): 159.487 (Kleibergen-Paap rk Wald F statistic): 46.031 Stock-Yogo weak ID test critical values: 10% maximal IV size 16.38 15% maximal IV size 8.96 20% maximal IV size 6.66 25% maximal IV size 5.53 Source: Stock-Yogo (2005). Reproduced by permission. NB: Critical values are for Cragg-Donald F statistic and i.i.d. errors. ------------------------------------------------------------------------------ Warning: estimated covariance matrix of moment conditions not of full rank. overidentification statistic not reported, and standard errors and model tests should be interpreted with caution. Possible causes: number of clusters insufficient to calculate robust covariance matrix singleton dummy variable (dummy with one 1 and N-1 0s or vice versa) partial option may address problem. ------------------------------------------------------------------------------ Instrumented: mmr_to_chn_area_miousd Excluded instruments: chn_from_lmic_area_miousd Partialled-out: 2011.year 2012.year 2013.year 2014.year 2015.year 2016.year 2017.year 2018.year 2019.year 23.township 53.township 54.township 56.township 60.township 61.township 62.township 66.township 68.township 84.township 85.township 87.township 89.township 90.township 91.township 98.township 108.township 114.township 115.township 117.township 119.township 121.township 127.township 128.township 129.township 134.township 135.township 136.township 140.township 155.township 157.township 158.township 159.township 160.township 161.township 162.township 163.township 164.township 165.township 166.township 167.township 168.township 169.township 170.township 171.township 172.township 173.township 179.township 189.township 193.township 194.township 195.township 196.township 198.township 202.township 203.township 211.township 221.township 222.township 233.township 235.township 236.township 240.township 260.township 269.township 271.township 276.township 277.township 281.township 307.township 309.township 325.township _cons nb: total SS, model F and R2s are after partialling-out; any small-sample adjustments include partialled-out variables in regressor count K ------------------------------------------------------------------------------
Comment