Hello Statalist members,
for my research I want to test if the mean of my dependent variable is different from zero, while additionally clustering the standard errors. I want to use reghdfe and double cluster my standard errors. Originally, I use panel data, but I have created an example that leads to the same error message as with my own data set, so that you can better understand my issue. Here’s my approach:
Code:
sysuse auto, clear gen wc = wordcount(make) su wc, meanonly local max = r(max) gen wanted = substr(make, 1, 1) reghdfe price, vce(cluster foreign wanted)
Code:
. reghdfe price, vce(cluster foreign wanted) (MWFE estimator converged in 1 iterations) reghdfe_fix_psd(): 3301 subscript invalid reghdfe_vce_cluster(): - function returned error reghdfe_solve_ols(): - function returned error <istmt>: - function returned error r(3301);
Comment