A novel and robust algorithm to efficiently absorb the fixed effects (extending the work of Guimaraes and Portugal, 2010).Reghdfe is a generalization of areg (and xtreg,fe, xtivreg,fe) for multiple levels of fixed effects (including heterogeneous slopes), alternative estimators (2sls, gmm2s, liml), and additional robust standard errors (multi-way clustering, HAC standard errors, etc). For instance if absvar is "i.zipcode i.state#c.time" then i.state is redundant given i.zipcode, but convergence will still be much faster. If you need those, either i) increase tolerance or ii) use slope-and-intercept absvars ("state#c.time"), even if the intercept is redundant. Slope-only absvars ("state#c.time") have poor numerical stability and slow convergence. are dropped iteratively until no more singletons are found (see ancilliary article for details). x # z) is faster than running egen group(.) beforehand. Please be aware that in most cases these estimates are neither consistent nor econometrically identified. To save the estimates specific absvars, write newvar = absvar. Multiple heterogeneous slopes are allowed together. depending on the category of var1Įquivalent to " i. prefix is tacit)Ībsorb the interactions of multiple categorical variablesĪbsorb heterogeneous slopes, where var2 has a different slope coef. Indepvars, endogvars and iv_vars may contain factor variables see fvvarlist.Īll the regression variables may contain time-series operators see tsvarlist.įweights, aweights and pweights are allowed see weight.Ĭategorical variable to be absorbed (the i. + indicates a recommended or important option. Will call the latest 2.x version of reghdfe instead (see the old help file) Particularly useful are the noomitted and noempty options to hide regressors omitted due to collinearity Set confidence level default is level(95)Ĭontrol column formats, row spacing, line width, display of omitted variables and base and empty cells, and factor-variable labeling. Reports the version number and date of reghdfe, and saves it in e(version). Unique identifier for the first mobility group Will not create e(sample) disabled when saving fixed effects, residuals or mobility groupsĪllows selecting the desired adjustments for degrees of freedom rarely used Run regressions on cached data vce() must be the same as with cache(save).ĭelete Mata objects to clear up memory no more regressions can be run after this Suboption keep( varlist) adds additional untransformed variables to the resulting dataset Transform operation that defines the type of alternating projection options are Kaczmarz (kac), Cimmino (cim), Symmetric Kaczmarz (sym)Ībsorb all variables without regressing (destructive combine it with preserve/restore) a large poolsize is usually faster but uses more memoryĪcceleration method options are conjugate_gradient (cg), steep_descent (sd), aitken (a), and none (no) ) it will run for as long as it takes.Īpply the within algorithm in groups of # variables (default 10). Maximum number of iterations (default=10,000) if set to missing (. Show elapsed times by stage of computation Package used in the IV/GMM regressions options are ivreg2 (default needs installing) and ivregressĪmount of debugging information to show (0=None, 1=Some, 2=More, 3=Parsing/convergence details, 4=Every iteration) Suboptions bw( #), kernel( str), dkraay( #) and kiefer allow for AC/HAC estimates see the avar packageĮither 2sls (default), gmm2s (two-stage GMM), liml (limited-information maximum likelihood) or cue (which gives approximate results, see discussion below)Įstimate additional regressions choose any of first ols reduced acid (or all)Ĭompute first-stage diagnostic and identification statistics Vcetype may be unadjusted (default), robust or cluster fvvarlist (allowing two- and multi-way clustering) Save residuals more direct and much faster than saving the fixed effects and then running predictĮquivalent to estat summarize after the regression, but more flexible, compatible with the fast option, and saves results on e(summarize)Īdditional options that will be passed to the regression command (either regress, ivreg2, or ivregress) Save all fixed effect estimates ( _hdfe* prefix) useful for a subsequent predict. Identifiers of the absorbed fixed effects each absvar represents one set of fixed effects Reghdfe depvar, absorb( absvars) Options Linear and instrumental-variable/GMM regression absorbing multiple levels of fixed effects