Announcement

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

  • Implementing Lee Bounds in STATA

    Hi everyone,

    I am using data from a randomized controlled trial to estimate lee bounds since I have differential attrition by treatment status. I am using the command leebounds which one can install via (ssc install leebounds). But I get an error saying that the selection indicator isn't specified correctly. Can someone please tell me what the issue is here?

    I use the following code below. The variable "att" is the attrition variable which takes the value of 1 if the person was attrited from baseline to midline. 0 Otherwise.

    . leebounds tot_pigincome_usd treat, select(att)
    selection indicator att incorrectly specified
    r(109);

    Code:
    * Example generated by -dataex-. For more info, type help dataex
    clear
    input double treat float(tot_pigincome_usd att)
    0  57.14286 0
    1       100 0
    0        50 0
    1 142.85715 0
    0 128.57143 0
    0         0 0
    0         0 0
    0         0 0
    1  85.71429 0
    1         . 1
    1         0 0
    1         0 0
    1         0 0
    0         . 1
    1         . 1
    1  57.14286 0
    0  185.7143 0
    1         0 0
    1         0 0
    1  71.42857 0
    1        50 0
    1  57.14286 0
    1  64.28571 0
    1         0 0
    1         0 0
    1         0 0
    1  57.14286 0
    1  84.28571 0
    1  71.42857 0
    1         0 0
    1         0 0
    1 114.28571 0
    0         0 0
    0  78.57143 0
    1        50 0
    1         0 0
    1         . 1
    1         0 0
    1  85.71429 0
    1  85.71429 0
    1  28.57143 0
    1 228.57143 0
    0       100 0
    1         0 0
    0        50 0
    0       100 0
    1       100 0
    1         0 0
    0  71.42857 0
    0         . 1
    1  78.57143 0
    1         0 0
    1         0 0
    1         0 0
    1         0 0
    1  92.85714 0
    0  57.14286 0
    1  78.57143 0
    1         0 0
    1         0 0
    1  85.71429 0
    0  71.42857 0
    0         0 0
    0  71.42857 0
    1  71.42857 0
    1 128.57143 0
    1         0 0
    1 128.57143 0
    1  78.57143 0
    0  71.42857 0
    0  57.14286 0
    0         0 0
    0         0 0
    0  57.14286 0
    0  85.71429 0
    0  57.14286 0
    0  42.85714 0
    0  57.14286 0
    0  71.42857 0
    0         0 0
    0         . 1
    0         0 0
    1       100 0
    0  42.85714 0
    1  57.14286 0
    0  71.42857 0
    0         . 1
    1  92.85714 0
    1         . 1
    1 142.85715 0
    0         0 0
    0  28.57143 0
    1  64.28571 0
    0  42.85714 0
    0  57.14286 0
    0         0 0
    0  71.42857 0
    0 114.28571 0
    0  78.57143 0
    0         0 0
    end
    label values treat treat
    label def treat 0 "Control", modify
    label def treat 1 "Treatment", modify
    label values att att
    label def att 0 "Retained", modify
    label def att 1 "Attrited", modify

    Danish

  • #2
    -leebounds- assumess "att = 0" for attritted units. Switching 0s and 1s of "att" will do.

    Comment


    • #3
      Fei Wang Thanks for the response. Just to make sure I got you correctly. You are saying I run the same command after recoding att i.e recode att (1=0) (0=1)?

      It does work but I'm just trying to understand the rationale behind it.

      Comment


      • #4
        danishussalam , yes. You may refer to the help file for the definition of the variable in -select()-. Actually, when attrited units have missing values in the dependent variable, as in your data, you may simply drop the -select()- option.

        Comment


        • #5
          I'll have a look. Thanks a bunch.

          Comment

          Working...
          X