I am running a regression that requires a fixed effect variable, which we’ll call fe. When I manually remove the singleton observations, I am left with 22,000 observations.
Here is my code for filtering singletons:
gen fe_filter = 0
by fe, sort: egen tot = count(fe)
replace fe_filter = 1 if tot > 1
keep if fe_filter == 1
I then use areg:
areg y x1, absorb(fe)
and get an r squared of .88.
I then run reghdfe, again after manually dropping the singletons, again leaving n=22000. However it automatically drops another 12000 observations, leaving 10,000 observations and an r squared of .75.
Here is my code for reghfe
reghdfe y x1, absorb(fe)
Any idea why regdhfe might be dropping the extra 12000 observations?
Related Posts with Reghdfe Definition of Singleton
How to do a Propensity Score Matching and a Parallel Trend Test for a Staggered Difference in Difference DesignDear all, I am still learning Stata, currently using Stata 14.2. Thank you very much in advance fo…
Why non missing conflict?Hello, I'm saving a database in CSV format, then merging it again in. It generates a nonmissing conf…
How to create a balance plot after weighting manually?I created weights for a difference-in-difference model and want to compare the correlations of the c…
How to rename variable name with the variable label in a loopI created new variables based on the levels of a categorical variable using the -tab, gen- command a…
Dealing with duplicate time stamps in auction dataHello! I am working with a longitudinal panel dataset collected from an online auction. For each ob…
Subscribe to:
Post Comments (Atom)
0 Response to Reghdfe Definition of Singleton
Post a Comment