------------------------------------------------------------------------------- help forfese-------------------------------------------------------------------------------

Standard errors for fixed effects

Syntax

fesevarlist[ifexp] [inrange] [,s(string)oonlyabsorb(varname)other areg_options]

feseimplements a fixed-effects regression using areg and saves the estimated fixed effects and their standard errors as new variables on the data. Note that areg produces identical results to xtreg with thefeoption except when the cluster-robust VCE is requested, in which case areg uses a different degrees of freedom adjustment, which is more appropriate for the present case. areg is always equivalent to running regress with an exhaustive set of indicator variables for panels.These standard errors are not usually computed in a fixed-effects regression, but we may need them. One example takes student test scores as the dependent variable and teacher assignments as the explanatory variables, as in Rothstein (2007), where the fixed effects measure the assumed additive effect of a teacher on her students' test scores. The variance of estimated fixed effects captures both the variance of true fixed effects and the variance of the estimator: the variance of true fixed effects (i.e. how disparate are teachers' apparent impacts on students' scores) can be estimated as the observed variance in estimated fixed effects less the best estimate for the variance of the estimator, which is the mean of squared standard errors.

The estimated fixed effects, and OIM and heteroskedasticity- and cluster-robust standard errors (See vce_option and

[U] 20.15 Obtaining robust varianceestimates) are saved by default, as new variables which vary only across panels. See Nichols and Schaffer (2007) for more on cluster-robust variance estimators. Note, however, that the asymptotic justification for a cluster-robust variance estimator requires that the number of clusters m approaches infinity, which implies we cannot get consistent estimates of the fixed effects or the variance of the estimates, though if the number of observations per panel also increases without bound, the properties of the estimator may be acceptable. In the example above, it is implausible that the number of students per teacher is increasing without bound, but with strongly balanced clusters of 25 or so students per class, the behavior of the estimator may rest on how close 25 is to infinity for our purposes.

s(string)specifies the stub to prefix to new variable names.

oonlyrequests that only OIM SEs be calculated (speeding up calculations).

absorb(varname)specifies the panel variable over which to calculate fixed effects. When this option is not specified,fesereads the panel variable from the data characteristiciis(often set by either xtset or tsset).

feseleaves the results from areg ine()and saves matrices of standard errors:Matrices

ovOIM SE vectorrvheteroskedasticity-robust SE vectorcvcluster-robust SE vector

------------------------------------------------------------------------------- ssc install fese, replace webuse grunfeld, clear fese inv mval kst, s(fe_) g b=. g se=. g hrse=. g crse=. qui tab com, g(d_) qui reg inv mval kst d_* qui forv i=1/10 { replace b=_b[d_`i'] replace se=_se[d_`i'] } qui reg inv mval kst d_*, r qui forv i=1/10 { replace hrse=_se[d_`i'] } qui reg inv mval kst d_*, cl(com) qui forv i=1/10 { replace crse=_se[d_`i'] } ------------------------------------------------------------------------------- webuse nlswork, clear fese ln age, s(o) oonly -------------------------------------------------------------------------------ExamplesNichols, Austin and Mark E. Schaffer. 2007. ``Cluster-robust and GLS Corrections." Unpublished Working Paper.

Rothstein, Jesse. 2007. ``Do Value-Added Models Add Value? Tracking, Fixed Effects, and Causal Inference." Working Paper, Princeton University.

feseis not an official Stata command. It is a free contribution to the research community, like a paper. Please cite it as such:Nichols, Austin. 2008. fese: Stata module calculating standard errors for fixed effects. http://ideas.repec.org/c/boc/bocode/s456914.html

AuthorsAustin Nichols Urban Institute austinnichols@gmail.com

Also seeManual:

[U] 20 Estimation and post-estimation commands, esp.[U] 20.15Obtaining robust variance estimates[R] areg[XT] xtregOn-line: help for areg, xtreg, vce_option