Announcement

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

  • Please help: r(2000) while using xtheckmanfe

    Hello all. I am trying to use xtheckmanfe to run a two-stage fixed effect model. The following is data example: perf is the depenvar, intensity is the indepenvar, firmage and firmsize are controls, tag is selection variable, and z is exlusion restriction variable.
    I used the command:

    xtset id year
    xtheckmanfe perf intensity firmage firmsize, select (tag=z)

    But it returned r(2000). Please help. Many thanks.

    Code:
    * Example generated by -dataex-. To install: ssc install dataex
    clear
    input long id double(z perf tag) int year double(firmage intensity firmsize)
    2001 7   .22353 1 2010 140    .004739286445108797 22.540234070904507   .003097863332042473 2.6923076923076925
    2001 8  .175119 1 2011 152    .004593954002692953  22.69057593128697   .003097863332042473 2.6923076923076925
    2001 1  .113459 1 2012 164   .0038292788898201826 22.781876400587493   .003097863332042473 2.6923076923076925
    2001 1  .107635 1 2013 176   .0035822660988528185  22.86988397073096   .003097863332042473 2.6923076923076925
    2001 2  .091409 1 2014 188    .003665088659552693  22.93414828812555   .003097863332042473 2.6923076923076925
    2001 3  .041366 1 2015 200     .00315525097861933  22.99788978314982   .003097863332042473 2.6923076923076925
    2001 4   .11596 1 2016 212   .0029688866482026417 23.157789824666416   .003097863332042473 2.6923076923076925
    2001 1  .115824 1 2017 224    .002814913387075014 23.623742741506536   .003097863332042473 2.6923076923076925
    2001 1  .154467 1 2018 236      .0028333855016148 23.811344291581776   .003097863332042473 2.6923076923076925
    2001 2  .086309 1 2019 248   .0023334296706579638 24.073223351035534   .003097863332042473 2.6923076923076925
    2001 3  .119999 1 2020 260    .002154658414238238  24.15392518119496   .003097863332042473 2.6923076923076925
    2001 1   .13235 1 2021 272    .001906602622494966  24.26977970912199   .003097863332042473 2.6923076923076925
    2001 1   .09969 1 2022 284   .0016952219976217517   24.3678700794763   .003097863332042473 2.6923076923076925
    2002 2  .007957 1 2012 142  .00019493414028623558 19.523544486071227 .00009447533584775139                2.7
    2002 3  .054034 1 2013 154  .00003909230829257888  22.67608402296915 .00009447533584775139                2.7
    2002 4  .041308 1 2014 166 .000026681209449845455  23.00043258673139 .00009447533584775139                2.7
    2002 5  .050495 1 2015 178  .00021990354880569286  23.17697951043624 .00009447533584775139                2.7
    2002 1  .066164 1 2016 190   .0002529897500338219  23.26785420618319 .00009447533584775139                2.7
    2002 2  .074839 1 2017 202  .00011321137610640157 23.386154771389823 .00009447533584775139                2.7
    2002 1  .042974 1 2018 214  .00004014589212455361 23.372411139747214 .00009447533584775139                2.7
    2002 2  .040719 1 2019 226  .00002254868513257738 23.545099518289778 .00009447533584775139                2.7
    2002 3  .047258 1 2020 238  .00002473692242422315 23.608442262203813 .00009447533584775139                2.7
    2002 4  .047836 1 2021 250  .00001050952582158352  23.60669229696358 .00009447533584775139                2.7
    2003 7  .161231 1 2010 124    .001025631015144379  21.30872200766641  .0011032771524989362 2.6923076923076925
    2003 8  .097714 1 2011 136   .0010482305954570836  21.55954624350905  .0011032771524989362 2.6923076923076925
    2003 1  .073368 1 2012 148   .0011486169006467656 21.595315943853166  .0011032771524989362 2.6923076923076925
    2003 1  .094791 1 2013 160   .0011478282822851087  21.45208412669073  .0011032771524989362 2.6923076923076925
    2003 2  .111511 1 2014 172    .001218335939147718 21.479901269551256  .0011032771524989362 2.6923076923076925
    2003 3  .115981 1 2015 184   .0011691329356655238 21.490180695173976  .0011032771524989362 2.6923076923076925
    2003 4  .129878 1 2016 196   .0012573384547082092  21.70709484784466  .0011032771524989362 2.6923076923076925
    2003 1  .143264 1 2017 208   .0010646532716946972 21.832768360088508  .0011032771524989362 2.6923076923076925
    2003 1  .105354 1 2018 220   .0009692541160561837 21.877869432160747  .0011032771524989362 2.6923076923076925
    2003 2  .085232 1 2019 232   .0010953359674267605  21.96878554522258  .0011032771524989362 2.6923076923076925
    2003 3  .114911 1 2020 244   .0009954070407378484 21.947853918094143  .0011032771524989362 2.6923076923076925
    2003 1  .119696 1 2021 256   .0010576352978743807  22.11927187920727  .0011032771524989362 2.6923076923076925
    2003 1  .110554 1 2022 268   .0011452031656415118 22.286275894918457  .0011032771524989362 2.6923076923076925
    2004 2  .111193 1 2011 123    .002049977686877939 22.155821389843393  .0027333678629818154 3.1818181818181817
    2004 3  .073343 1 2012 135    .004792993669499417 22.501982205609615  .0027333678629818154 3.1818181818181817
    2004 4  .046719 1 2013 147    .004486248568608199 22.757662415039487  .0027333678629818154 3.1818181818181817
    2004 5   .04186 1 2014 159     .00407187735433832 23.330990824059253  .0027333678629818154 3.1818181818181817
    2004 6  .039474 1 2015 171   .0031136005316710793  23.70441211267252  .0027333678629818154 3.1818181818181817
    2004 7  .027843 1 2016 183     .00271983245786582  23.91077003145357  .0027333678629818154 3.1818181818181817
    2004 1  .022269 1 2017 195   .0024372652556582572 24.093661571591603  .0027333678629818154 3.1818181818181817
    2004 .  .029375 1 2018 207   .0020410980173573585 24.002352154630856                     .                  .
    2004 1  .034981 1 2019 219   .0017074401762895268 24.005544516349666  .0027333678629818154 3.1818181818181817
    2004 2  .032627 1 2020 231   .0015314043258273457 24.063513261096837  .0027333678629818154 3.1818181818181817
    2004 3  .031747 1 2021 243   .0015505938454831562  24.12594301485216  .0027333678629818154 3.1818181818181817
    2004 1  .037518 1 2022 255   .0016058126206809147 24.125276331287168  .0027333678629818154 3.1818181818181817
    2005 7  .052503 1 2010 175     .00445327856060331 22.343877196029425  .0025685031751696602 3.5384615384615383
    2005 8   .06509 1 2011 187   .0035941779265191045  22.63591203445971  .0025685031751696602 3.5384615384615383
    2005 1  .019917 1 2012 199   .0031172835468012993 22.942794667812784  .0025685031751696602 3.5384615384615383
    2005 2   .00046 1 2013 211   .0018922630158538728 23.113831907122027  .0025685031751696602 3.5384615384615383
    2005 3  .001121 1 2014 223   .0025814853018767047  23.28327993825183  .0025685031751696602 3.5384615384615383
    2005 4  .001072 1 2015 235    .002699131309903065  23.32086406659042  .0025685031751696602 3.5384615384615383
    2005 5  .002065 1 2016 247   .0024024794450891117  23.32815302804046  .0025685031751696602 3.5384615384615383
    2005 1 -.070297 1 2017 259   .0019234358432976058   23.3582888382418  .0025685031751696602 3.5384615384615383
    2005 2 -.332437 1 2018 271   .0017666881100935584 23.069064538471267  .0025685031751696602 3.5384615384615383
    2005 3  .039292 1 2019 283   .0019028157011707358 22.409495817856378  .0025685031751696602 3.5384615384615383
    2005 4  -.12734 1 2020 295   .0023207728814676276 22.125306562511753  .0025685031751696602 3.5384615384615383
    2005 5 -.142867 1 2021 307   .0025731298201124614 21.955829258918097  .0025685031751696602 3.5384615384615383
    2005 1 -.121755 1 2022 319   .0021635998144171236 21.708690896919126  .0025685031751696602 3.5384615384615383
    2006 7   .06338 1 2010 123   .0014765062183209263 21.262527673217843  .0004330990177076952 2.6923076923076925
    2006 8  .178597 1 2011 135   .0002179456395093362 21.714894360236475  .0004330990177076952 2.6923076923076925
    2006 1 -.082687 1 2012 147   .0009119323590580759  21.51634371589586  .0004330990177076952 2.6923076923076925
    2006 1 -.096136 1 2013 159   .0006181045305771001 21.423291327924062  .0004330990177076952 2.6923076923076925
    2006 2  .005224 1 2014 171   .0004244002340058177  21.23385943569268  .0004330990177076952 2.6923076923076925
    2006 3  .008681 1 2015 183    .000388774292211267  21.16902611842894  .0004330990177076952 2.6923076923076925
    2006 4   .03614 1 2016 195  .00016373158521888151 21.205112491359213  .0004330990177076952 2.6923076923076925
    2006 1  .055353 1 2017 207  .00040867342774908466  21.30114580474695  .0004330990177076952 2.6923076923076925
    2006 1   .00361 1 2018 219   .0002330153955053213 21.377122768696726  .0004330990177076952 2.6923076923076925
    2006 2  -.06729 1 2019 231  .00030283467857162243  21.26407819441705  .0004330990177076952 2.6923076923076925
    2006 3  .021294 1 2020 243  .00027227296938366844 21.451290266475755  .0004330990177076952 2.6923076923076925
    2006 1  .045153 1 2021 255 .000055663366781567695  21.64427918405766  .0004330990177076952 2.6923076923076925
    2006 1  .117257 1 2022 267    .000156432533307369  21.67398459535417  .0004330990177076952 2.6923076923076925
    2007 2        . 0 2010 225                      . 21.669443675595346                     .                  .
    2007 3        . 0 2011 237                      . 21.729374014081866                     .                  .
    2007 4        . 0 2012 249                      . 21.809359248874053                     .                  .
    2007 5        . 0 2013 261                      . 22.016160076040894                     .                  .
    2007 1        . 0 2014 273                      .   22.0502445905598                     .                  .
    2007 2        . 0 2015 285                      . 22.114919182260582                     .                  .
    2007 3        . 0 2016 297                      . 22.260232697331904                     .                  .
    2007 1        . 0 2017 309                      .   22.3756315030569                     .                  .
    2007 2        . 0 2018 321                      . 22.593998661520704                     .                  .
    2007 3        . 0 2019 333                      . 22.749200846664575                     .                  .
    2007 1        . 0 2020 345                      .  23.02970719814636                     .                  .
    2007 2        . 0 2021 357                      . 23.168845653109553                     .                  .
    2007 1        . 0 2022 369                      .  23.41389626881185                     .                  .
    2008 7  .091475 1 2010 111   .0008403897587430839 22.417272736732006  .0005405041571028868 3.5384615384615383
    2008 8    .1086 1 2011 123   .0006041968812674388 22.526167803479417  .0005405041571028868 3.5384615384615383
    2008 1  .100909 1 2012 135    .000621203963418724 22.600197777176152  .0005405041571028868 3.5384615384615383
    2008 2  .087155 1 2013 147    .000827585749751817 22.616035147504014  .0005405041571028868 3.5384615384615383
    2008 3  .103606 1 2014 159   .0006053853782988563 22.696810226773028  .0005405041571028868 3.5384615384615383
    2008 4  .101007 1 2015 171   .0005832592943138742  22.74909805754187  .0005405041571028868 3.5384615384615383
    2008 5  .084043 1 2016 183    .000601301643678302  23.06213240935597  .0005405041571028868 3.5384615384615383
    2008 1  .139811 1 2017 195  .00037293838539188503  23.36965130378285  .0005405041571028868 3.5384615384615383
    2008 2  .104401 1 2018 207   .0005287152870835403  23.66480677719805  .0005405041571028868 3.5384615384615383
    2008 3  .033432 1 2019 219  .00042902307210292286 23.607696390254542  .0005405041571028868 3.5384615384615383
    2008 4  .050639 1 2020 231   .0005035833669674399 23.784100044920116  .0005405041571028868 3.5384615384615383
    2008 5  .085734 1 2021 243  .00024911119788471534   24.0257678367282  .0005405041571028868 3.5384615384615383
    2008 1  .043382 1 2022 255   .0002598600634349288 24.186248827328463  .0005405041571028868 3.5384615384615383
    end

  • #2
    Do you encounter the same problem using the example in the helpfile?

    Comment


    • #3
      Originally posted by FernandoRios View Post
      Do you encounter the same problem using the example in the helpfile?
      I tried the web data wagework.dta, and both of the commands xtheckman and xtheckmanfe are fine.

      Comment


      • #4
        then it must be something specific to your data. The example you provide is not enough to look for errors in the program, or the syntax you may be using
        F

        Comment


        • #5
          Originally posted by FernandoRios View Post
          then it must be something specific to your data. The example you provide is not enough to look for errors in the program, or the syntax you may be using
          F
          I trie the data example and it returned r(2000). I have no idea what errors to look for? Could you kindly tell me what are the data requirements before I run xtheckmanfe?

          Comment

          Working...
          X