Announcement

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

  • Using rdrobust with panel data, error 3301

    I am using a cleaned, balanced panel on retirement behaviour with Stata 16. One of the questions I'm attempting to address is the impact of retirement on self-reported health.
    I am using a regression discontinuity design, with -
    1. Outcome variable: selfhealth (Self reported health index)
    2. Running variable: z_age (Age in years - 66.5, retirement age)
    3. Treatment variable: retire (1 if the individual is not in the labour force)
    Here is an example of the data I have -


    Code:
    * Example generated by -dataex-. To install: ssc install dataex
    clear
    input long hhidpn byte(wave selfhealth) float(z_age retire)
    1010  1 4 -12.5 0
    1010  2 4 -10.5 0
    1010  3 .     . .
    1010  4 .     . .
    1010  5 .     . .
    1010  6 .     . .
    1010  7 .     . .
    1010  8 .     . .
    1010  9 .     . .
    1010 10 .     . .
    1010 11 .     . .
    1010 12 .     . .
    1010 13 .     . .
    2010  1 3  -9.5 1
    2010  2 3  -7.5 0
    2010  3 4  -4.5 1
    2010  4 5  -3.5 1
    2010  5 3  -1.5 1
    2010  6 .     . .
    2010  7 .     . .
    2010  8 .     . .
    2010  9 .     . .
    2010 10 .     . .
    2010 11 .     . .
    2010 12 .     . .
    2010 13 .     . .
    3010  1 4 -10.5 0
    3010  2 4  -8.5 0
    3010  3 3  -6.5 1
    3010  4 3  -4.5 1
    3010  5 4  -2.5 1
    3010  6 3   -.5 1
    3010  7 3   1.5 1
    3010  8 3   3.5 1
    3010  9 3   5.5 1
    3010 10 3   7.5 1
    3010 11 3   9.5 1
    3010 12 .     . .
    3010 13 .     . .
    3020  1 3 -12.5 1
    3020  2 3 -11.5 1
    3020  3 3  -9.5 1
    3020  4 3  -7.5 1
    3020  5 3  -5.5 1
    3020  6 3  -3.5 1
    3020  7 3  -1.5 1
    3020  8 3    .5 1
    3020  9 4   2.5 1
    3020 10 4   5.5 1
    3020 11 4   6.5 1
    end
    label values selfhealth SHLT
    label def SHLT 3 "3.good", modify
    label def SHLT 4 "4.fair", modify
    label def SHLT 5 "5.poor", modify
    The command I'm running is
    Code:
    rdrobust selfhealth z_age, fuzzy(retire) vce(cluster hhidpn)
    I get an error with the following output while using this-
    Code:
    . rdrobust selfhealth z_age, fuzzy(retire) vce(cluster hhidpn)
                     <istmt>:  3301  subscript invalid
    r(3301);
    Like a few previous posts on this error mentioned, I made sure to update Stata and the rdrobust package. However, I'm still running into this problem. I'd appreciate any help on this!
Working...
X