Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hdfe #271

Open
friosavila opened this issue Jul 21, 2023 · 2 comments
Open

hdfe #271

friosavila opened this issue Jul 21, 2023 · 2 comments

Comments

@friosavila
Copy link

HI Sergio
As I was commenting to you at the StataConference, I was wondering if you could modify hdfe to avoid problems when using it with interactions and long variable names.
Specifically, say I do
hdfe y c.xxxxxxxxxxx#c.zzzzzzzzzzzz, abs(fe)
if the combined name c_xxxx_c_zzz is too long, it would create a problem. So perhaps, if a potential variable name is too long, it could create a generic name (_var#) with perhaps the variable combination as label.
Thank you
Fernando

@sergiocorreia
Copy link
Owner

Hi Fernando,

I tried the following approach and things worked well:

clear all
cls
set obs 20
gen x1_abcdefghijklmnopqrstuvwxyz = runiform()
gen x2_abcdefghijklmnopqrstuvwxyz = runiform()
gen y = rnormal()

set varabbrev on
reghdfe y c.x1##c.x2

exit

I noticed that you were using hdfe instead of reghdfe. The newer versions of reghdfe (v6+) supercede hdfe and offer better functionality, so maybe that's an alternative? (see help reghdfe_programming)

Best,
S

@friosavila
Copy link
Author

friosavila commented Aug 21, 2023 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants