Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Estimation of Counterfactual Distribution of the outcome using counterfactual command

    Hello everyone:

    I am working with survey data on wages and sociodemographic factors to evaluate the change in educational attainment on inequality measures on hourly wages and quantile estimates. For doing so, I ran the counterfactual command developed by Chernozhukov, Fernández-Val and Melly (2013). My problem is that I cannot find a way of observing the counterfactual distribution of hourly wages once the policy that I propose (and that only affects the covariates distribution) is evaluated. I obtained Quantile Treatment Effects which is one of my objectives but I cannot find a way to predict or measure inequality indexes over the counterfactual distribution. Does anyone have faced this same problem?

    Thenk you in advance.

  • #2
    Dear Omar,
    The estimated quantiles of the observed, estimated and counterfactual distributions are saved by the command in the matrix e(distributions). Then, you can convert this matrix into variables with svmat. And then you can calculate any statistic for the created variables. Here is an example:
    Code:
    *downlad the data:
    webuse nlsw88, clear
    *generate de dependent variable:
    gen lwage=log(wage)
    *use counterfactual. Note that I estimate 981 quantiles uniformly distributed between 0.01 and 0.99 (you should consider trimming more the distribution to avoid issues with the tails):
    quiet counterfactual lwage tenure ttl_exp grade, group(union) noboot ql(0.01) qh(0.99) qs(0.001)
    *extract the counterfactual quantiles and convert into a variable
    mat counterfactual=e(distributions)
    mat counterfactual=counterfactual[....,9]
    svmat counterfactual
    *calculate the Gini coefficient (and other measures) using the command inequal7 (you should first install this command):
    inequal7 counterfactual
    You should bootstrap the whole procedure (i.e. with the call of the counterfactual command) if you want to get s.e.
    Best regards,
    Blaise Melly

    Comment


    • #3
      Dear Blaise,

      I feel deeply thankful for your help and your patience answering this seemingly easy question (included in the stata help module, I ignored svmat command). I finally got my calculations. I take the opportunity to congratulate your for your advancements in this area of research, I found your paper amazing.

      Sincerely,

      Omar Ruiz

      Comment

      Working...
      X