fixest
fixest copied to clipboard
[Request] case.names
We are supposed to use obs to retrieve the cases used in estimation. See here, but the standard way would be to use case.names (see here).
Would it be possible to have an implementation of that function for fixest? See here for a proposal
This can be done more simply:
fixest_data(x, sample = "estimation")
Sorry, I didn't know about case.names! Well it feels like, since it's a stats method, it should be there (but what an unintuitive name!).
I looked into this @lrberge and case.names does two things:
- when y is an unnamed vector, it is equivalent to
obs(est). - when y is a named vector, it is equivalent to
names(y)[obs(est)]
I can PR if this if you would like? To match lm, it should really by as.character(obs(est)) but that seems silly to convert it to a character
Well: since fixest does not accept vectors, the second case is not to be considered methinks.
Thanks Kyle, that would be great!
Closed by https://github.com/lrberge/fixest/pull/560 if I'm not mistaken.