(Stata13): Panel ARDL Estimations (Steps 5 to 7)

แชร์
ฝัง
  • เผยแพร่เมื่อ 22 ก.ย. 2024
  • This video tutorial covers steps 5 to 7. (5) Using the unrestricted model and an information criterion, decide the choice of lags for each unit/group per variable, then choose the most common lag for each variable to represent the lags for the model; (6) Perform Pedroni (1999, 2004) or Westerlund (2007) Cointegration tests. But, on the assumption of long-run homogeneity, this step can be skipped. Cointegration is ascertained from the statistical significance of the long-run coefficients. Essentially, cointegration (or more generally a long-run relationship) presents itself as the joint significance of the levels equation; and (7) Test the null hypothesis of homogeneity through a Hausman-type test, based on the comparison between the Mean Group (MG) and the Pooled Mean Group (PMG) estimators. Decision: Reject the null hypothesis if the prob-value is less than 0.05. Using Stata13, this video shows you how to estimate a panel ARDL model. The link to the Stata dofile is on my website. Endeavour to have a Google account for easy accessibility.
    Follow up with soft-notes and updates from CrunchEconometrix:
    Website: cruncheconomet...
    Blog: cruncheconomet...
    Forum: cruncheconometr...
    Facebook: / cruncheconometrix
    TH-cam Custom URL: / cruncheconometrix
    Stata Videos Playlist: • (Stata13):Estimate and...
    EViews Videos Playlist: • (EViews10):Interpret V...

ความคิดเห็น • 508

  • @CrunchEconometrix
    @CrunchEconometrix  6 ปีที่แล้ว +8

    TH-cam recently changed the way my content will be monetised. My channel now needs 1,000 subscribers. So it would be amazing if you show your support by both watching my videos and subscribing to my channel if you haven’t done so already. Monetising my videos allows me to invest back into the channel with some new equipment so this small gesture from you will be extremely huge for me. Many thanks for your support….CrunchEconometrix loves to teach, support my Channel with your subscription and sharing my videos with your cohorts.

    • @ashnagangoo6728
      @ashnagangoo6728 6 ปีที่แล้ว

      Dear Mme, regarding the optimal lag, for one of my variables, for 4 countries, it is 0 and for the remaining 4 countries, it is 1.. Which lag should i choose in this case please?

    • @stonioheugi2482
      @stonioheugi2482 5 ปีที่แล้ว

      How can we test the breusch_godfrey test in panel?

    • @CrunchEconometrix
      @CrunchEconometrix  5 ปีที่แล้ว

      @@ashnagangoo6728 Hi Ashma, please follow my guide and explanation in choosing the optimal lags. May I know from where (location) you are reaching me?

    • @CrunchEconometrix
      @CrunchEconometrix  5 ปีที่แล้ว +1

      @@stonioheugi2482 For panel ARDL, you test for each country using estat bgodfrey. Kindly watch my time series ARDL videos for more on diagnostic tests. Thanks....may I know from where (location) you are reaching me?

    • @omduttdixit3433
      @omduttdixit3433 5 ปีที่แล้ว

      how can i apply the code when i am dealing with data of only one country?

  • @moviesanddramakorea
    @moviesanddramakorea ปีที่แล้ว +1

    I came here after your reply to my comment on the other video and all I can say is that God would continue to keep and uphold you Prof. You are a blessing. I wish I had seen this video before telling my professor that I would prefer to work on Synthetic control methods rather than ARDL.

    • @CrunchEconometrix
      @CrunchEconometrix  ปีที่แล้ว

      Thanks, Kezia for your encouraging feedback...deeply appreciated and 🥰🙏

  • @jimmykamande2416
    @jimmykamande2416 4 ปีที่แล้ว +2

    Thanks Prof.
    From your tutorial my understanding of Econometrics has become so much easy.
    Keep doing what you are doing. God bless.

    • @CrunchEconometrix
      @CrunchEconometrix  4 ปีที่แล้ว

      Thanks, Jimmy for the encouraging feedback. Deeply appreciated! Please may I know from where (location) you are reaching me?

  • @mimio008
    @mimio008 4 ปีที่แล้ว +2

    Professor, your method is brilliant. I admire you so much and thank you for your effort and generosity. Wish you the best.

    • @CrunchEconometrix
      @CrunchEconometrix  4 ปีที่แล้ว

      You are very welcome, Mimi!...glad to hear the positive feedback. Thanks.

  • @manuellatonga3762
    @manuellatonga3762 2 ปีที่แล้ว +2

    thank you very much for these videos Prof, a real gold mine

  • @selen7009
    @selen7009 2 ปีที่แล้ว +1

    Thank you so much professor! I greatly benefit from your videos. I wanted to chip in with coding. I use bys country: ardl x y z, bic instead of forval i. If it stops running due to an error for a specific country, then bys country, rc0: ardl will work non-stop.

    • @CrunchEconometrix
      @CrunchEconometrix  2 ปีที่แล้ว +1

      Thanks for this, Selen!

    • @moviesanddramakorea
      @moviesanddramakorea ปีที่แล้ว +1

      Hello selen, please can you explain succintly. This code and the one professor talked about is not working for me

  • @haddaderadra2310
    @haddaderadra2310 4 ปีที่แล้ว +1

    thank you for your video, je vous remercie beaucoup Madame , vous m'avez aidez

    • @CrunchEconometrix
      @CrunchEconometrix  4 ปีที่แล้ว

      U're welcome, Hadda. Please may I know from where (location) you are reaching me?

    • @haddaderadra2310
      @haddaderadra2310 4 ปีที่แล้ว +1

      @@CrunchEconometrix thanks, i follow you from Algeria

  • @unbeliveable1000
    @unbeliveable1000 4 ปีที่แล้ว

    Dear Prof. Ngozy, thank you for your video series on Panel ARDL. It really helps getting the thesis started. However, I have two questions:
    1. Why do you log some Variables now and not pre unitroot testing and what is the reasoning behind it?
    2. Why do you add all variables in differences (in Step 7), although some are stationary in levels (and the ardl is able to deal with I(0) and I(1) variables.
    Thank you very much and I hope you stay healthy in the difficult times.

    • @CrunchEconometrix
      @CrunchEconometrix  4 ปีที่แล้ว

      Taking logs is discretionary. I also performed URT to be sure none is I(2). Using the difference operator is the way the syntax is written.

  • @ECHTisaconcept
    @ECHTisaconcept 5 ปีที่แล้ว +2

    Another great video! They are all very helpful. Just a question, if my dependent variable results in having to have 1 lag how would I write this in my model? Would I put: Y^-1_it = X_it + error

    • @CrunchEconometrix
      @CrunchEconometrix  5 ปีที่แล้ว +1

      That's why I included refs at the end of the video for guidance. Check them for model specifications.

  • @TheHoney2honey
    @TheHoney2honey 3 ปีที่แล้ว +1

    excellent video. Can you guide that you have identified the optimal lags but did not use anywhere throughout these vides on Panel ARDL?

    • @CrunchEconometrix
      @CrunchEconometrix  3 ปีที่แล้ว +1

      I used it in the lr(). Watch the video again. Thanks.

  • @pragatidixit269
    @pragatidixit269 6 หลายเดือนก่อน +2

    Dear Prof. Ngozi, I am facing problem in determining the optimal lag length. I am working on a dataset of 10 countries for the time period 1997- 2021. I have typed the command as:
    forval i=1/10{
    ardl lnprop lnLP lnlife lnGDP lnHI if (c_id== 'i'), maxlag(2 2 2 2 2)
    matrix list e (lags)
    di
    }
    But Stata is showing 'i' as invalid name. Could you please help me on this?

    • @CrunchEconometrix
      @CrunchEconometrix  6 หลายเดือนก่อน

      Pragati, the reason is because you didn't create IDs for the countries.

  • @sabrososh
    @sabrososh 4 ปีที่แล้ว +1

    Hello CruchEconometrix. Thank you so much for your videos. They are a generous and outstanding contribution! Please, can you help with the following question about the Hausman test? When I run the Hausman test between PMG and MG, the Prob>chi2 = 0.0483, which means that MG specification is preferred over PMG. When I run DFE versus MG, the Prob>chi2 = 0.9994, meaning that DFE is preferred over MG. But, when I run the Hausman test between PMG and DFE, the Prob>chi2 = 0.9924, so PMG will be preferred over DFE. This situation is strange because MG is better than PMG, PMG is better than DFE, and DFE is better than MG. It’s like I am going in circles. What specification should I choose for my ARDL model? Thank you very much in advance.

    • @CrunchEconometrix
      @CrunchEconometrix  4 ปีที่แล้ว +1

      Hi, Sabrososh, the 3 techs have different underlying assumptions. You must know which one you want to use to avoid engaging these tests which can be confusing.

    • @sabrososh
      @sabrososh 4 ปีที่แล้ว

      @@CrunchEconometrix Thank you very much :-)

  • @rochnaarora7478
    @rochnaarora7478 4 ปีที่แล้ว

    Great Work Professor!!!!!! Keep that going.. I admire that a lot. I have a query to ask: while u carried out unit root testing and ran your ARDL model you picked up the variables in their available format but when you are running the PMG , MG DFE models you have changed the specification of the variables into logarithmic form. Isn't it inconsistent. Please clarify whether this can be done or not... Waiting to hear from you soon.

    • @CrunchEconometrix
      @CrunchEconometrix  4 ปีที่แล้ว +1

      Hi Rochna, I did unit root test on the log transformation of the variables before using them. Perhaps, I didn't show that. Thanks.

  • @navjotkaur1124
    @navjotkaur1124 2 ปีที่แล้ว +2

    Respected Professor, while trying to run the command for optimal lag length, the software is showing problem with 'i'. My cross-sections are 205 and I have given the label to companies as "id". So i am typing the command as : forval i = 1/205 { ardl s r iio if (id== 'i'), max lag (2 2 2 2)

    • @CrunchEconometrix
      @CrunchEconometrix  2 ปีที่แล้ว

      Hi Navjot, did you watch the introductory video on panel ARDL? Please do if you have not to know that panel ARDL works best with N

  • @EdwardAtiase
    @EdwardAtiase 10 หลายเดือนก่อน +1

    Dear Prof, thank you very much for making econometrics practical to me. However, in performing the Hausman (1978) test, I am unable to run the command, it keeps saying ECT is in the list of predictors. I will be glad if you could shed some light on this please. Thank you.

    • @EdwardAtiase
      @EdwardAtiase 10 หลายเดือนก่อน

      I am using STATA 15 please.

    • @EdwardAtiase
      @EdwardAtiase 10 หลายเดือนก่อน

      . xtpmg d.gdpg d.sttuds d.mcdfgdp d.stocgdp d.rq d.tradegdp d.fdigdp, lr(l.gdpg sttuds mcdfgdp stocgdp rq tradeg
      > dp fdigdp) ec(ECT) replace mg
      invalid new variable name;
      variable name ECT is in the list of predictors
      r(110);
      This what i get from STATA please

    • @CrunchEconometrix
      @CrunchEconometrix  10 หลายเดือนก่อน

      I have not experienced such when I used the command, though it's a long time ago. The error could be due to several Stata updates. I suggest you post this to Statalist.org to get constructive feedback from other Stata users.

  • @willemvandermee1643
    @willemvandermee1643 ปีที่แล้ว +1

    Hello! Thank you for the very instructive video - I am wondering how do I write the Stata code for the first difference?

    • @CrunchEconometrix
      @CrunchEconometrix  ปีที่แล้ว

      Hi Willem, this video details how to estimate panel ARDL. Shows what needs to be done.

  • @lilsamurai6363
    @lilsamurai6363 4 ปีที่แล้ว +2

    Hi professor. Can ARDL bounds test for cointegration be applied to panel data?
    And also, can ARDL be used if the dependent variable is I(0)?
    Many thanks!!

    • @CrunchEconometrix
      @CrunchEconometrix  4 ปีที่แล้ว

      Hi Nayaz, Bounds test is only applicable to time series ARDL and the literature is not clear as to whether the depvar should be I(0) or I(1) but the populist agree that it should be I(1).

    • @lilsamurai6363
      @lilsamurai6363 4 ปีที่แล้ว +1

      @@CrunchEconometrix thank you very much Professor :D

  • @nehajainjain8254
    @nehajainjain8254 2 ปีที่แล้ว +2

    your videos are really helpful. I am facing an error could you please clarify it. while using the command for MG panel ARDL (N=20 and T=30), in stata it is showing an error "invalid new variable name;
    variable name ECT is in the list of predictors" and while determining the optimum lag length, I am using this command
    forval i = 1/10 {
    2. ardl Lgdppc Ltrade if(c_id=='i'), maxlag(1 1 1 1)
    3. Matrix list e(lags)
    4. di
    5. }
    but it is showing c_id not found and 'i' is not correctly specified.

    • @CrunchEconometrix
      @CrunchEconometrix  2 ปีที่แล้ว

      Hi Neha, c_id is the country identifier. Please watch my videos on "Building a panel data" and "Reshape wide to long" on how to create ids. Thanks

  • @traorefirdawsgaladima4063
    @traorefirdawsgaladima4063 2 ปีที่แล้ว +2

    Hi Professor. I am Traore from Togo. I wanted to thank you for the effort provided in these videos. They help me enormously now. But I have difficulties actually. For instance when using forval i = 1/45{
    ardl lpibh conc lhc louv ltc lide if(id==`i'),maxlag(2 2 1 1 0 0)
    matrix list e(lags)
    di
    } the estimations stop after some results and this error message is displayed "no observation"
    I have this kind of message "expression (-_b[conc]/_b[L.lpibh]) evaluates to missing" while using XTPMG,(...), REPLACE MG
    And this kind of message "Initial values not feasible" While using XTPMG,(...), REPLACE PMG.
    Please I need help. I don't know how to deal with it. Thank you

    • @CrunchEconometrix
      @CrunchEconometrix  2 ปีที่แล้ว

      Hi Traore, I can see that you have 45 cross-sections. Panel ARDL works best when the cross -sections are considerably less than the time dimension. I suggest you reduce the cross-sections and re-estimate the model. Thanks

  • @juliusakor8617
    @juliusakor8617 หลายเดือนก่อน +1

    Prof, please what if I am doing for one country and 53 companies in that country what’s the function is it forval 1/53? Or 1/1?

    • @CrunchEconometrix
      @CrunchEconometrix  หลายเดือนก่อน

      One country equates to TIME SERIES analysis. So, watch my Time Series for guides.

  • @meezdin86
    @meezdin86 4 ปีที่แล้ว

    Dear Dr. Ngozy, first of all, thank you sincerely for this extended efforts of uploading such intuitive and easy to follow tutorials. I have a question that is not entirely related to this video (related to step 6 which is cointegration). Suppose that I have a panel data (unbalanced) and I am using a fixed-effects model, I have one dependent variable and 7 regressors, 3 of these regressors are found to be Non-stationary at level but stationary at the first difference I(1), so my question is: do I have first to run a cointegration test (say by the stata command xtcointtest or xtdolshm) for these non-stationary variables? and if there is cointegration, how shall I proceed from there? shall I presume with my regression using the stationary variables I(1) (which is obtained by the first difference or by the use of log) along with the other I(0) variables in my regression? Or what exactly to do? I thank you sincerely for your patience and hope that my question is clear, because after the cointegration test, I am lost, I don't know how to proceed with my main analysis (the regression!!)

    • @CrunchEconometrix
      @CrunchEconometrix  4 ปีที่แล้ว

      Thanks Mazen, this your query is too long. Shorten it for a prompt response.

  • @same174
    @same174 5 ปีที่แล้ว +1

    Hi again Ngozi,
    I have read the references you provided carefully. I have learned that N could be small or large for PMG. Since it's considered fixed in the procedure. However, T must be large enough for asymptotic purposes. What exactly large enough means here and how could I determine it? I have 7 countries for a period of 1994q1-2012q4. So in my paper I need to justify the sample size of T is large enough. I got reasonable results but probably I will be asked for large enough T.
    Thanks for your kind help as always.

    • @CrunchEconometrix
      @CrunchEconometrix  5 ปีที่แล้ว +1

      Have at least 30 years observations.

    • @tshegangchipeya1714
      @tshegangchipeya1714 5 ปีที่แล้ว

      @@CrunchEconometrix Thank you very much Prof for this answer. My data is 18 years (8 countries) and I keep getting error message saying the model fitted on these
      data fails to meet the asymptotic assumptions of the Hausman test.. I assume it is because my data is too small.

    • @CrunchEconometrix
      @CrunchEconometrix  5 ปีที่แล้ว +1

      @@tshegangchipeya1714 Most likely. You can either increase the time span to 30years or transform the yearly data to quarterly. Refer to other online resources on how to do this. Thanks.

    • @tshegangchipeya1714
      @tshegangchipeya1714 5 ปีที่แล้ว +1

      @@CrunchEconometrix Thank you Mam. After reading up, I have decided to do pooled OLS or FMOLS to avoid small sample bias. Thank you again, we appreciate your care!

  • @aniksaha9925
    @aniksaha9925 2 ปีที่แล้ว +2

    What would happen jf hausman DFE pmg, sigmmore generates negative "chi2(3) =0.9792" value?
    Which model should I take then?

    • @CrunchEconometrix
      @CrunchEconometrix  2 ปีที่แล้ว

      Hi Anik, I explained the decision criteria. You may want to watch the clip again. Thanks

  • @meenakshigautam9457
    @meenakshigautam9457 6 หลายเดือนก่อน +1

    hi prof when i calculated mg it was fine but when i calculated pmg it is giving many itirations and data not concave result
    what should i do please help mam

    • @CrunchEconometrix
      @CrunchEconometrix  6 หลายเดือนก่อน

      Meenakshi, MG and PMG have different iterations. So, don't expect the same outcome.

  • @samiaansari6896
    @samiaansari6896 2 ปีที่แล้ว +1

    Thank you so much Professor!
    I have a question..Can I perform Pooled Mean Group (PMG) panel ARDL test including a structural break dummy variable? If yes, then how can I interpret the dummy coefficient in the result?. Kindly provide an answer for the same, I shall be grateful to you. Your help is highly appreciated.

    • @CrunchEconometrix
      @CrunchEconometrix  2 ปีที่แล้ว

      Hi Samia, I haven't done any panel ARDL analysis with dummy variables. You may want to check out other online resources. However, watch my videos on DUMMY VARIABLES for interpretations of results.

    • @samiaansari6896
      @samiaansari6896 2 ปีที่แล้ว +1

      @@CrunchEconometrix Thank you for your response!!

  • @abwayman
    @abwayman 2 ปีที่แล้ว +1

    Hello Dr
    If we were to do Hausman test between DFE and PMG, which way should it be written 1) or 2) below?
    1) hausman pmg DFE, sigmamore OR
    2) hausman DFE pmg, sigmamore
    Thanks!

    • @CrunchEconometrix
      @CrunchEconometrix  2 ปีที่แล้ว +1

      Ahmad, anyway is correct. That's what I do

  • @mimiemohamad
    @mimiemohamad 3 ปีที่แล้ว +2

    Hi Dr, if my probability of Housman test is -12.05, and there are a sentence of "chi2 model fitted on these data fails to meet the asymptotic assumptions of the Hausman test; see suest for a generalized test"
    What does it mean? Thank you so much for your feedback

    • @CrunchEconometrix
      @CrunchEconometrix  3 ปีที่แล้ว

      Hi Mimie, what code did you use?

    • @mimiemohamad
      @mimiemohamad 3 ปีที่แล้ว

      @@CrunchEconometrix I follow your code, but probably I mistakenly put it as 'hausman pmg mg, sigmamore'. Could it be due to this error?

    • @CrunchEconometrix
      @CrunchEconometrix  3 ปีที่แล้ว

      Use 'hausman mg pmg, sigmamore'

    • @mimiemohamad
      @mimiemohamad 3 ปีที่แล้ว +1

      @@CrunchEconometrix thank you! 😊

  • @fairafna
    @fairafna 3 ปีที่แล้ว +1

    Hi Dr, I hope you are in a good health.
    I have a question that I hope to receive your feedback on.
    From my Hausman test between PMG and MG, it shows PMG is preferred. Do I need to run a second Hausman test on PMG and DFE to ascertain which estimator is preferred?
    I did both tests, and on the second Hausman test, I got DFE is preferred. Is my understanding of the DFE estimator is correct -- it means the coefficient cointegrating vector (long-run) are the same for all countries? Same goes to the speed of adjustment coeff and short coeff - they the same across countries?

    • @CrunchEconometrix
      @CrunchEconometrix  3 ปีที่แล้ว

      Hi Faizal, kindly go through the videos for the underlying differences across MG, PMG, and DFE and once you know the one to deploy (given the Hausman test), you can proceed with your analyses. Thanks.

    • @CrunchEconometrix
      @CrunchEconometrix  3 ปีที่แล้ว

      Hi Faizal, kindly go through the videos for the underlying differences across MG, PMG, and DFE and once you know the one to deploy (given the Hausman test), you can proceed with your analyses. Thanks.

    • @TheDominock
      @TheDominock 3 ปีที่แล้ว

      Hello CrunchEconometrix and MA Faizal, may I ask you a question if you had been getting any errors while working with the following codes?:
      xtpmg d.lgdppercap d.fdi d.ms d.dinv d.crprvt d.hdi, lr(l.lgdppercap fdi ms dinv crprvt hdi) ec(ECT) replace mg
      xtpmg d.lgdppercap d.fdi d.ms d.dinv d.crprvt d.hdi, lr(l.lgdppercap fdi ms dinv crprvt hdi) ec(ECT) replace pmg
      Some of the possible errors I get are:
      1)invalid new variable name;
      variable name ECT is in the list of predictors 2) If I remove "ec(ECT) replace (mg or pmg)" I enter an infinite loop with the following output: "Iteration 0: log likelihood = 355.3414 (not concave) Iteration 1: log likelihood = 377.10051 (not concave)..." Any suggestions? Thank you

  • @Mllerourou91
    @Mllerourou91 ปีที่แล้ว +1

    Thank you, Prof, for these videos. while using the command for Hausman test p (N=6 and T=32), in stata it is showing this error,
    xtpmg d.mur d.lngdp d.lninf d.lnintr d.lntradopen, lr(l.mur lngdp lninf lnintr lntradope
    > n) ec(ECT) replace mg
    expression (-_b[lngdp]/_b[L.mur]) evaluates to missing
    r(498);
    What could be the problem?
    Thank you

    • @CrunchEconometrix
      @CrunchEconometrix  ปีที่แล้ว

      I have not experienced such an error message. I suggest you post this on Statalist.org for more constructive feedback from other Stata users.

  • @motazabd-alkareem6286
    @motazabd-alkareem6286 ปีที่แล้ว +1

    amazing explanation, many thanks to you
    I have 2 questions please:
    first, if the result of Hausman test is "fails to meet the asymptotic
    assumptions of the Hausman test" because of negative sign of chi2, then can I write pmg before mg (namely "hausman pmg mg, sigmamore") to avoid that problem?
    second, is it ok to use pedroni test and pmg method when some variables are I(0) and others are I(1)?
    thanks

    • @CrunchEconometrix
      @CrunchEconometrix  ปีที่แล้ว +1

      Hi Motaz, thanks for the encouraging feedback. Yes, flip around the Hausman test syntax.

    • @motazabd-alkareem6286
      @motazabd-alkareem6286 ปีที่แล้ว +1

      @@CrunchEconometrix thank you so much

  • @mehmetakyol4332
    @mehmetakyol4332 3 ปีที่แล้ว +1

    Dear professor,
    I have a trouble about cointegration test. In my panel data variables depvar is I(1) and indep var is I(0). Can I use Westerlund cointegration test before performing pmg and mg? In some articles it implies that in that kind of stiation durbin hausman cointegration or bound test (f test) have to use to determine cointegraiton. I am really confused. Could you please kindly response . Thank you very much

    • @CrunchEconometrix
      @CrunchEconometrix  3 ปีที่แล้ว

      Hi Mehmet, I have responded to you on this on a different thread.

  • @solomonbola2493
    @solomonbola2493 ปีที่แล้ว +1

    hello ma, do you mean that the rule of thumb for determining cointegration in Pedroni(2004) is that the absolute term should be greater than 2 since Stata does not present the p-value?...thank you ma

  • @remilee8639
    @remilee8639 4 ปีที่แล้ว +1

    Hi ,Pro.Thank your videos .I am facing an ARDL error :forval i = 1/39{
    ardl lco2 leu lgdp ltr if (id==`i'), maxlag(3 3 3 3)
    matrix list e(lags)
    di
    }
    however , the result shows that "sample may not include multiple panels".Waiting for your early reply .Thank in advance .
    Best wishes

    • @CrunchEconometrix
      @CrunchEconometrix  4 ปีที่แล้ว

      Hi Remi, your code indicates that you have 39 countries. Am I correct? If yes, how many years?

  • @dhanu3367
    @dhanu3367 11 หลายเดือนก่อน +1

    Hello Professor, I have a query regarding optimal lag selection. I used the code you gave and i am getting only one result. But i have 20 countries in my data. Should i run the code 20 times by changing the 'i' with the country name each time? Or running the code just once should give us the results for all countries? Please help😭😭

    • @CrunchEconometrix
      @CrunchEconometrix  11 หลายเดือนก่อน

      Divya, you have too many countries. Panel ARDL works efficiently when you have N

  • @ronakparikh6536
    @ronakparikh6536 ปีที่แล้ว +1

    Hello, thank you very much for this! I have one question: if in Step 6, I find there is no cointegration, what does this mean? Should I go forward and do steps 7 and 8?

    • @CrunchEconometrix
      @CrunchEconometrix  ปีที่แล้ว

      Ronak, if that's the case then perform only the underlying analysis and diagnostics.

  • @aniksaha9925
    @aniksaha9925 2 ปีที่แล้ว +1

    xtpmg d.nplratio d.roa d.crar d.loan_to_asstes_ratio, lr(l. nplratio roa crar loan_to_assets_ratio) pmg replace
    This pmg sometimes gives hessian become unstable or asymmetric [iterations stretched up to 28], sometimes gives data.
    What to do?

    • @CrunchEconometrix
      @CrunchEconometrix  2 ปีที่แล้ว

      Hi Anik, I have not encountered this so may not be able to guide you properly. I suggest you post it on Statalist.org for more constructive feedback. Thanks

  • @badiahahmed2085
    @badiahahmed2085 4 ปีที่แล้ว +1

    Thank you for these great videos, I have a question please, Why did not you add a log to gdpgr variable?

    • @CrunchEconometrix
      @CrunchEconometrix  4 ปีที่แล้ว +1

      Thanks Badia, for the positive feedback. Deeply appreciated! I didn't use the log of GDPGR cos it's in growth rate (which is the log difference of GDP).

    • @badiahahmed2085
      @badiahahmed2085 4 ปีที่แล้ว

      @@CrunchEconometrix Thank you for your response, another question please, my study like your example, finance-growth nexus, the dependent variable is real GDP per capita and independent variables are financial index, inflation, trade, government expenditure and investment. I follow your example where I have added a log to all independent variables but I have not added the log to real GDP per capita. Is that OK for my study? Thank you

    • @CrunchEconometrix
      @CrunchEconometrix  4 ปีที่แล้ว

      You can use the log of per capita GDP. Please may I know from where (location) you are reaching me reaching me?

  • @HibaWorld
    @HibaWorld 4 ปีที่แล้ว +2

    Dear Dr. I am a PhD student from UK. Thank you very much for creating this amazing platform for learning and discussion for our statistical issues. I have a panel with 28 countries and 168 monthly time periods. I am following your panel ardl. However, I am having trouble at step 5 when I am trying to use the long code for choosing the most common lags. Stata gives me the error that invalid 'i'. My data is already in the long format and I have used xtset to tell Stata about the panel data presence. Could you kindly help me with this. Thank you.

    • @CrunchEconometrix
      @CrunchEconometrix  4 ปีที่แล้ว

      Hi Nadia, thanks for the encouraging feedback. Deeply appreciated! The country identifier is "i". Is that the way your data is coded?

    • @HibaWorld
      @HibaWorld 4 ปีที่แล้ว +1

      @@CrunchEconometrix Thank you very much Prof. I have 28 EU countries data for 168 months(14 years), yes my data has country identifiers code and my data is in long format. When I run the next code xtpmg .....then in the oupput it mentions panel variable
      Panel variablei= CountryID
      Panel variable t= mydate
      I used xtset CountryID mydate to set panels.
      Here Country ID is 1,...,28, 1= Austria so on.
      I wrote my code for lag variables follows:
      forval i=1/28 {
      ardl (lnfatalacc lnpetrolpp lnGDP lnunemployment lntotVMT) if(CountryID == ‘i’), maxlag (2,2,2,2,2)
      matrix list e(lags)
      di
      }
      only unemployment is non-stationary and stationary after first difference.
      I tried going ahead without specifying lags but Hausman test does'not provide any good indication and asking me to go for guest. I tried random lags and Hausman gave better results. I know this is a long question. Many Thanks

    • @HibaWorld
      @HibaWorld 4 ปีที่แล้ว +3

      Dear Prof,. I found one of your reply on STATA forum and copied your code it worked. Thank you. You are awesome.
      www.statalist.org/forums/forum/general-stata-discussion/general/1355211-ardl-panel-model-in-stata
      forval i = 1/10{
      ardl aa dollar if (country_code==`i'), maxlag(3 3)
      matrix list e(lags)
      di
      }
      Just one issue that Hausman test between mg and pmg non-significant and between pmg and Dfe significant. so does this mean I should pick DFE?

    • @CrunchEconometrix
      @CrunchEconometrix  4 ปีที่แล้ว +1

      Glad to hear you resolved this, Nadia!💕👏🏽

    • @HibaWorld
      @HibaWorld 4 ปีที่แล้ว +1

      Thank you.

  • @emilienneyameogo3525
    @emilienneyameogo3525 4 ปีที่แล้ว +1

    Hello madam, Thank you for your precious and great videos that help us a lot. I have a dumb question, please but I need to understand something. Does applying Panel ARDL means that you have to choose between pmg, mg or dfe? Do the results (either pmg, mg, of dfe) represents the results of Panel ARDL? I am confused.
    Also, for the Lag selection, do I have to define "i" before applying the code because it is not working for me.
    Thank you in advance.

    • @CrunchEconometrix
      @CrunchEconometrix  4 ปีที่แล้ว +1

      Hi Emillenne, PMG, MG, and DFE have different but overlapping assumptions. Read some of the papers indicated at the end of the video...and yes, "i" must be defined for the syntax to work.

    • @emilienneyameogo3525
      @emilienneyameogo3525 4 ปีที่แล้ว +1

      @@CrunchEconometrix Okay prof I see now. Thank you.

    • @duamalik9311
      @duamalik9311 3 ปีที่แล้ว +1

      Hi great video ,help me a lot but I have a question how I define i ? Please explain it.i really need it to know .

  • @vandanaarya431
    @vandanaarya431 2 ปีที่แล้ว +2

    Dear mam, my name is Vandana, research scholar at GJU, Hisar, Haryana, India. please provide me the codes provided by ANet Tchetchik to calculate optimal lag length. I shall be thankful to you for this

    • @vandanaarya431
      @vandanaarya431 2 ปีที่แล้ว

      Further, I am following your panel ardl procedure. However, I am having trouble at step 5 when I am trying to use the long code for choosing the most common lags. Stata gives me the error that invalid name 'i'. My data is already in the long format and I have used xtset to tell Stata about the panel data presence. Could you kindly help me with this. Thank you.

    • @CrunchEconometrix
      @CrunchEconometrix  2 ปีที่แล้ว

      Vandana, "i" is the country identifier I generated. You need to do the same.

    • @CrunchEconometrix
      @CrunchEconometrix  2 ปีที่แล้ว

      Vandana, the code is clearly shown in the video.

    • @vandanaarya431
      @vandanaarya431 2 ปีที่แล้ว

      @@CrunchEconometrix Thank you so much mam for your kind reply. I got the code and it worked now....Thank you so much mam. Your are wonderful mentor. Please also provide codes and videos for panel NARDL, if possible. Thank you again mam

    • @CrunchEconometrix
      @CrunchEconometrix  2 ปีที่แล้ว

      No videos on NARDL, at the moment.

  • @vanessacandido6419
    @vanessacandido6419 4 ปีที่แล้ว +1

    Hi Prof, I am currently working on ARDL in stata and your videos are helping me a lot. I am trying to determine the causality between electricity consumption and economic growth. I have transformed my data into natural logarithms and optimal lag for EC and GVA are 1 and 0, respectively. Both are stationary at first difference. I've tried running the code as shown in your video but encountered a problem in stata:
    xtpmg d.logEC d.logGVA , lr(l.logEC logGVA) ec(ECT) replace mg
    xtpmg d.logEC d.logGVA, lr(l.logEC logGVA) ec(ECT) replace pmg
    hausman mg pmg, sigmamore
    Stata error says: invalid new variable name;
    variable name ect is in the list of predictors
    How can I reconcile it? Hope you can help me with this. Thank you very much

    • @CrunchEconometrix
      @CrunchEconometrix  4 ปีที่แล้ว

      Hi Vanessa, please follow my guide to performing the Hausman test as shown in the video. Thanks.

    • @istabraqal-riyami4939
      @istabraqal-riyami4939 3 ปีที่แล้ว

      Hi Vanessa, I'm having the same problem. How did you fix it?

  • @TheDominock
    @TheDominock 3 ปีที่แล้ว +1

    Hello, I am working with long panel T=30,N=20 and Hausman test indicates that MG is the preferred one over MG, but the results given by MG are very insignificant and hopeless to interpret, the only good thing is that ECT is -0.11 signifiant at 1%, but no long run or short run coefficients are significant, while the results for PMG show long-run coefficients to be significant even at 1%, having ECT also significant at 1% too. While using MG I get results against the existing literature, should I still stick to MG in your opinion, madame? Thank you...

    • @CrunchEconometrix
      @CrunchEconometrix  3 ปีที่แล้ว

      Use both results with justifications.

    • @TheDominock
      @TheDominock 3 ปีที่แล้ว

      @@CrunchEconometrix Thank you very much!

  • @bakytzhanzhaparov1846
    @bakytzhanzhaparov1846 2 ปีที่แล้ว +1

    Hi, professor. If my common optimal lag model is (2 1 1 1) then I run the following command for xtpmg for y=dep var, and a, b, c are indep var:
    xtpmg d.y d.a d.b d.c, lr(l2.y l.a l.b l.c) ec(ECT) replace pmg full
    is it correct? Or I have to write in long run part the following: lr(l.y l2.y a l.a b l.b c l.c)
    Can you answer me?

    • @CrunchEconometrix
      @CrunchEconometrix  2 ปีที่แล้ว +2

      Hi Bakytzhan, I'm familiar with the 1,0,0,0 lag formation which I used in my videos. You may want to check out other online resources about your proposed lag structure.

    • @БакытжанЖапаров-г2р
      @БакытжанЖапаров-г2р 2 ปีที่แล้ว +1

      @@CrunchEconometrix Thanks for your soon reply. Can I just do it for 1,0,0,0 and write that I do not want to lose too many degrees of freedom in my dissertation?

    • @CrunchEconometrix
      @CrunchEconometrix  2 ปีที่แล้ว +1

      That's exactly what I do of I happen to use the approach.

    • @bakytzhanzhaparov1846
      @bakytzhanzhaparov1846 2 ปีที่แล้ว +1

      @@CrunchEconometrix thanks, I see, your videos are guiding me through my dissertation journey. Thanks, cheers from Kazakhstan 🇰🇿

    • @CrunchEconometrix
      @CrunchEconometrix  2 ปีที่แล้ว

      Good to hear, Bakytzhan ☺️

  • @KeziaSpeaksHerMind
    @KeziaSpeaksHerMind ปีที่แล้ว +1

    Thank you ma.. I tried runnig the hausman test however, the pmg part gave me a very long itireation. How can I shorten this?

    • @CrunchEconometrix
      @CrunchEconometrix  ปีที่แล้ว

      To the best of my knowledge, you have no control over the iteration process. But you can check out other online resources for more information about this. Thanks

  • @sabreenkhan3498
    @sabreenkhan3498 2 ปีที่แล้ว +2

    C-id =='i' what is that i

    • @CrunchEconometrix
      @CrunchEconometrix  2 ปีที่แล้ว

      Sabreen, "i" is the country identifier. Watch "Basics to Panel Data" for more understanding. Thanks.

  • @gabrieltemesgen2877
    @gabrieltemesgen2877 3 ปีที่แล้ว +1

    Hi, for optimal lag selection, I run this command following your video. I found "sample may not include multiple panels". what is the mistake? Thank you for your help
    forval i= 1/18 {
    ardl tby fd gdpgr lreer fd2, maxlags (2 2 2 2 2)
    matrix list e(lags)
    di
    }
    sample may not include multiple panels
    r(459);

    • @CrunchEconometrix
      @CrunchEconometrix  3 ปีที่แล้ว

      Hi Gabriel, click on the Stata error code for guide to correcting the problem. Thanks.

  • @soosuklee98
    @soosuklee98 2 ปีที่แล้ว +1

    Hello Professor, thank you for this detailed video. I have a question regarding on selecting the optimal lag for the panel ARDL model. I have 20 countries in my analysis. When I conduct Step 5. as shown, it shows that 10 countries show for lag 0 while 10 countries show for lag 1 for a particular variable. If this is the case which lag should I select?

    • @CrunchEconometrix
      @CrunchEconometrix  2 ปีที่แล้ว +1

      Hi Soo, if it is the dependent variable you should take lag 1...if otherwise, you can take either lag 0 or 1

    • @soosuklee98
      @soosuklee98 2 ปีที่แล้ว +1

      @@CrunchEconometrix Hello Professor, thank you for your help!

  • @ruruk5138
    @ruruk5138 4 ปีที่แล้ว

    dear prof, i am confused about the lags we must put them in the short run or long run or in both?
    i read that they are usually put in the short run part?

  • @kandavidndri5938
    @kandavidndri5938 5 ปีที่แล้ว +1

    Hi Prof, thank you for your nice video. I am running a panel ardl regression using gdp per capita and remittances for 12 ECOWAS countries spanning from 1990 to 2015. I reached the step whereby I have to determine between MG or PMG estimator. After running the command, here is what I get:
    Iteration 0: log likelihood = 569.81216
    could not calculate numerical derivatives
    flat or discontinuous region encountered
    Could you explain this? and How can I fix that issue?
    Thanks very much

    • @CrunchEconometrix
      @CrunchEconometrix  5 ปีที่แล้ว

      Hi Kan, this is strange. Never encountered such. You can post your query on an econometric platform for more probable solution.

  • @hakanuslu2773
    @hakanuslu2773 4 ปีที่แล้ว

    Hi Professor: could you explain why do you use original variables for the tests and then use logarithmic transformation of the variables in the pmg model? do you think we have to use logarithmic transformation of the variables in the diagnostics or other tests? many thanks for the videos and the channel

    • @CrunchEconometrix
      @CrunchEconometrix  4 ปีที่แล้ว +1

      Hi Dr. Hakan, thanks for the encouraging feedback. Deeply appreciated! Taking log is at the discretion of the researcher. Even at that, it is advisable to take diagnostics using the forms of the variables used in the regression.

  • @habtamuademasu6329
    @habtamuademasu6329 4 ปีที่แล้ว +1

    I a from Ethiopia but l am not understand about ARDL Model

    • @CrunchEconometrix
      @CrunchEconometrix  4 ปีที่แล้ว

      Hi Habtamu, my videos are very easy to understand. Find the time to watch them and read publications too.

  • @mosh71
    @mosh71 3 ปีที่แล้ว +1

    Stata show me a message saying "unrecognized command: ardl r(199); when I tried to run the following based on what I saw at 2:09
    forval i = 1/10{
    ardl y x1 x2 x3 x4 x5 x6 x7 if (c_id=='i'), maxlag(1 1 1 1 1 1 1)
    matrix list e(lags)
    di
    } Pls help me. What should I do? Thank you professor and others here

    • @CrunchEconometrix
      @CrunchEconometrix  3 ปีที่แล้ว +1

      Hi Mo, you did not install the "ardl" syntax. Type "help ardl" in the COMMAND WINDOW and follow the prompts.

  • @AnhNguyen-th2ud
    @AnhNguyen-th2ud 5 ปีที่แล้ว

    Hi. Thanks a lot for your useful tutorial. I am following your instructions in step 5 but got some problems now. Here is my syntax and results:
    . forval i = 1/9 {
    2. ardl FDIinf FDIstk GDPgrwth Freedom if (id == `i'), maxlag (1 1 1 1 )
    3. matrix list e(lags)
    4. di
    5. }
    note: FDIstk omitted because of collinearity
    note: L.FDIstk omitted because of collinearity
    note: GDPgrwth omitted because of collinearity
    note: L.GDPgrwth omitted because of collinearity
    note: Freedom omitted because of collinearity
    note: L.Freedom omitted because of collinearity
    Collinear variables detected.
    I am sure that there is no strong correlation among these variables, thus I do not know why Stata gives me this results. Its great if you can tell me what the problem is and how to overcome it. Thanks!

    • @CrunchEconometrix
      @CrunchEconometrix  5 ปีที่แล้ว

      Hi Anh, from Stata's error message, there's collinearity between the regressors and their lags. Re-estimate with (1 0 0 0) structure and observe the outcome.

    • @tiranou
      @tiranou 4 ปีที่แล้ว

      May I know how you deal with this? Thank you!

    • @CrunchEconometrix
      @CrunchEconometrix  4 ปีที่แล้ว

      Lag only the depvar and re-estimate.

  • @s.nhabinde7345
    @s.nhabinde7345 4 ปีที่แล้ว +1

    Dear Prof. Ngozy, Thank you again for your precious videos and teach. I have one more difficulty. I'm trying to get the optimal lags according to the step 5 procedure using stata 14. But the output that come out are these:
    forval i= 1/11 {
    2. ardl txgdpcp index inv cph man abe if(c_id== `i'), maxlag(1 1 1 1 1 1) aic matrix list e(lags)
    3. di
    4. }
    variable lags not found
    (error in option exog())
    r(111);
    can you help me, pls?

    Kind Regards

    • @CrunchEconometrix
      @CrunchEconometrix  4 ปีที่แล้ว

      You can purchase my dofile and modify accordingly. Link is cruncheconometrix.com.ng/shop/

  • @iqbalmarri3192
    @iqbalmarri3192 4 ปีที่แล้ว +1

    madam thank you very much. i have a question please; we do not ardl model work if we inser more control variables. if the number of explanatiry variables increase from 4 to 5 ardl stops working. i have check a couple of paper, in every paper there are 3 to 4 independent (explanatory or control variables). i thought there is some problem with my data but i changed data set, yet i have the same problem. thank

    • @CrunchEconometrix
      @CrunchEconometrix  4 ปีที่แล้ว

      Use few variables otherwise the model breaks down.

    • @iqbalmarri3192
      @iqbalmarri3192 4 ปีที่แล้ว +1

      @@CrunchEconometrix thank you very much madam.

    • @CrunchEconometrix
      @CrunchEconometrix  4 ปีที่แล้ว

      @@iqbalmarri3192 U're very welcome. I will appreciate if you share my videos with your friends and colleagues. May God bless you as you do, amen!

  • @alicehuong8715
    @alicehuong8715 3 ปีที่แล้ว +1

    Is there any other options for choosing the optimal lag for panel ardl?

  • @yayadeomehamadjodalefe269
    @yayadeomehamadjodalefe269 5 ปีที่แล้ว

    is it mandatory to do a test which will enable you choose between DFE and PMG? if for instance DFE shows to be preferred through the Hausman test, can you proceed with PMG? and perhaps use the DFE to campare results?

    • @CrunchEconometrix
      @CrunchEconometrix  5 ปีที่แล้ว

      Hi Yaya, sure you can do so....a form of robustness check. May I know from where (location) you are reaching me?

  • @ishikakataruka2520
    @ishikakataruka2520 3 ปีที่แล้ว +1

    Thank you for such great videos.Really Helpful.
    i have one doubt. I have 10 countries in my analysis . I am running this code :
    forval i=1/10{
    ardl exc lr dd fe ggg if (N=='i') , maxlag(1 1 1 1 1)
    matrix list e(lags)
    di
    }
    but its showing -- 'i' invalid name. how to solve this?

  • @FossongDerrick
    @FossongDerrick 5 หลายเดือนก่อน

    Please how can I have the ado file since it's bearly invisible??

    • @CrunchEconometrix
      @CrunchEconometrix  4 หลายเดือนก่อน

      Thanks for your enquiry. Kindly know that due to abuse and unethical conduct, Stata dofiles used in my videos are no longer free but available on my website upon payment. Here's the link cruncheconometrix.com/view/datashop.php
      The files don't cost much, just a token to maintain my website. Thanks for your understanding and patronage.

  • @dhaouia1
    @dhaouia1 5 ปีที่แล้ว +1

    Dear Dr CrunchEconometrix thank you very much for your videos . it is very helpful. however i did the same steps as yours in my first linear model but in got negative value of hausman test ano there is no probability of chi2 between MG and PMG so how can i know which method is better MG or PMG. Anther point dear Doctor, i am running the non linear model so when i type the FD and FDSQR(FD*FD) it shows that may be the variables are correlateed and no resluts how can i run the no linear model. thank you in advance

    • @CrunchEconometrix
      @CrunchEconometrix  5 ปีที่แล้ว

      Hi Dhaouia, for the HT, switch the hypothesis around. That is, "hausman pmg mg, sigmamore". Unfortunately, I haven't done NARDL before once I do, I'll release videos on them.

    • @dhaouia1
      @dhaouia1 5 ปีที่แล้ว +1

      @@CrunchEconometrix thank you very much. Appreciate your help

    • @dhaouia1
      @dhaouia1 5 ปีที่แล้ว +1

      thank you for your promp reply. sorry but in case i get DFE id the apprpriate after geeting the hausman test resutls is there any issue ...most papers i have read the appropriate method is PMG.??...thank you in advance

    • @CrunchEconometrix
      @CrunchEconometrix  5 ปีที่แล้ว

      @@dhaouia1 Yes, I've come across some summations on that but using PMG will depend on the objective of your research because MG, PMG and DFE all have different underlying assumptions as explained in my video. So, I'll advise you do more readings to know which estimator is best applicable to your work.

  • @vandanaarya431
    @vandanaarya431 2 ปีที่แล้ว +1

    @CrunchEconometrix Dear mam, my name is Vandana, research scholar at GJU, Hisar, Haryana, India. please provide me the codes provided by ANet Tchetchik to calculate optimal lag length. I shall be thankful to you for this. Further, I am following your panel ardl procedure. However, I am having trouble at step 5 when I am trying to use the long code for choosing the most common lags. Stata gives me the error that invalid name 'i'. My data is already in the long format and I have used xtset to tell Stata about the panel data presence. Could you kindly help me with this. Thank you.

    • @gphilipsen95
      @gphilipsen95 2 ปีที่แล้ว +1

      I had the same issue with 'i'. It is important to use `i' so first ` and then ' instead of double ' '. The issue is with the different kind of character.

  • @oluwatobiogunnusi8377
    @oluwatobiogunnusi8377 2 ปีที่แล้ว +1

    On the assumption that I'm using stata for the first time on my laptop, is there any package I will install first before performing xtpmg models?

    • @CrunchEconometrix
      @CrunchEconometrix  2 ปีที่แล้ว +1

      Oluwatobi, type "help xtpmg" and follow the Stata prompts on what you need to do.

    • @oluwatobiogunnusi8377
      @oluwatobiogunnusi8377 2 ปีที่แล้ว +1

      @@CrunchEconometrix Alright. Thanks ma. Unfortunately, code for the lag length selection criteria is showing error, indicating that the ardl loop isn't well specified.

    • @CrunchEconometrix
      @CrunchEconometrix  2 ปีที่แล้ว

      Hi Oluwatobi, panel ARDL is efficient when N

  • @KELVINBHEKINKOSIMOYO
    @KELVINBHEKINKOSIMOYO 5 หลายเดือนก่อน +1

    Thank you Professor i a m ahaving a challenge with this syntax forval i = 1/22 {ardl gdppcgr fdi gcf remit popg topnss if (C_id==' i '), maxlag (2 2 2 2 2 2) matrix list e(lags) di}
    stata13 is giving me this errorr code program error: code follows on the same line as open bra
    > ce

    • @CrunchEconometrix
      @CrunchEconometrix  5 หลายเดือนก่อน

      Not sure what this means but you can start by reducing explanatory variables.

  • @MuhammadIshaq-cj8yf
    @MuhammadIshaq-cj8yf 4 ปีที่แล้ว +1

    I found optimal lags for the variables but where we use those lags in the model?

    • @miralmaryam
      @miralmaryam 3 ปีที่แล้ว

      can u share the optimal lag exact command

    • @CrunchEconometrix
      @CrunchEconometrix  3 ปีที่แล้ว

      They are as shown in the video.

    • @TheDominock
      @TheDominock 3 ปีที่แล้ว

      @Muhammad Ishaq Hi Muhammad. Have you found the answer to your question? I am having the same issue. I can’t figure it out.

  • @busaritajudeen9168
    @busaritajudeen9168 3 ปีที่แล้ว

    Goodmorning Ma, I tried to follow your steps by using "(sum Y x1 x2 x3 x4 x5 x6, if ccy=="HIC") but what I got as response is ccy is not found. What should I do? I even try it stats 13, 14, 15 and 16 still the same. Thanks

    • @CrunchEconometrix
      @CrunchEconometrix  3 ปีที่แล้ว

      Hi Busari, I have responded to your query via Facebook.

  • @staminadaddie
    @staminadaddie 5 ปีที่แล้ว

    After deriving the optimal lag selection do i include the lagged variable/s in the stata command when performing the haisman test?

    • @CrunchEconometrix
      @CrunchEconometrix  5 ปีที่แล้ว

      But I performed the Hausman test in this video using the dofile where I showed the syntax used.

  • @sangitachaudhary2659
    @sangitachaudhary2659 3 ปีที่แล้ว +1

    Hello professor , Thank you for this video it really helps a lot..one question : i got an issue while doing the lag selection as itshows the collinearity problem between two variable so is there any solution for this issue ..kindly guide me please !

    • @CrunchEconometrix
      @CrunchEconometrix  3 ปีที่แล้ว

      Hi Sangita, that's a major issue with the panel ARDL technique. I usually reduce my RHS variables to 3 to minimize collinearity problems.

  • @maisau1132
    @maisau1132 4 ปีที่แล้ว

    Dear Dr
    I 'd like to have your guide for 2 questions as follow:
    @1.Could you show me how did you decide choosing COMMON LAGS is (1 0 0 0)? How can I get optimal lags from 10 lags set corresponding to 10 countries?
    @2. Stata had been running for too long time (number of Iterations are more than 250) when I ran pmg model and It seemed not to stop so I have to closed stata app. What was that issue?
    Thank you very much.
    Sau Mai

    • @CrunchEconometrix
      @CrunchEconometrix  4 ปีที่แล้ว

      Hi Mai, I explained how I got the lags. Kindly watch the applicable video. When Stata iterates for too long indicates the model is not well-structured mostly due to using wrong lags.

  • @staminadaddie
    @staminadaddie 5 ปีที่แล้ว

    when one types AIC behind the lags in brackets where does the AIC display in the output?

    • @CrunchEconometrix
      @CrunchEconometrix  5 ปีที่แล้ว

      Hi Alistair, it implies that the model will be estimated using AIC optimal lags.

  • @btessa2dc
    @btessa2dc 6 ปีที่แล้ว

    Dear Dr. Ngozi,
    Thanks again for this tutorial. What is the command to generate the p-values of each of the seven statistics of the Pedroni Cointegration test?
    In your tutorial you clearly explain how to know whether the variables are co-integrated or not. However, I think it will be great if we can also see p-values. I read some papers where the authors give these p-values. I have not been able to figure out the command that they used.
    Thanks,
    Tessa

    • @CrunchEconometrix
      @CrunchEconometrix  6 ปีที่แล้ว

      Hi Tessa, I don't know how to obtain the P values. That's why I use the statistics. You may have to do some online search...and if you do, please let me know too. Thanks!

    • @btessa2dc
      @btessa2dc 6 ปีที่แล้ว +1

      Dear Dr. Ngozi,
      I just found that the easy to go is to use Eviews to perform the co-integration. Unlike Stata, Eviews report the p-values of each of the seven statistics.
      I also found some commands for stata, but they are very complicated. So I didn't even tried them.

    • @adeolaoyebowale9951
      @adeolaoyebowale9951 5 ปีที่แล้ว +2

      @@CrunchEconometrix I have also been wondering how to find the p-values but I found it eventually. The code is "di 1-normal(2.494)". Absolute values of Test stats should be in the brackets. Thus, for rho panel in your example, we put 8.339 in brackets to obtain the p-value. I hope this helps. Best wishes.

    • @CrunchEconometrix
      @CrunchEconometrix  5 ปีที่แล้ว

      @@adeolaoyebowale9951 Thanks a lot!

  • @scholars.home999
    @scholars.home999 4 ปีที่แล้ว +1

    Hi Friend, Thanks for sharing your wisdom online. Stata is showing me a weird error ("i" invalid name) when I am using the code you have offered for the Optimal Lag Selection. Can you please help me understand where I went wrong? I have double checked all the commands. -Regard

    • @CrunchEconometrix
      @CrunchEconometrix  4 ปีที่แล้ว +1

      Perhaps you didn't create country ids. Thanks for complimenting my efforts, grateful!

    • @HibaWorld
      @HibaWorld 4 ปีที่แล้ว

      Hi I am facing the same issue. Did you manage to resolve it?

  • @AliAsghar-vr9fp
    @AliAsghar-vr9fp 5 ปีที่แล้ว

    hi dear doctor, is it necessary to have dep var at 1st diff in panl ardl.???the dep variabl you have used is stationary at level...is there any ref plz??

    • @CrunchEconometrix
      @CrunchEconometrix  5 ปีที่แล้ว

      Some refs are listed at the end of the video. You can also seek other refs from journal articles online.

  • @angechrista9148
    @angechrista9148 3 ปีที่แล้ว

    Hello Doctor, I am having an issue with the command of how to select the maximum lags in panel data analysis, my question is that I can't see the lags for each country and I want to know what does that error of invalid syntax means as shown below.
    e(lags)[1,4]
    gdpgr mva fdi infl
    r1 1 0 0 0
    invalid syntax????????
    Any help is appreciated.

    • @CrunchEconometrix
      @CrunchEconometrix  3 ปีที่แล้ว

      Hi Ange, I explained the lags. You may want to watch it again. Also, click on the error code and follow the guide to find out what you need to do.

  • @ange-jolinardaldrichtbetsa4407
    @ange-jolinardaldrichtbetsa4407 5 ปีที่แล้ว

    Hello Professor,
    What are the different types of heterogeneous static panel data modeling?
    Thank you in advance Professor.

    • @CrunchEconometrix
      @CrunchEconometrix  5 ปีที่แล้ว

      Hi Angie, don't know of any except for dynamic models. Static models are for short panels.

  • @dennisbaidoo5995
    @dennisbaidoo5995 3 ปีที่แล้ว +1

    Hello Prof. Thanks so much for your educative videos. I am having difficulty running the code for the optimal lag length selection. My N=6, T=9 and l have 6 variables including the dependent variable. I used :
    forval I= 1/6 {
    ardl ROCE DCR LQR DAR SOF TER if (c_id==`i '), maxlag(1 1 1 1 1 1)
    matrix list e(lags)
    di
    }
    After imputing these commands, l get invalid syntax as the response from Stata.
    Please, have l left out something. Kindly assist. Thank you.

    • @CrunchEconometrix
      @CrunchEconometrix  3 ปีที่แล้ว

      Hi Dennis, watch the video on "Basics of Panel ARDL". To estimate panel ARDL T = OR > 30. Click the Stata error code to know the problem and how to correct same. Thanks.

    • @dennisbaidoo5995
      @dennisbaidoo5995 3 ปีที่แล้ว +1

      @@CrunchEconometrix Thank you very much

  • @lemakargar6356
    @lemakargar6356 5 ปีที่แล้ว +1

    Dear dr Crunch, may I ask why you use lndcf instead of dcf? do you take the logs of the variables when deciding on whether to use pmg or mg method? and why is that? because untill step 6 you used the variables in normal form.

    • @CrunchEconometrix
      @CrunchEconometrix  5 ปีที่แล้ว

      Oftentimes, models behave better in logs. That may have influenced my decision in addition to the elasticity explanation.

    • @lemakargar6356
      @lemakargar6356 5 ปีที่แล้ว +1

      @@CrunchEconometrix thank you very much and thanks for the useful and well explained tutorials!

    • @lemakargar6356
      @lemakargar6356 5 ปีที่แล้ว

      i have one more quesstion and that's i want to test causality by using granger causality test. i used the code xtgcause dependent variable and independent variable, (aic) . but i am not sure how to interpret the results. below you will see the results:
      Dumitrescu & Hurlin (2012) Granger non-causality test results:
      --------------------------------------------------------------
      Optimal number of lags (AIC): 1 (lags tested: 1 to 4).
      W-bar = 1.7352
      Z-bar = 2.8476 (p-value = 0.0044)
      Z-bar tilde = 1.7956 (p-value = 0.0726)
      --------------------------------------------------------------
      H0: migrationinflow does not Granger-cause lngdppercapita.
      H1: migrationinflow does Granger-cause lngdppercapita for at least one panelvar (countryid).

    • @CrunchEconometrix
      @CrunchEconometrix  5 ปีที่แล้ว

      U're welcome, Lema...kindly share my videos with your academic and social media community :)

    • @CrunchEconometrix
      @CrunchEconometrix  5 ปีที่แล้ว

      @@lemakargar6356 I've never performed this test before but interpreting any causal analysis is the same.The pvalues have given sufficient evidence AGAINST the null hypothesis. So, there's causality. Can you give me the Stata syntax used? I may try Dumitrescu & Hurlin (2012) Granger non-causality test this someday and do a video on it, if you don't mind. Thanks.

  • @kaisernff7808
    @kaisernff7808 4 ปีที่แล้ว

    Thank you, Prof, for these videos. They are very helpful. My concern is how you address Cross-Sectional Dependence (in an ARDL setting) which could not be assumed away especially when dealing with countries like those in West Africa

    • @CrunchEconometrix
      @CrunchEconometrix  4 ปีที่แล้ว +1

      Hi Kaisernff, thanks for the positive feedback, Deeply appreciated! With the algorithm deployed during estimation (use of lags and difference operator) takes care of cross-sectional dependence. Please may I know from where (location) you are reaching me?

    • @kaisernff7808
      @kaisernff7808 4 ปีที่แล้ว

      @@CrunchEconometrix Dear Prof. Thank you very much for the response. I am based in Abuja and work with the ECOWAS Commission. Don't you think that we should test for CD instead of assuming that the algorithm deployed will deal with it? When there is strong evidence in favor of CD, What do you think about using CS-ARDL proposed by Ditzen (2018)?

    • @CrunchEconometrix
      @CrunchEconometrix  4 ปีที่แล้ว +1

      Oh, I see that is one of the improvements on the traditional panel ARDL methods. Well, if you feel there's need for it given the scope of your panel why not? Thanks for watching my videos. I'll appreciate if you can share the link to my TH-cam Channel for more awareness. Kind regards.

    • @kaisernff7808
      @kaisernff7808 4 ปีที่แล้ว +1

      @@CrunchEconometrix I have shared the link with colleagues here at the ECOWAS Commission. You are doing a fantastic job. Keep it up.

    • @CrunchEconometrix
      @CrunchEconometrix  4 ปีที่แล้ว

      I am grateful, Kaisernfff!!! I am working on a paper relating to ECOWAS. I'll send to you once it's done for your inputs as a coauthor. Once again, thanks for the publicity. May God bless you, Amen!

  • @talatujalloh8720
    @talatujalloh8720 4 ปีที่แล้ว +1

    Hello prof.,
    Thanks so much for your educative and helpful videos.
    I am working on a dataset with the time series dimension and cross-sectional dimension being the same, 15. I was advised to adopt a panel ARDL estimation technique due to the dynamism in my model.
    firstly, I would like to know your take on that recommendation, please.
    Secondly, I have been following from your panel ARDL video, however, when I tried the command for the optimal lag selection, I was told by stata that the command ardl is unrecognized. Also, I tried estimating the MG and also I was told "expression (-_b[cpi]/_b[L.fdilog]) evaluates to missing".
    I seem not to figure out where am going wrong or what is the problem. Any help from you would be gratefully appreciated. Thanks.
    below is the output for the various command I issued;
    Optimal lag selection
    . do "C:\Users\HP\AppData\Local\Temp\STD1328_000000.tmp"
    . forval i=1/15 {
    2. ardl fdilog, cpi, gdp, inf, nr if (c_id==i), maxlag(2 2 2 2 2)
    3. matrix list e(lags)
    4. di
    5. }
    command ardl is unrecognized
    r(199);
    end of do-file
    estimating the Mean Group
    . xtpmg d.fdilog d.cpi d.gdp d.inf d.nr d.top, lr(l.fdilog cpi gdp inf nr top) ec(ECT) replace mg
    expression (-_b[cpi]/_b[L.fdilog]) evaluates to missing

    • @CrunchEconometrix
      @CrunchEconometrix  4 ปีที่แล้ว

      Hi Talatu, did you watch the prerequisite video as advised?

    • @talatujalloh8720
      @talatujalloh8720 4 ปีที่แล้ว

      Yes, please.

    • @talatujalloh8720
      @talatujalloh8720 4 ปีที่แล้ว

      I learned almost everything on Panel from your videos.

    • @CrunchEconometrix
      @CrunchEconometrix  4 ปีที่แล้ว

      @@talatujalloh8720 I'm not sure you did because you would have known that for panel ARDL your data structure MUST be N

    • @CrunchEconometrix
      @CrunchEconometrix  4 ปีที่แล้ว

      @@talatujalloh8720 Good to hear. But watch them again to understand estimation techniques that go with different panel structures.

  • @sabashah1160
    @sabashah1160 3 ปีที่แล้ว +2

    How to enter code for step 5 in stata as this is in few lines? I dnt get it

    • @CrunchEconometrix
      @CrunchEconometrix  3 ปีที่แล้ว +1

      Hi Saba, the code is as indicated in the video.

    • @sabashah1160
      @sabashah1160 3 ปีที่แล้ว

      I tried it to enter but no result

    • @CrunchEconometrix
      @CrunchEconometrix  3 ปีที่แล้ว +1

      Not sure I can decipher what the problem is.

  • @nssofod
    @nssofod 4 ปีที่แล้ว

    Madam, thanks for this video. Can I have reference of some articles which have followed this method? And why I am having different ardl structure for stata and eviews? Plz help. Thanks in advance.

    • @CrunchEconometrix
      @CrunchEconometrix  4 ปีที่แล้ว +1

      Hi Debasis, references are listed at the end of the video. The softwares differ. Don't expect the same output.

  • @geoffchen2043
    @geoffchen2043 4 ปีที่แล้ว +1

    Hi Prof, thanks for your videos! They are very helpful. I have a question. Can you perform the ARDL bound test in panel data. I have been researching on the internet for hours. I couldn't find anyone talk about this problem. But I have seen as papers performed bound test in panel data.

    • @CrunchEconometrix
      @CrunchEconometrix  4 ปีที่แล้ว +1

      Hi Geoff, bounds test is only applicable to time series ARDL not panel ARDL...well, verify if those papers are published in high-impact Journals and if so, you can reference them even though using bound test in panel analysis is wrong. I may advise performing individual bounds test for each country but again what will be the rationale for that?

    • @geoffchen2043
      @geoffchen2043 4 ปีที่แล้ว

      Thanks Prof, Just want to confirm. Can Predroni cointegration test be used regardless of I(0), I(1), or both I(0) and I(1)?

    • @CrunchEconometrix
      @CrunchEconometrix  4 ปีที่แล้ว

      Yes, but the dependent variable should be I(1).

    • @geoffchen2043
      @geoffchen2043 4 ปีที่แล้ว +1

      @@CrunchEconometrix What should I do if the dependent variable is not I(1)?

    • @CrunchEconometrix
      @CrunchEconometrix  4 ปีที่แล้ว

      @@geoffchen2043 It must be I(1).

  • @armanddjaha5763
    @armanddjaha5763 3 ปีที่แล้ว +1

    Hi , How can i upload the code ?

  • @aiboudaziz8318
    @aiboudaziz8318 4 ปีที่แล้ว

    first of all, thank you for this clarification on the ARDL model. I would like to ask you a question. when implementing the code, stata show me a message (c_id) not found. can you explain to me how to apply this code (c_id == `i ') please.

    • @CrunchEconometrix
      @CrunchEconometrix  4 ปีที่แล้ว +1

      Hi Alboud, c_id is the country id I created. You need to create yours. Thanks.

    • @aiboudaziz8318
      @aiboudaziz8318 4 ปีที่แล้ว +1

      Thank you very much professor

  • @THIAGOVIZINE
    @THIAGOVIZINE 4 ปีที่แล้ว +1

    Dear professor Ngozi! Thank you so much for your videos! They are helping me a lot with my thesis! However, I’ve some doubts, could you please help me? 1º: When I run step 5, I get the following message: “Collinear variables detected r(9)”. I saw your answer to Anh Nguyen (+ or - 1 year ago), and tried to reestimate the structure, but it didn’t work. 2º: When trying to run step 7, a message of “insufficient observations” shows up, however, my database has 19 countries, 27 years, and 532 observations. Can you please help me? Thank you very much!

    • @CrunchEconometrix
      @CrunchEconometrix  4 ปีที่แล้ว +1

      Hi Thiago, did you use optimal lags to estimate the model as shown in the video series?

    • @THIAGOVIZINE
      @THIAGOVIZINE 3 ปีที่แล้ว +1

      @@CrunchEconometrix Thanks a lot for your support! And sorry for taking so long to answer. I ended up changing my model. I ran the data with first difference.Fortunately everything ran just fine. Once again thank you so much! All the best

    • @CrunchEconometrix
      @CrunchEconometrix  3 ปีที่แล้ว

      Glad to hear, Thiago!❤️

  • @KeziaSpeaksHerMind
    @KeziaSpeaksHerMind ปีที่แล้ว +1

    I was trying to run Hausman test for dfe and mg. The resultI got said "chi2 model fitted on these
    data fails to meet the asymptotic
    assumptions of the Hausman test;
    see suest for a generalized test". What do I do prof

    • @CrunchEconometrix
      @CrunchEconometrix  ปีที่แล้ว

      Flip the test around.

    • @KeziaSpeaksHerMind
      @KeziaSpeaksHerMind ปีที่แล้ว +1

      @@CrunchEconometrix Thank you ma. One more question Prof. I am trying to run PMG/ARDL on Eviews. My dependent variable is 1(1) while independent is a mixture of 1(1) and 1(0). I noticed that eviews automatically takes another difference of my already differenced variable when giving me results for short run. What do you think i should do? Should I just analyze my data with the level variable(not differenced) and if I do, won;t this affect the long run estimation because the long run estimation comes out the same way I put it on the command.

    • @CrunchEconometrix
      @CrunchEconometrix  ปีที่แล้ว

      I am not familiar with the EViews approach for PMG analysis. It is better you post your query to an EViews platform for more constructive feedback. Thanks

  • @michaelasiedu8928
    @michaelasiedu8928 4 ปีที่แล้ว

    How do you overcome the problem of "maximum number of iterations exceeded" in STATA

    • @CrunchEconometrix
      @CrunchEconometrix  4 ปีที่แล้ว

      Hi Michael, I'm not sure how to adjust Stata for more iterations, so you may need to post this on Statalist.org for more constructive feedback. Thanks.

  • @manuellatonga3762
    @manuellatonga3762 2 ปีที่แล้ว

    Please Prof in this video, can we put level zero when we do ADF?, you said no, but we have stationnary in level, if we begin by one, we dont do at level?, because one is in first difference. Thank you

    • @CrunchEconometrix
      @CrunchEconometrix  2 ปีที่แล้ว

      Manuella, you are mixing up these terminologies. My advice: read up on STATIONARY TESTS then come back to understand the estimations.

  • @soufianemahjoubi5758
    @soufianemahjoubi5758 4 ปีที่แล้ว +1

    if i run this code, i show this problem:
    1.forval gouvernorat=1/4{
    2. ardl lnd lnp lnt lnk lnl lns lne lnpe if ( gouvernorat1=='i'), maxlag(2 2 2 2 2 2 2 2)
    3. matrix list e(lags)
    4. di
    5. }
    'i' invalid name
    r(198);

  • @MAX-ho6wg
    @MAX-ho6wg 4 ปีที่แล้ว

    Thanks a lot for the great work you are doing. Could help me with how to use bootstrap sampling and estimation.

    • @CrunchEconometrix
      @CrunchEconometrix  4 ปีที่แล้ว +1

      Hi Max, thanks for the positive feedback on my videos. Deeply appreciated! Unfortunately, I have no idea about bootstrapping. Please may I know from where (location) you are reaching me?

    • @MAX-ho6wg
      @MAX-ho6wg 4 ปีที่แล้ว +1

      @@CrunchEconometrix Am writing from East Africa-Uganda. I thought I did have some ideas about bootstrap sampling and estimation. I'm trying to discover how it works. You are a great teacher. I like the way you explain the models and the findings.

    • @CrunchEconometrix
      @CrunchEconometrix  4 ปีที่แล้ว

      @@MAX-ho6wg Thanks Max. I'm encouraged by your comments. Please tell your students and academic community in Uganda 🇺🇬 about my TH-cam Channel😊

    • @emilienneyameogo3525
      @emilienneyameogo3525 4 ปีที่แล้ว

      I tried it just yesterday. I think I installed 'xtwest' but check it in the 'help' section in stata

  • @soufianemahjoubi5758
    @soufianemahjoubi5758 4 ปีที่แล้ว

    hello, why if I can use the command of optimum lags, stata 14 shows this message: "command ardl is unrecognized" please

    • @CrunchEconometrix
      @CrunchEconometrix  4 ปีที่แล้ว

      Hi Mahjoubi, type either of the following in the Command window to install the syntax: ssc install ardl OR findit ardl OR help ardl.

  • @same174
    @same174 5 ปีที่แล้ว

    Hi again Ngozi,
    If you remember I got a negative Chi2 for a Hausman test. Today I figured out if I reverse the command (hausman pmg mg, sigmamore) the Chi2 will be positive. However, I wonder if the null will be reversed as well or not? I mean the null should be: MG performes better than PMG. Thanks for your kind help.

    • @CrunchEconometrix
      @CrunchEconometrix  5 ปีที่แล้ว +1

      Not at all. The null hypothesis remains the same: PMG performs better than MG.

    • @same174
      @same174 5 ปีที่แล้ว +1

      CrunchEconometrix Thanks for your response Dr! You are really helpful and patient with us.

  • @ifedolaolabisi3015
    @ifedolaolabisi3015 5 ปีที่แล้ว

    Please Professor, how can I load quarterly and monthly panel data in excel without having gaps.

    • @CrunchEconometrix
      @CrunchEconometrix  5 ปีที่แล้ว

      Hi Ifedola, watch my video on "Reshape wide to longitudinal data". Your data with or without gaps is dependent on the source data....may I know from where (location) you are reaching me?

  • @charlottewhite9272
    @charlottewhite9272 4 ปีที่แล้ว

    Hi, I'm wondering why the variables are suddenly differenced and transformed into log form in step 7, please could you clarify this for me?

    • @CrunchEconometrix
      @CrunchEconometrix  4 ปีที่แล้ว

      Hi Char, I transform to logs to simplify interpretation and the difference is used in line with the technique. See references at the end of the video. Thanks.

    • @charlottewhite9272
      @charlottewhite9272 4 ปีที่แล้ว +1

      CrunchEconometrix thanks for your reply! Your videos are so helpful and you explain everything so clearly

  • @same174
    @same174 5 ปีที่แล้ว

    Hi again Ngozi,
    I looked at Pesaran work one more time. Radical N/T for their empirical work is 0.18 considering data from 1962-1992 and 30 countries. Mine is 0.03 ! I looked at other papers and the ratio which should tends to infinity is much larger! It seems there is no criteria for "large enough " concept! Do you think empirically we can refer to those papers as a justification for sample size?

    • @CrunchEconometrix
      @CrunchEconometrix  5 ปีที่แล้ว +1

      Very correct Esmaeil. But to avoid small sample bias, it is ideal to have at least 30 observations.

    • @same174
      @same174 5 ปีที่แล้ว +1

      CrunchEconometrix thanks a lot for your swift reply and your precious kindness :)

    • @CrunchEconometrix
      @CrunchEconometrix  5 ปีที่แล้ว +1

      @UC-P0aCjKjB6dpgPAlIcNxiw 1 year = 4 qtrs. So, 72 qtrs is fine.

    • @same174
      @same174 5 ปีที่แล้ว +1

      CrunchEconometrix thanks again. Have a lovely day there.

  • @jhabindrapokharel
    @jhabindrapokharel 3 ปีที่แล้ว +1

    it would be easy to understand the tutorial if you could go litile bit slow (in explaination).

    • @CrunchEconometrix
      @CrunchEconometrix  3 ปีที่แล้ว

      Your comment is greatly appreciated, Jhabindra.

  • @AliAsghar-vr9fp
    @AliAsghar-vr9fp 5 ปีที่แล้ว

    xtwest nd xtped command also not recognized is there any command to install these in stata 13...thanks

  • @thomsonpepeah3943
    @thomsonpepeah3943 4 ปีที่แล้ว +2

    Dear Prof. this video series has greatly help me towards advancing on my paper to this extent. Thank you for this content. I am however having a problem at the lag selection level. I used stata 12 and Here's the command i adapted from the video. forval i=1/37{ardl gdppk nrre aiqty trr fdi Debt inf
    > if (code == 'i'), maxlag(1111111111) aic matrix lis
    > t e(lags)di}
    THIS IS THE ERROR MESSAGE I RECEIVED.
    program error: code follows on the same line as open
    > brace
    r(198);
    CAN YOU PLEASE HELP OUT WITH POSSIBLE SOLUTION,
    Thank you.

    • @CrunchEconometrix
      @CrunchEconometrix  4 ปีที่แล้ว +1

      Hi Ateh, thanks for the encouraging feedback. Deeply appreciated! Aside the fact that you got the code wrong, your model will not hold up. Panel ARDL performs best when N is considerably less than T. Again with fewer variables, the model performs better than those with too many variables as you have it in your case. You may want to purchase my dofile for appropriate coding...or watch my video again and copy from the screen. Thanks.

    • @237nocommenttv.9
      @237nocommenttv.9 4 ปีที่แล้ว +1

      Thank you for taking out time to point these out Prof. Very grateful!

    • @CrunchEconometrix
      @CrunchEconometrix  4 ปีที่แล้ว

      U're welcome 😊

  • @nonsoiheoma1764
    @nonsoiheoma1764 3 ปีที่แล้ว +1

    Please, can I be assisted to resolve this MG code?
    "xtpmg d.HEPC d.ecou d.POPG, lr(l.HEPC l.ecou l.POPG) replace mg ec(ec)".
    I have severally to run it but it's not working.

    • @CrunchEconometrix
      @CrunchEconometrix  3 ปีที่แล้ว

      Nonso, what errors are you getting?

    • @nonsoiheoma1764
      @nonsoiheoma1764 3 ปีที่แล้ว

      @@CrunchEconometrix STATA displays an error message that says. " ec is in the list of predictors"

    • @CrunchEconometrix
      @CrunchEconometrix  3 ปีที่แล้ว

      Check your code with mine as shown in the video. You got it wrong.

    • @nonsoiheoma1764
      @nonsoiheoma1764 3 ปีที่แล้ว

      I just run this code: "xtpmg d.HEPC d.ecou d.POPG, lr(l.HEPC ecou POPG) ec(ECT) replace mg"
      the error message says "invalid new variable name;
      variable name ECT is in the list of predictors"

    • @nonsoiheoma1764
      @nonsoiheoma1764 3 ปีที่แล้ว

      I am using STATA 16

  • @shintaamalina
    @shintaamalina 3 ปีที่แล้ว

    Hello Prof. Ngozi, this video is very helpful. Highly appreciate it. However, I found error when testing the ARDL
    I follow the same instruction of forval:
    forval i = 1/14 {
    ardl y x1 x2 x3 x4 if (countries==`i'), maxlag (2 2 2 2)
    matrix list e(lags)
    di
    },
    just changed 1/14 because I have 14 countries. The error message is: invalid numlist has elements outside of allowed range.
    Could you please suggest me which mistake I did?

    • @CrunchEconometrix
      @CrunchEconometrix  3 ปีที่แล้ว +1

      Shinta, you have 5 variables so it should be maxlag(2 2 2 2 2).

    • @shintaamalina
      @shintaamalina 3 ปีที่แล้ว +1

      @@CrunchEconometrix Many thanks prof Ngozi!! It works now!! God bless you!!

    • @shintaamalina
      @shintaamalina 3 ปีที่แล้ว

      @@CrunchEconometrix Hi Prof. Ngozi, I faced another issue when running xtpmg. It says: invalid new variable name;
      variable name ECT is in the list of predictors
      while I don't have ECT in my predictors.
      Could you please guide me?
      Many thanks in advanced!

  • @haddaderadra2310
    @haddaderadra2310 4 ปีที่แล้ว

    hello again, when i apply the code of optimal lag, i have a problem i get an error message " ardl unrecognized command" why ? and what to do in this case please ?

    • @CrunchEconometrix
      @CrunchEconometrix  4 ปีที่แล้ว +1

      Install the syntax with any of these: ssc install ardl OR findit ardl OR help ardl.