Announcement

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

  • Control variables in the rdrobust package 'option covs not allowed'

    Hello all,

    Currently busy writing my thesis. I am using an RD design to infer the effect of a certain treatment on economic performance of regions. Not all regions receive treatment in the same year, which i why i need to include time-effects (year as a control variable).
    However, when i write the code below i receive the following error time and time again:

    rdrobust gdpa eventtime, c(0) covs == year
    option covs not allowed


    gdpa is my dependent variable and eventtime my running variable (0=year of treatment).

    Can anyone help me out with this issue?

  • #2
    looking at the help file, it appears that your syntax should be:
    Code:
    rdrobust gdpa eventtime, c(0) covs(year)
    that is, put the covariates within the parens not after an equals sign

    Comment


    • #3
      Hi Rich,

      Thanks for you input; however, i've already tried this. I still get the same error...

      rdrobust gdpa eventtime, c(0) covs(year)
      option covs() not allowed
      r(198);

      Comment


      • #4
        The original version of the community contributed rdrobust command found in SJ package st0366 did not include the covs() option.

        The latest version of rdrobust is as follows.
        Code:
        . which rdrobust
        /Users/lisowskiw/Library/Application Support/Stata/ado/plus/r/rdrobust.ado
        *!version 8.4.1  2021-11-30
        If that's not what you have
        Code:
        ado uninstall rdrobust
        net install rdrobust, from(https://raw.githubusercontent.com/rdpackages/rdrobust/master/stata/)
        With this version installed and the example files also downloaded, I had the following successful test based on the example in the help file.
        Code:
        . use rdrobust_senate.dta
        
        . rdrobust vote margin, c(0) covs (population)
        
        Covariate-adjusted sharp RD estimates using local polynomial regression.
        
              Cutoff c = 0 | Left of c  Right of c            Number of obs =       1297
        -------------------+----------------------            BW type       =      mserd
             Number of obs |       595         702            Kernel        = Triangular
        Eff. Number of obs |       359         321            VCE method    =         NN
            Order est. (p) |         1           1
            Order bias (q) |         2           2
               BW est. (h) |    17.632      17.632
               BW bias (b) |    27.904      27.904
                 rho (h/b) |     0.632       0.632
        
        Outcome: vote. Running variable: margin.
        --------------------------------------------------------------------------------
                    Method |   Coef.    Std. Err.    z     P>|z|    [95% Conf. Interval]
        -------------------+------------------------------------------------------------
              Conventional |  7.4359     1.4637   5.0803   0.000    4.56718      10.3047
                    Robust |     -          -     4.3122   0.000     4.1072      10.9516
        --------------------------------------------------------------------------------
        Covariate-adjusted estimates. Additional covariates included: 1
        
        .

        Comment


        • #5
          Thanks for the reply. It worked like a charm, although i did have to replace my current files as well for some reason. So for future readers:
          ado uninstall rdrobust net install rdrobust, from(https://raw.githubusercontent.com/rd.../master/stata/) replace all

          Comment

          Working...
          X