Announcement

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

  • Issue of variable numeric_date not found

    Dear all,
    I hope you all fine.
    I was trying to run the GMM appraoch. But, all of a sudden i got the following error message
    HTML Code:
    variable numeric_date not found
    Here is how my data looks like
    HTML Code:
    [CODE]
    * Example generated by -dataex-. To install: ssc install dataex
    clear
    input double code float year byte asr float(CS2010 fsize roa btm)
    1 2009  .            .         .      .      .
    1 2010  0    -.1812835  26.91781  .0086  .9739
    1 2011  0   -.09384886  26.91781  .0083  .9978
    1 2012  0    .01239697  26.91781  .0084  1.001
    1 2013  0    .04447984  26.91781  .0081 1.0042
    1 2014 -1    .08613512  26.91781  .0091  .9807
    1 2015  0    .05611029  26.91781  .0087  .9967
    1 2016 -1    .03977427  26.91781  .0077 1.0134
    1 2017  0  -.036704797  26.91781  .0071  .9981
    1 2018 -1    .03907964  26.91781  .0073 1.0237
    1 2019  0     .1366042  26.91781  .0072  .9984
    1 2020  0    -.1798956  26.91781  .0065  .9975
    1 2021  0 -.0091083525  26.91781  .0074 1.0156
    1 2022 -1  -.003396444  26.91781  .0086 1.0349
    2 2009  .            .         .      .      .
    2 2010  0   -.03545101 26.096867   .041  .8581
    2 2011  0   .009062899  26.41433  .0392  .9591
    2 2012  0    .04767007  26.66028  .0413  .9286
    2 2013  0    .04062706 26.895393  .0382 1.0323
    2 2014  0    .03774613  26.91781  .0379   .939
    2 2015 -1  .0026975295  26.91781  .0425  .8387
    2 2016 -2   .028906615  26.91781  .0341  .9354
    2 2017  0  -.027155485  26.91781  .0319  .8945
    2 2018 -1 .00048926205  26.91781  .0322  .9845
    2 2019  0  -.006578347  26.91781  .0319  .9558
    2 2020 -1   .029122064  26.91781  .0317 1.0074
    2 2021  0    .04630307  26.91781  .0196 1.0756
    2 2022  0   .007986886  26.91781  .0214 1.1012
    4 2010  .   -.20119205  19.13629  .1097   .173
    4 2011  .     .0814125  19.13629  .0468  .2665
    4 2012  .   .006461412  19.13629  .0405  .2639
    4 2013  .   -.02512043 19.305077  .0239  .2253
    4 2014  .    .16615257  19.63939  .0462  .2275
    4 2015  .  -.062913224 19.803654  .0172  .1122
    4 2016  .     .0314415  19.22589  .1775  .1122
    4 2017  .     .1792767 19.409643  .0219  .1383
    4 2018  .  -.020326355   19.6768 -.0615  .2342
    4 2019  .     .6610339  21.12505 -.0024  .7522
    4 2020  .     .6610339  21.17023  .0396  .6108
    4 2021  .     .0525138  20.82814 -.3875  .4171
    4 2022  .     .6610339  20.17056 -.3875  .4131
    5 2010  .   -.06242976   20.9807 -.0034  .3257
    5 2011  .    .17559874 20.954844  .0091      .
    5 2012  .    .11675888  21.00067  .0167  .3937
    5 2013  .      .163085  20.89609 -.0356  .4172
    5 2014  .    .09898437  21.03564  .0316  .3075
    5 2015  .   -.13642953 21.508997 -.0246  .2126
    5 2016  2    -.4694616  21.65039  .0463  .3354
    5 2017  .   -.08594805  21.79214  .0079  .5211
    5 2018  .   -.06314425 21.861555  .0502  .7342
    5 2019  .   -.10533735 21.832436  .0589  .6649
    5 2020  .    .12670042 21.620495 -.1575  .6448
    5 2021  .   .014900815 21.629255  .0564  .7207
    5 2022  .   .021094015  21.67962 -.0619  .7977
    6 2009  .            .         .      .      .
    6 2010  0  -.011798893 22.871336  .0579  .7622
    6 2011  2     .0309588 22.842165  .0522  .8794
    6 2012  0  -.027621893  22.95794  .0674  .7713
    6 2013  0   -.04230814  23.02266    .07  .8029
    6 2014  2    .11783935 23.187393  .0436  .6909
    6 2015  1  -.026385363 23.265144  .0345  .5368
    6 2016  1    .00509106 23.301237   .061  .6341
    6 2017  2   -.08107214  23.29892  .0624      .
    6 2018  .   -.08981244  23.32867  .0682  .9572
    6 2019  2  -.008570627  23.47981  .0535  .9958
    6 2020  .    .04945006  23.45989  .0585 1.0174
    6 2021  .   .005063325 23.884556  .0235 1.1009
    6 2022  .    .10843694 23.996593   .017  .9987
    7 2010  .    -.4633431 19.621914  .0653  .1708
    7 2011  .   -.05251282   19.7083  .0229  .2694
    7 2012  2   -.05656573  20.48714  .0056  .2447
    7 2013  0    .04938684 20.303974  .0286  .2236
    7 2014  .    .03727166  20.33896  -.049  .2022
    7 2015  .   .064063914 19.990055  .0276  .1122
    7 2016  .   -.05664808  20.05845  .1586  .1122
    7 2017  .  -.003435775  19.90835  .0018      .
    7 2018  .    -.4694616 20.115765 -.3602  .1904
    7 2019  .    -.3266199  20.09533  .0417  .1628
    7 2020  .    -.1670125 19.713747 -.3377  .1483
    7 2021  .   .015233782  19.88397  .0934  .1953
    7 2022  .    .09431347 19.685333 -.0179  .1328
    8 2010  .   -.05516718  19.13629  .0114  .1122
    8 2011  .   .027453694  19.13629  -.007  .1495
    8 2012  2  .0001571772  20.23523  .0637  .5376
    8 2013  .    .04195993  20.25586  .0363  .3732
    8 2014  0    .03497356 20.328783  .0115  .1853
    8 2015  2   -.36459255  22.00124  .0529  .3463
    8 2016  0   -.02718297 22.826504  .0648  .4348
    8 2017  0    .05695187  23.09148  .0833  .4616
    8 2018  2    .10180917  23.07143  .0327  .7643
    8 2019  1   .024855325  23.21188   .038   .835
    8 2020  1    .28303105  23.27492 -.0695  .9714
    8 2021  .    .08162877 23.239305 -.1114  .8182
    8 2022  .    .05576044 23.143463 -.0753  .8584
    9 2009  .            .         .      .      .
    9 2010  0  -.033617415  23.02831  .0441  .4115
    9 2011  1   .005548148  23.19015  .0323  .6052
    9 2012  .    .04145785  23.30131  .0233  .7307
    9 2013  2   .001680309 23.334204  .0326  .6691
    9 2014  2   .020074897 23.412846  .0321  .5147
    end
    [/CODE]
    Please what do you think the problem is?

    I run the OLS model normal using the same variables

    I need help

  • #2
    There is no numeric_date variable in your data example. But what did you type as a command, exactly?

    Comment


    • #3

      Originally posted by Nick Cox View Post
      There is no numeric_date variable in your data example. But what did you type as a command, exactly?

      Here is my command
      HTML Code:
      xtabond2 asr l.asr CS2010 Bsize  BINDP meeting execOwner size ROAA btm loss SOE Debt big4 MSE1, gmm(asr CS2010 Bsize  BINDP meeting execOwner size ROAA btm loss SOE Debt big4 MSE1 , lag(0 2)) iv(l.asr CS2010 Bsize  BINDP meeting execOwner size ROAA btm loss SOE Debt big4 MSE1, eq(level)) twostep
      there is alos the year and indusrty variables as well

      Comment


      • #4
        Originally posted by Nick Cox View Post
        There is no numeric_date variable in your data example. But what did you type as a command, exactly?
        Also, please how i create such a variable, although I have it with name of "year"

        Comment


        • #5
          xtabond2 is from SSC. Are you saying that it insists on a variable called numeric_date being used?

          Perhaps you previously xtset your dataset in terms of a variable called numeric_date. If so, it seems that you should re-issue xtset with the names of appropriate variables.

          Comment


          • #6
            Originally posted by Nick Cox View Post
            xtabond2 is from SSC. Are you saying that it insists on a variable called numeric_date being used?

            Perhaps you previously xtset your dataset in terms of a variable called numeric_date. If so, it seems that you should re-issue xtset with the names of appropriate variables.
            I have run the xtset code i got the same error
            HTML Code:
            .  xtset
            variable numeric_date not found
            So, how to re-issue xtset with the names of appropriate variables, please

            Comment


            • #7
              Code:
              help xtset
              gives examples. In your case perhaps you need

              Code:
              xtset code year

              Comment


              • #8
                Originally posted by Nick Cox View Post
                Code:
                help xtset
                gives examples. In your case perhaps you need

                Code:
                xtset code year
                thank you very much
                it is solved now

                Comment

                Working...
                X