Announcement

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

  • Trying to run regression discontinuity with rdrobust: getting an error. How to solve it?

    I have a dataset with electoral information from Brazilian municipalities. Two of the variables in the dataset are incumb_vs (i.e., incumbent's vote share, the dep. variable) and margin_victory_08_16 (i.e., margin of victory, the running variable). I'm trying to run a very simple RD model: rdrobust incumb_vs margin_victory_08_16. However, I'm getting the following error message: "c() should be set within the range of margin_victory_08_16". I don't know what the message means and I don't know how to overcome the error. Could someone help? Thanks.

    Code:
    * Example generated by -dataex-. To install: ssc install dataex
    clear
    input float(incumb_vs margin_victory_08_16)
     .4463837   .1072326
            .  .06513521
     .2757941   .4484118
     .7278874   .4694826
            .   .1651098
     .4189983   .1620034
     .3696054 .018803954
            1          1
            . .002683848
            .   .2456478
     .5187292  .03745845
            .  .15589768
            .   .5348935
            .  .19441482
      .647213  .29442596
            .  .09627774
    .56946826  .13893652
            .  .14316547
     .9585735   .9171469
            .  .13237998
            .   .1262584
     .3655428    .107598
     .4486495  .10270107
            .  .06396064
            .    .255861
    .52742016  .05484033
            .   .3577933
    .19271736  .09784493
    .05049327  .04607087
            .  .11850062
            .  .11329326
     .3453006  .14553154
            .   .5612041
      .626775  .25354996
            .   .4624514
     .6529631   .3475192
            .  .06402877
     .4378324  .11344722
            .  .20089284
            .  .04649273
            .  .02495596
            .   .2476136
     .0914439   .4831984
     .7541108   .5082216
            .  .03328356
     .4611361  .13532057
            . .017568856
     .4515343 .019608885
    .59505874   .4103114
            .  .05767663
    .21464506 .009585947
            .   .0386377
     .3341631 .070450604
     .4657904  .06841931
            .  .02782464
            .   .3176471
     .4657154  .06856918
            .    .304785
            .  .42265385
            . .016479075
            .  .04418364
            .  .28573948
            .  .03994054
            .  .11620066
     .5002291  .08930752
            .  .11472383
            .   .2721927
     .3734521  .16268027
     .3643772   .1526692
     .3518482  .03570038
            .    .449583
            .  .52526426
     .7604086  .52081716
            .  .22312585
    .38770685   .2245863
     .6590587   .3181174
            .  .01237905
            .   .3734111
     .3984553  .20308948
            .  .18501386
            .  .24438795
            .    .231325
    .12899198  .08105856
            .  .03966752
            .  .17668983
            .  .05595085
     .3665719  .26685628
            .   .3366337
            .  .12625697
            .   .3997429
            . .066535145
    .52088904  .04177809
            . .067629874
     .2427203   .1150383
    .24732536 .003225297
            . .013636038
     .7063679   .4127358
            .  .18246344
     .4816661 .036667824
    .16857342    .571562
    end

  • #2
    ?

    Comment


    • #3
      if this is the command used:
      Code:
      rdrobust incumb_vs margin_victory_08_16
      then it won't run because the default cutoff is 0 and that is not within the range of your data - you need a cutoff within the range of your data or there is no discontinuity so use the "c()" option; see
      Code:
      help rdrobust

      Comment

      Working...
      X