You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@dsliwka pointed me to this paper by Gillen et al on handling measurement error via IV: link. An ungated version of the paper can be found here.
To support the method via pyfixest, we would have to define a user-friendly API to run the following stacked instrumental variables regression
where $Y_a$ and $Y_b$ and $X_a$ and $X_b$ are two measurements of the same underlying construct.
One option would be to define an API as follows:
deforiv(*fmls, data, vcov=None, **options):
# process data to get data_stacked and fml_stacked# then call pf.feols() to support all post-estimation proceduresfit=pf.feols(fml=fml_stacked, data=data_stacled)
returnfit
For more than one covariate with error, we would have to support multiple endogenous variables via GMM estimation, for which we should of course use gmm =) In this case, a larger update of the Feiv class would be required:
The FixestFormula class would have to be reworked to support multiple endogenous variables
The Feiv.fit() method would have to be adjusted to support GMM estimation.
Overall likely not a massive amount of work to support multiple endogeneous variables (?)
The text was updated successfully, but these errors were encountered:
Hi @s3alfisc, thanks for taking this up! I tried a simple implementation using pyfixest just porting the Stata code from Gillen et al. (which also only covers the case where one variable is measured with error). This is illustrated in the following notebook: https://github.com/dsliwka/oriv/blob/main/ORIV.ipynb
by adjusting estimation.init and init, we make oriv available to uses by calling pf.oriv()
the notebook is very nice and it would be great to use it as a vignette. to do so, you'd have to simply move it to the docs folder and add it to the learn more section in _quarto.yml
last, it would be fantastic to have some basic unit tests against stata. you could use the ccv tests against stata as an example - basically, the stata output is hard coded in the script
Two nice to have's would be to update the github readme and the changelog.qmd. And of course I'm happy to help out with everything along the way! =)
@dsliwka pointed me to this paper by Gillen et al on handling measurement error via IV: link. An ungated version of the paper can be found here.
To support the method via
pyfixest
, we would have to define a user-friendly API to run the following stacked instrumental variables regressionwhere$Y_a$ and $Y_b$ and $X_a$ and $X_b$ are two measurements of the same underlying construct.
One option would be to define an API as follows:
For more than one covariate with error, we would have to support multiple endogenous variables via GMM estimation, for which we should of course use gmm =) In this case, a larger update of the Feiv class would be required:
Overall likely not a massive amount of work to support multiple endogeneous variables (?)
The text was updated successfully, but these errors were encountered: