I'm trying to run a panel regression in Stata with both individual and time fixed effects. I have a lot of individuals and time periods in my sample so I don't want to print the results of all of them. But the documentation I've read online only shows how to run panel regression with one fixed effect without showing the fixed effect estimates:
xtset id time
xtreg y x, fe //this makes id-specific fixed effects
or
areg y x, absorb(id)
The above two codes give the same results.
Does anyone know how to run panel regressions with both id and time fixed effects but not show the estimates of either?
There are at least a few user-written commands that handle high-dimensional FEs in Stata.
Here are two that I use a fair bit:
capture ssc install regxfe
capture ssc install reghdfe
webuse nlswork
regxfe ln_wage age tenure hours union, fe(ind_code occ_code idcode year)
reghdfe ln_wage age tenure hours union, absorb(ind_code occ_code idcode year)
You might also find this Statalist thread interesting.
Another option would be to use margins
to show just the relevant output that you want to focus on after suppressing the regression output:
quietly xtreg ln_wage age tenure hours union i.(ind_code occ_code year), fe
margins, dydx(age tenure hours union)
This is less tractable when the number of FEs get large, and can obscure other problems with the model.