If you don’t know about the reghdfe function in Stata, you are likely missing out, especially if you run ‘high dimensional fixed effects’ models — i.e., your model includes 3+ dimensions of FE, perhaps 2 in time and 1 in space-time. I’ve been encountering a situation which raises this unhelpful error message:
(null assertion)<br></br>Empty sample, check for missing values or an always-false if statement<br></br>r(2000);
This is problematic because for the particular data I’m working with (less than 50K obs.), a ‘reg’ command even on 24GB of RAM would take an hour+ to run. Using reghdfe (when it worked), would give the same results in less than 1 minute.
Possible explanation? Check to see whether the variable you’re clustering your standard errors on is a string. If so, then use an egen/group command or convert your string to numeric and then retry — there’s a good chance it’ll work. I suppose ‘reg’ allows us to be lazy with ‘vce(cluster <stringvar>)’, but ‘reghdfe’ [Homey] “don’t play that.”