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

[BUG] The factor varlist feature is not working in some instance of reghdfe #268

Open
Lu-Yunzhi opened this issue Mar 11, 2023 · 0 comments
Assignees

Comments

@Lu-Yunzhi
Copy link

Bug report

Please complete the following information:

  • Stata version: 17.0
  • OS: Win 10

Behavior

  • Expected behavior: a clear and concise description of what you expected to happen.
    My sample period is from 2008 to 2016. When I set the base group (say, year = 2008) to the year variable, I expect that the group 2008 is treated as baseline and dropped from the possible collinearity problem (since the iteracted variable mX is time-invariant).

  • Actual behavior: what was the error. If possible, copy-paste output. For instance:

. reghdfe y ib2008.year##c.mX, absorb(cityid year)

the sample of year = 2016 is dropped

Steps to reproduce the problem

set obs 10
gen id = _n
expand 2016 - 2008 + 1
bys id: gen year = 2008 + _n - 1
gen X = rnormal()
gen y = X*0.5 + rnormal()
bys id (year): egen mX = mean(X)
reghdfe y ib2008.year#c.mX, absorb(id year)
@Lu-Yunzhi Lu-Yunzhi changed the title [BUG] [BUG] The factor varlist feature is not working in the concrete sample Mar 11, 2023
@Lu-Yunzhi Lu-Yunzhi changed the title [BUG] The factor varlist feature is not working in the concrete sample [BUG] The factor varlist feature is not working in some instance of reghdfe Mar 11, 2023
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