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 can check the assumption for survival analysis with Schoenfeld residual method in Complex survey designHello, My data is the national health survey with a complex survey design. I want to analyse the as…
Decomposing Wagstaff Concentration IndexDear All, I'm using Stata 16 and I'm trying to decompose my concentration index using the following…
Deleting entire Firm based on condition from panel data setHello Stata community, I have a panel dataset consisting of many firms over 20 years. Firms are iden…
multiple lines in one graph with if conditionshi statalist, I have the following data: Code: * Example generated by -dataex-. For more info, ty…
Reshaping Data and Variables for a Dynamic Panel Data AnalysisHi there, I am happy to be new in this forum and currently writing on a Panel Data Analysis for a co…
Subscribe to:
Post Comments (Atom)
0 Response to Reghdfe Definition of Singleton
Post a Comment