I ran into a problem where I do not know whether this is a bug or whether I am doing something wrong. I would like to extract the number of clusters used in each regression and ultimately save it as a scalar. According to the help file, this number should be stored in e(clust#). But this always seems to be empty. Consider the following MWE:
Code:
clear all sysuse auto reghdfe price weight length, absorb(rep78) vce(cluster rep78 foreign) di e(clust1) // should be 5, but returns . di e(clust2) // should be 2, but returns . di e(N_clust) // this works and correctly displays 2 di e(N_clustervars) // this works too and displays 2
(I'm running Stata 16.1 on a Mac and use the most recent version of reghdfe.)
0 Response to e(clust#) not working in reghdfe
Post a Comment