ietoolkit icon indicating copy to clipboard operation
ietoolkit copied to clipboard

New command(s) for distributional impact analysis

Open MRuzzante opened this issue 4 years ago • 7 comments

Hi guys!

As distributional analysis is becoming more common in development economics and in policy evaluation in general (see, e.g., http://documents.worldbank.org/curated/en/292901499351272899/Distributional-impact-analysis-toolkit-and-illustrations-of-impacts-beyond-the-average-treatment-effect), I have been thinking about two packages, which may be helpful for IE folks (going beyond the current iegraph):

  1. The first is very easy and it would just be kernel densities by treatment assignment (with the option of adding descriptive statistics, such as average, median, and N, or regression estimates) on the lines of https://github.com/worldbank/Stata-IE-Visual-Library/blob/master/Library/Density%20plots/Density%20plot%20with%20averages)
  2. The second would plot quantile treatment effects (see https://github.com/worldbank/Stata-IE-Visual-Library/tree/develop/Library/Regression%20coefficients/Quantile%20treatment%20effect). There are some packages out there: qreg and sqreg, the Stata ones, do not include clustered standard errors option, while qreg2 (user-written) allows clustered standard errors but does not plot the estimates.

If you agree these may be of interest, I am happy to discuss with you and eventually help draft a version of these packages.

Cheers! Matteo

MRuzzante avatar Aug 27 '19 15:08 MRuzzante

Thanks for the suggestion, @MRuzzante! Here are some comments:

  1. I think this is straightforward to implement and useful. We should probably start with this one, unless @kbjarkefur, @bbdaniels or @roshni13khincha have objections.
  2. My reservation with this command is that we cannot user user-written commands inside user-written commands. Maybe the easiest solution to this problem would be to ask StataCorp to include clustered standard errors to the existing commands? Otherwise, we'd have to implement everything from the estimation to the plot. It's possible that some of this is done in DIA toolkit. If you think it's easiest to just use qreg2 and create a qreg2plot command, we can maybe try to get in touch with the authors to see if they'd like to add it to their package -- or just do it as your first SSC command! I'm happy to discuss and help you with it either way.

luizaandrade avatar Sep 02 '19 17:09 luizaandrade

Yeah I think a great option would be to get DIA-toolkit shaped up if it does the right kind of things you are talking about. I think Kris knows a lot about it. It is more complex coding though.

bbdaniels avatar Sep 03 '19 15:09 bbdaniels

The grqreg command plots coefficients of stata official quantile commands, such as qreg and sqreg. It think i had incorporated the support to qreg2. If not this can be easily done.

jpazvd avatar Sep 05 '19 10:09 jpazvd

Hi @jpazvd! Thanks for your input!

It seems that grqreg only works with SSC commands, suchs as qreg, bsqreg or sqreg. This means it currently does not allow to plot confidence intervals based on quantile regressions with clustered standard errors.

MRuzzante avatar Sep 05 '19 14:09 MRuzzante

But we can add this feature in this command. It prevents the unnecessary atomization of commands. It should be trivial. Best, JP

jpazvd avatar Sep 05 '19 14:09 jpazvd

That would be great, @jpazvd!

All the best, Matteo

MRuzzante avatar Sep 05 '19 14:09 MRuzzante

I know I'm late for the party, but just wanted to say I think that's great! I agree we should try to aggregate commands instead of atomizing them. @jpazvd, is there a repo for this command where we can follow the implementation for qreg2? I think @MRuzzante also started doing some work on it for his paper, so if there is a repo, he may be able to share some code or make a pull request.

luizaandrade avatar Sep 18 '19 15:09 luizaandrade