Announcement

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

  • regression discontinuity error no observations

    Hi,

    I ran the following code using the data (below). This is the first time that I have used dataex so please let me know if I didn't post correctly.

    rd grade treatment assignment

    and I received the follow error message: no observations.

    I would appreciate any suggestions to fix this problem. I think it has something to do with my outcome being ordinal and not continuous.

    Code:
    * Example generated by -dataex-. To install: ssc install dataex
    clear
    input float(id grade) long treatment float assignment
      1 3.7 0   10
      2   4 0   80
      3 2.7 1  -20
      4   2 0   20
      5   4 0  110
      6   4 0   30
      7 2.3 0  100
      8   4 0    .
      9 2.7 1  -30
     10   3 0   60
     11   4 0   60
     12   4 1  -20
     13   1 0  -90
     14   4 1    .
     15   4 0    .
     16   4 1  -20
     17   3 1  -50
     18   1 1 -150
     19   4 0  140
     20 1.7 1 -170
     21 3.3 0  170
     22   3 1  -20
     23   1 1  -60
     24   . 0   70
     25 3.3 0   90
     26 1.3 1  -60
     27   4 0  140
     28 3.3 1  -70
     29   4 1  -10
     30   2 1 -230
     31 3.7 0   10
     32 3.7 1 -140
     33 3.7 1  -10
     34 3.7 0   10
     35 2.7 0   20
     36   4 0   40
     37   4 0  160
     38   4 0   80
     39 3.3 0  120
     40   4 0   90
     41   3 1  -90
     42 1.3 1  -30
     43 1.3 1  -70
     44 3.7 1 -120
     45 2.3 0   40
     46   3 0  -50
     47   4 0   90
     48 3.7 0  -10
     49 1.7 0   80
     50 2.7 0  160
     51 2.7 1  -30
     52 3.7 0   20
     53   4 0  130
     54   4 0   10
     55   3 0   30
     56   4 0   30
     57 3.7 0   70
     58 3.3 0  -10
     59 3.7 0    0
     60 2.7 1  -10
     61 3.3 1  -20
     62 2.7 0    .
     63   3 1  -50
     64   4 0   20
     65   2 0  -20
     66 2.3 0   10
     67 1.7 1  -60
     68   4 0    .
     69   4 0  180
     70   4 0   10
     71 2.3 1 -110
     72   3 1  -80
     73 3.3 1  -30
     74 3.3 0  -40
     75   4 1  -80
     76   4 0    .
     77   3 1 -130
     78 1.3 1 -140
     79 1.7 0   20
     80   2 1  -60
     81 1.7 0   90
     82 1.7 1 -100
     83 3.7 0    .
     84   2 1 -100
     85   4 0   10
     86   2 0    0
     87   4 0    .
     88 2.7 0   70
     89 2.3 0   90
     90 3.7 1  -60
     91 3.7 1  -10
     92 3.3 1  -80
     93   2 1 -120
     94   . 0    0
     95   4 0  140
     96   4 0   70
     97 3.3 0    0
     98 3.7 0   90
     99 3.7 1  -90
    100 3.3 1 -100
    end
    label values treatment treatment
    label def treatment 0 "untreated", modify
    label def treatment 1 "treated", modify

  • #2
    Help!

    Apparently the rd command is not a part of the official Stata release. My usual tools for finding commands are not helping me here.

    Please review the Statalist FAQ linked to from the top of the page, noting especially the following advice.
    Code:
    12.1 What to say about your commands and your problem
    
    Say exactly what you typed and exactly what Stata typed (or did) in response. N.B. exactly!
    
    If you are using user-written commands, explain that and say where they came from: the Stata Journal, SSC, or other archives. This helps (often crucially) in explaining your precise problem, and it alerts readers to commands that may be interesting or useful to them.
    Added: OK, I found the command in SSC and installed it, and ran it on the data you provided. Here is what the command tells us in full.
    Code:
    . rd grade treatment assignment 
    Three variables specified; jump in treatment  
    at Z=0 will be estimated. Local Wald Estimate
    is the ratio of jump in outcome to jump in treatment.
    
     Assignment variable Z is assignment
     Treatment variable X_T is treatment
     Outcome variable y is grade
    
    no observations
    r(2000);
    So it appears the jump in treatment will be estimated at assignment=0. But in the data, all the treated observations have a value of assignment < 0. To me, this along with the error message suggests that your data do not meet the assumptions of the command.
    Last edited by William Lisowski; 09 May 2017, 12:11.

    Comment


    • #3
      I am using regression discontinuity to estimate treatment effects on outcome.

      ssc inst rd, replace
      net get rd

      Comment

      Working...
      X