Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This code adds an offset option to
fepois
regressions so that the function can be used to model differences in outcome rates.weights
parameter infeols
regressions. So theoffset
argument takes a string that must refer to a column name in the data. If no argument is supplied, the _offset vector is set to 0. This required modifyingmodel_matrix_fixest
to take an optional offset argument.I tested the code manually on the included poisson test data, a separation example (01.csv), and data from a current research project. The output the matches the R implementation of fixest (at least to the decimal places visible in the output) in with and without FE.