Announcement

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

  • attcic: new Stata command to implement the attrition corrections from Ghanem et al. (2024b) and comparator approaches

    Dear Statlisters,

    I'm pleased to announce the new package attcic. This command implements the attrition corrections we propose with Dalia Ghanem, Sarojini Hirshleifer, and Désiré Kédagni in the paper "Correcting Attrition Bias using Changes-in-Changes (J of Econometrics, 2024)." These corrections exploit baseline outcome data to recover the ATT-R, ATE-R, and ATE, and can be applied to randomized experiments as well as quasi-experimental difference-in-difference designs. In addition to these corrections, attcic also reports the results of comparator approaches such as the IPW corrections, Manski bounds, and Lee bounds. For more details, see the paper here.

    The program can be installed from SSC by typing the following in the Stata command window:

    Code:
    ssc install attcic, replace
    Once installed, you can read the help file with:

    Code:
    help attcic

    The help file provides several examples of how to use the command and the output table it generates. The earliest version of Stata required to run this routine is Stata 14, and you should have the commands esttab and leebounds installed.


    We hope you give it a try!

  • #2
    Dear Karen,

    Thank a lot for the attcic package that you shared.

    I have been trying to implement it but I face some challenges.
    Basically, I am running the following code (relying guidance provided in the stata help file ):

    attcic safe_home treat ID wave, rct(no) ytype(binary) yname(Safe while home)

    Where:
    safe_home: is one of the many outcome variables taking 1 if the individual feels safe while home and 0 otherwise.
    treat: is the treatment indicator (1 for treatment and 0 for control)
    ID : is the unique identifier for each respondent
    wave : is the survey wave indicator taking 1 for follow-up and 0 for baseline. At baseline, 600 respondents participated in the survey, evenly distributed across treatment and control. At follow-up, only 476 could participate, resulting in an attrition rate of 21%

    1. The assignment to the treatment was not random, so we are using the DID (not an RCT). However, when I run this command, I get the error message :

    "conformability error
    r(503);".

    2. However, when instead, I run the code

    attcic safe_home treat ID wave, rct(yes) ytype(binary) yname(Safe while home)

    where I assume that we are using an RCT, I don't get this error message. Rather, I get a different error message after the package has started to run telling me that the table the command is assumed to generate automatically (according to the stata help file) could not be opened:

    "file /directory\corrections_safe_home/correction_results.tab could not be opened
    r(603);"

    I have checked directory and permission issues as suggested on different platforms but this is not working.

    Would you please give me some hits ? Maybe I am missing something.


    Thanks a lot for your assistance and sorry for any inconvenience this message may pose.


    Best regards,

    Comment


    • #3
      Hi Elias,

      I appreciate your patience with my delayed response. I did not receive an email alert for the Statalist activity, and only came across your message recently.

      Thanks for raising the issue of matrix conformability when executing the command for DiD designs. It is fixed now, and you should be able to run the code once it is updated in the SSC archive ~ a week. If you need to run the analysis earlier, feel free to send me an email, and I can share the updated .ado file.

      Regarding the issue with the output file, I'm unsure what is causing it. Did you set the directory before executing the command? Also, do you encounter the same issue when running the example in the help file?

      In case it helps, the attcic program saves all the results in the path "`c(pwd)'\corrections_`y'/", where `y ' corresponds to the name of the outcome variable in the dataset.

      Comment

      Working...
      X