[BUG] Different standard errors between cluster(clustvar) and vce(cluster clustvar)
eric-roca opened this issue · 0 comments
eric-roca commented
Before submitting the bug report
- Verify that you are using the latest versions of reghdfe and ftools (
which reghdfe
). Note that the latest version is usually on Github and not on SSC.
which reghdfe
/home/eric/.local/share/ado/plus/r/reghdfe.ado
*! version 6.12.2 02Nov2021
. which ivreghdfe
/home/eric/.local/share/ado/plus/i/ivreghdfe.ado
*! ivreghdfe 1.1.1 14Dec2021 (experimental -margins- support)
*! ivreghdfe 1.1.0 25Feb2021
*! ivreg2 4.1.11 22Nov2019
*! authors cfb & mes
*! see end of file for version comments
- Verify that your Stata is updated (
update query
).
. update query
(contacting http://www.stata.com)
Update status
Last check for updates: 17 Mar 2022
New update available: none (as of 17 Mar 2022)
Current update level: 15 Feb 2022 (what's new)
Possible actions
Do nothing; all files are up to date.
Bug report
Please complete the following information:
- Stata version: 17.0
- OS: Linux, kernel 5.16-14
Behavior
-
Expected behavior: a clear and concise description of what you expected to happen.
Obtain the same standard errors usingcluster(clustvar)
andvce(cluster clustvar)
as is the case with other Stata commands. -
Actual behavior: what was the error. If possible, copy-paste output. For instance:
The standard errors differ.
Steps to reproduce the problem
clear all
set obs 1000
set seed 1111
gen x = rnormal()
gen z = 0.2 * x + 5 * rnormal()
gen e = rnormal()
gen y = x + e
* Construct some clusters
gen g = mod(_n, 25)
ivreg2 y (x = z), cluster(g)
ivreghdfe y (x = z), vce(cluster g)
ivreghdfe y (x = z), cluster(g)