Announcement

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

  • S.O.S = CS-ARDL Model and Xtdcce2 command

    Hello everyone
    I have I question about using the xtdcce2 command in Stata for the CS-ARDL model.
    I can't get it to work, I've seen some videos on youtube but nothing. How to write it ?
    Ps : I get "unknown egen function tag() r(133)" message when I give the command.
    Ps2: here's the command I tried:

    xtdcce2 d. gpd, lr(L.d. gpd L.d. To d.To) lr_options(ardl) cr(d.gpd d.To) cr_lags(2) fullsample

    Where did I made a mistake?
    (To is 1 of the independents variables)
    Last edited by Ahmed Mahmoudi; 25 Mar 2023, 07:01.

  • #2
    Before you respond back, I beg you to read every word of this page. Nobody here can answer questions like this. Even when I look through the ado file, it's not obvious what the issue is, so please, read the FAQ to learn how to write a question.

    Comment


    • #3
      Thanks for the advise, i will do my best to rewrite the question.
      So im using xtdcce2 in Stata 14.0, im trying to use the CS-ARDL model to estimate the long and short run relationship in an cross-dependence panel data.
      My problem is when i use the command i always get the same error message (r(133) unknown egen function tag())
      The structure of the command im using is correct but i can't figure out how to adept it to my data.
      i hope this message will give you a clear idea, thanks again for the advice

      Comment


      • #4
        The FAQ clearly asks for a data example that is able to reproduce the error in question. You give a snippet of code, but how am I meant to diagnose what the real problem is without any data to work with? We need data. It would be a little bit like me giving you a recipe to cook without providing the ingredients or the context.

        Here at Statalist, we're (mostly) statisticians, not magicians. We can't help you if you don't provide a dataset for us to work with that actually reproduces the error you're describing. If you wanna see how to provide a data example, watch this.

        Comment


        • #5
          Thats was an informative video
          sure here's my data :

          My command :
          Code:
          xtdcce2 d.CE , lr(l.CE l.d.M3PIB l.CP l.CB) lr_options(ardl) cr(d.CE d.M3PIB CP CB) cr_lags(1) fullsample
          my data :
          Code:
          * Example generated by -dataex-. To install: ssc install dataex
          clear
          input byte code double(CE M3PIB CP CB)
          1  5814.748345555162  79.01030859163718 56.852711742772186 56.852711742772186
          1 5867.7736289954755  82.45363607006439  57.69549849049539  57.69549849049539
          1  6170.648766285818  92.15846803347053   70.6444058251291  70.59188198449965
          1  6397.593461665315  98.26049121841969  70.90782276796458   70.8434186517005
          1  6472.873886577234  98.97916516355582   72.8987930524364  72.80330603379835
          1  6756.229559695167  93.11304769041324  68.68787660435142  68.60233761731413
          1  7110.694938516235  93.77276823033294  71.74673615262195  71.67467453053278
          1  7466.694657716888  96.50301504326728    81.798055590861  81.76212889404054
          1  7693.764343538743   96.2539072499599  80.07701263580698  80.04581151764317
          1  8011.455172197023  97.49133399065065  85.35512077217112   85.2779028852421
          1  8324.783283379642  96.63982130429159  89.30543686042878  89.25809780593865
          1   8591.96715947096  98.56640795604915  98.84754495889536  98.79948911244425
          1  8861.140772076533  96.87283564311161 104.89417231725626 104.84863454272397
          1  9183.610911751675   99.3019993531034  96.72586475567665  96.68804267392088
          1  9509.934655453531 104.05348653466918 100.02073364942414  99.98183375127098
          1  9870.467237195544 106.73984906076583  93.50479377648496  93.47422904021313
          1 10249.916396108445  110.4093779265101  98.98370861501901  98.95365039567548
          1 10654.790472539793 110.96810826359042  75.31228317324751  75.28565195250626
          1 10959.336140921881 117.54810207679046  78.08275850495559  78.05644431485118
          1  9359.343737570822  156.8432901170539  91.87148533486233  91.84602778150473
          2  10914.72282819991  99.62923361189607 18.074827495404538 18.007105819089688
          2 10714.458555343328 104.83032767554417   20.3321859180096 20.267449769778125
          2 10198.431201767311 110.76866526224647   26.1538229173773 26.074314619683598
          2  9944.489457730786 104.24485792718417 25.310485519055298 25.231769894396756
          2 10789.959769820134  96.76787038073218 24.875597302461557  24.78831194334699
          2 11561.802710451217  89.83292974895548 22.764675770847234 22.764675770847234
          2 12701.698698305245  66.96642459673693  24.79587063239965  24.79587063239965
          2 12154.143993303085  64.89820533333334 27.876537681644255 27.876537681644255
          2 11972.721827684349 55.500995443469435 20.074788333044307 20.074788333044307
          2   12336.3664367185  62.15378502332336 24.446047249807776 24.446047249807776
          2 13663.866612433387  57.56051914491217  22.24555460477948  22.24555460477948
          2 13701.078327338306   51.1166612712169 21.449003584936765 21.449003584936765
          2 14259.811688796239 58.323575267046365 21.306542444222824 21.306542444222824
          2 14672.190919262699  66.85773754800395 24.350445036452413 24.350445036452413
          2 15157.530287486574  64.56728150433683 24.631831361391697 24.631831361391697
          2 15756.740130345117  68.75987107116407 25.804556025621277 25.804556025621277
          2 16267.201968885982  73.98639335244181 28.088438478947836 28.088438478947836
          2 16628.130425476218   75.1861266871093 29.640933046525973 29.640933046525973
          2   16992.0323979001  82.31817866379386  34.81219406198529  34.81219406198529
          2 15551.557797327518 113.24273184381146 44.513505920009564 44.513505920009564
          3 3188.2072707176726  56.84895320712457  8.014264514996405  7.977521679690133
          3  3321.638849444479  62.72422622709032 12.199792482858413  12.16527508676646
          3  3512.900199695449  62.81907597043307 11.222325382059092  11.19086045959491
          3 3612.7541643999134 59.265312528449535 10.997778966354682  10.97281801598506
          3 3774.0724914451403  53.82770752438183 11.929150538668424 11.847037787966757
          3  3783.314203825792 57.283939151944644 12.117097978007292   12.0970197383186
          3 3848.7795124979452  64.09366709944332 12.990103890149735  12.96875528045568
          3  3874.369338368776 62.985822270576605 12.795799502046235 12.776881877674374
          3  3866.297025479813   73.1608789388908 16.265805862556324  16.24510343233188
          3 3931.7213477104506    69.054716014945 15.208240989979457 15.190775056531407
          3 3969.6615770323524  68.06159619119401  13.71592241984142 13.698203534118445
          3 4025.6428030116886  67.95439819357642 14.025306680096508 14.008788776577742
          3  4057.766136822925  71.72973142614342 16.497891055809376 16.483875757849315
          3  4129.423902106026  79.30948122564122 18.351978063267598 18.327676761543916
          3  4197.421360551422  82.00065158576724 21.711733010136435 21.682020038660273
          3 4246.2435654223955  78.88436914221563  22.87580539766321 22.855656658296965
          3  4218.083701294793  79.32874846070148  24.40295773042177  24.38576998654802
          3 4188.2217574351735  81.57840925326197 24.901366480940908 24.884385707199062
          3  4153.004815940206  80.53576648006313  25.80649379076397  25.78989327561573
          3 3873.5100150744975  96.49803937857624 29.694907115380282 29.678935545908953
          4 2904.8647165566426  54.96507064644495   61.5110784214903  49.59691379494998
          4 2914.2899560375713  54.68426159601171 62.303344558861085  50.61047318638835
          4  3021.626688344537  53.27345343351181  60.74814548867504  49.51270985661461
          4  3179.350541544179 52.477254396168746  58.95078079740463  49.54991849324768
          4  3259.757201914659  54.11354483343603  58.29170547634401   49.9978164744095
          4  3399.543725936119 55.345748568797234  57.32979137253531 48.535973572763915
          4  3594.434901590652  57.57829772495061 57.841883504296646   47.9532263279688
          4 3711.6836933269196  58.86893817577234 59.884643914229684 48.456007888405225
          4 3787.7201060579314  62.58174266308038  62.24744364080086 49.927236039858755
          4 3860.6799449104506 62.047134742382006  65.88837818304974  52.20073232035066
          4 3734.5465051463766  66.37812198985787   72.8194980751972  57.88905399621977
          4  3842.612396437755  65.76384812417028  72.60676389432075 57.808900768814794
          4 3892.1328336003603  65.27411047761488   73.1104704085606 57.917233816180605
          4 3967.2418526937768  65.30295961834995  73.94690035291967  59.76783921920623
          4 3960.9753299284484  65.42101318909782  74.79176568057353 60.096593133554634
          4 3961.4260536091892  66.61258213332579  76.95089251513062  62.20916447034273
          4 4007.2035075799513  69.66591139234302  81.71259906971274  64.71590586044809
          4  4069.113524129741  67.37405799859275         82.9562754  63.48659473702997
          4 4090.4334019466755  68.68099159708969        84.51368941   59.2550839084243
          4 3703.2437436036093  77.87559098686822        79.12365192  67.67505349685365
          5  4831.662502529146  39.39922777564328  16.58616021069111   16.5122232652132
          5  5030.138975579194  45.24854223849372 19.280159024872155  19.19782078103208
          5  5171.411465795903 47.878314454550114  19.97736212429872  19.97736212429872
          5    5219.2835170646  46.88414206221668 21.935704704551025 21.843987858913145
          5  5359.884660874539  44.42583854938967  19.76342857292605 19.675058783806897
          5 5700.0768034510775  42.48135761643071 20.936231035362965 20.837717573283207
          5  5912.921536488974  49.78639172168875  23.46175582179702 23.365216013881568
          5  5982.511823596727  53.54753025336674 26.302258810867094  26.20210788450885
          5  5031.857331104775  53.47693638164765 29.356438624473117 29.246117053748165
          5  5428.159930064467  49.92271942463183 27.514927743841632  27.42248765614451
          5  5684.215237277427  43.32060565771164   27.8535285319926 27.784352768343055
          5  5566.542084163317  46.33608413354055 32.910460856068376  32.85101781097232
          5  6067.846154521167  44.54089632516048  33.19446227705283  33.15056905355361
          5  6291.244108808987 40.214522310754624  32.58369282140034  32.54792822795696
          5  5869.732942920431  48.84329303502655  35.99436797689342  35.95600321379096
          5  6166.085179327839 42.908854538683855 32.690644779712756  32.65455996913176
          5   6287.59798627756  43.48525883054675  33.95222130587535  33.91253856700235
          5  6418.571887308356 45.183520259669905 34.739663317142316 34.677853125152005
          5  6485.457267269323  47.20303239856147  36.00157351498389 35.923786343885936
          5  5810.948309907993 52.479510299433066  39.80898382757018  39.71439881437235
          end

          Thank you

          Comment


          • #6
            I think the problem is that for some reason the function "egen tag" is found. Can you update your Stata to Stata 14.2?

            Comment


            • #7
              Hello, I have adproblem with the command xtcce2. I try to run a panel data model and I get a following message:
              . xtdcce2 wzrost, lr(l.wzrost GDPpc ) lr options(ardl) cr(l.wzrost GDPpc) cr lags(0) fullsample
              option lr not allowed
              r(198);
              I tried with two or three balanced panels and always apperas the same error, other models, Mg, pmg, work ok.
              Thank you for the help.
              Best regards
              Luke

              Comment


              • #8
                The option should be "lr_options(ardl)", note the underscore "_".

                Comment

                Working...
                X