Estimating Dynamic Panel ARDL (MG, PMG, DFE) Models for STATA - Applied Econometrics with STATA

Поділитися
Вставка
  • Опубліковано 7 лис 2024

КОМЕНТАРІ • 116

  • @metindogan4536
    @metindogan4536 Рік тому

    hello Noman thank you for the video. I have a question. I conduct a model (T>N) and there is cross section dependency and heterogeneous variables in this model. In this regard it is statically possible to use PMG method? thank you in advance

    • @metindogan4536
      @metindogan4536 Рік тому

      I use this methodology: Cross Section Dependency Test- Homogeneity Test- Unit Root Test- Westerlund (2007) Conintegration Test and Finally PMG (after Hausman Test) Test

    • @nomanarshed
      @nomanarshed  Рік тому

      PMG is first generation model. In your case use CS ARDL model ua-cam.com/video/S_KjERv6kPk/v-deo.htmlsi=clS8Yvnp4z3Idpkc

  • @clarajoanjoachim2179
    @clarajoanjoachim2179 Рік тому

    thank you for the informative video. I want to run hausman test to compare pmg, mg and dfe. however, mg and dfe does not give any result as it showed "max number of iterations". any advice on how to solve this?

    • @nomanarshed
      @nomanarshed  Рік тому

      Write help xtpmg to see how you can increase the number of iterations. But the chances that the model is sovled are low. You might have to simplify the model.

    • @clarajoanjoachim2179
      @clarajoanjoachim2179 Рік тому

      @@nomanarshed I set mat for 16000 but the problem is still not solved. May I know what you mean by simplify the model? I am beginner with econometrics and panel data

    • @nomanarshed
      @nomanarshed  Рік тому +1

      It means either reduce independent variables and/or replace them with other which are more relevant variables. If you have added higher order forms like square variable or cross products you might have to remove them

    • @clarajoanjoachim2179
      @clarajoanjoachim2179 Рік тому

      @@nomanarshed Thank you ve.much! I have another question sir. I tried hausman test to compare which model is suitable. however, the result shows "Warning: chi2 < 0 ==> model fitted on these data fails to meet the asymptotic assumptions of the Hausman test; see suest for a generalized test." do you know what happened here?

  • @Paulo10386-..
    @Paulo10386-.. Рік тому

    Thank you very much, Sir, this video really do a great hope for me. I use the dfe code at my laptop, it do run. However, I don't undstand the lags used in this code, could you tell me how can I input the lags to this code?

    • @nomanarshed
      @nomanarshed  Рік тому

      In this video you can learn how to add lags. ua-cam.com/video/7Ptgwnn_Dpw/v-deo.html

  • @MuhammadBilal-nv4dz
    @MuhammadBilal-nv4dz Рік тому

    I have a question regarding data i hope you will answer. your price is pure panel data but the FDI ,export and CPI is time series i think* because values are same and repeated for each firm. for eg CPI data for firm 1 is from Jan-05 to dec-19 and again same data is repeated for firm 2 and so on. so my question is in the case we check cross sectional dependency for only Price, and what about 2nd generation unit root test all 4 variables will not be stationary in 2nd generation unitroot test even in 2nd difference. so please guide because i have similar kind of data. thanks in advance . waiting for you response

    • @nomanarshed
      @nomanarshed  Рік тому

      Yes other than dv all other are cross section invariant. In you scenario, there is 100% crosssectional dependence by definition so uts upto you to check it or not. It should lead to the use of 2nd generation models.

  • @dennisbaidoo5995
    @dennisbaidoo5995 2 роки тому

    Thank you for the educative video. Please, l am using stata 15 to run mg for T=29 and N=20. My challenge is with the mg. When l run it, l get the following feedback:
    Invalid new variable name
    Variable name _ec is in the list of predictors.
    r(110)
    How do l resolve this challenge? Thank you

    • @nomanarshed
      @nomanarshed  2 роки тому

      See following video ua-cam.com/video/7Ptgwnn_Dpw/v-deo.html

  • @geoffchen2043
    @geoffchen2043 4 роки тому +1

    Great video! I have a question. The model you are running here is ARDL(1,0,0,0,0,0). If I want to run ARDL(3,2,0,0,0,2), what should I adjust in the code?

    • @nomanarshed
      @nomanarshed  4 роки тому

      In Panel ARDL the norm is to use this lag order. You cannot have different lags for different variables. You could have (1,1,1,1,1,1) by adding lags

    • @geoffchen2043
      @geoffchen2043 4 роки тому

      Noman Arshed Thank you so much!

    • @iqbalmarri3192
      @iqbalmarri3192 4 роки тому

      it is called optimal lag selection. AIC or BIC criteria are used to select the optimal number of lags.

  • @sjallahabad
    @sjallahabad 19 днів тому

    according to your instructions, I am doing the following but continuously getting the r (110) and am unable to get results for mg. Can you suggest what to do and how to correct it?
    xtpmg d.gdpgr d.govtexp d.debtgdp d.govtrev, lr(l.gdpgr govtexp debtgdp govtrev) mg
    invalid new variable name;
    variable name __ec is in the list of predictors
    r(110);

    • @nomanarshed
      @nomanarshed  19 днів тому

      if the model is not able to converge it will not show results. if you want to see them you need to simplify the model

    • @swatijainallahabad5401
      @swatijainallahabad5401 19 днів тому

      Simplify in the sense that reduce the number of variables or number of countries. Thanks for the suggestion

  • @toqeerabbas6634
    @toqeerabbas6634 2 роки тому

    Hello sir, how to interpret pmg and MG results of long run and short run, and which one is best??

    • @nomanarshed
      @nomanarshed  2 роки тому

      You have to do hausman test to see which is best. And its intrepretation method is same as ARDL short run and long run estimates

  • @omerbalala8703
    @omerbalala8703 2 роки тому +1

    Thank you for the video.

  • @mariashabir5787
    @mariashabir5787 2 роки тому

    Sir i have two questions
    Does pmg and mg test belong to a second generation.
    What is the difference between Amg and pmg

    • @nomanarshed
      @nomanarshed  2 роки тому

      PMG and MG models are first generation and AMG includes the augmenting factor to control for cross sectional dependence to make is 2nd generation. While PMG groups the long run and estimates cross section wise short run

  • @m.abdurrahmanmehrabi4147
    @m.abdurrahmanmehrabi4147 3 роки тому

    Thank you for share this video with us. I have the same problem after xtpmg command the information in the error explanation says ``matsize must be between 10 and 800``I followed with ``set matsiz 800`` command but I did not see any results my penal is strongly balanced. What I should do? could you help me, please?

    • @nomanarshed
      @nomanarshed  3 роки тому +1

      It must be giving some other error now. Or it if is not converging the reduce variables as you data might not be long enough

    • @m.abdurrahmanmehrabi4147
      @m.abdurrahmanmehrabi4147 3 роки тому +1

      @@nomanarshed I will try this as well thanks.

  • @JONYHANNAN
    @JONYHANNAN 4 роки тому +1

    Is it mandatory to have T>N for panel ARDL? I have n=30 and t=27. Out of my 9 regressors 4 are I (1) and 5 are I(0). Can I use panel ARDL model though I have N>T?
    Thanks.

    • @nomanarshed
      @nomanarshed  4 роки тому +1

      There are two ways to tackle this. Either make two sub samples of countries because of any common property. This way T > N will happen. Second way is they are almost equal you can still try as both are large nearing 30.

    • @JONYHANNAN
      @JONYHANNAN 4 роки тому

      @@nomanarshed Thanks for your reply.
      I have following questions:
      1. Is T>N a must follow precondition in panel ARDL? I have no option to make subsample.
      2. How many regressors can xtpmg work with?
      3. I have 9 regressors. When i run xtpmg it does iteration for long time and gives failure after a long while. Can i skip iteration process and produce results from xtpmg?
      Eagerly waiting for your reply. Thanks.

  • @bukhalid2011
    @bukhalid2011 2 роки тому

    Thank you very much Noaman! actually I am doing all these steps which are worked well. however, when I am trying to do MG it shows variable name ec is in the list of predictors. I use this code "xtpmg d.y d.x1 d.x2 d.x3 d.x4 d.x5, lr(l.y x1 x2 x3 x4 x5) mg " I do also what showing from another video to sort this issue with lag, but still this issue exist. regards

    • @nomanarshed
      @nomanarshed  2 роки тому +1

      Just check after first try of there is ec named variable in the variable list otherwise you need to email the author of the module

    • @bukhalid2011
      @bukhalid2011 Рік тому

      @@nomanarshed many thanks! if you all me to ask another question, how we can choose the optimal lag for a panel data-ardl in STATA, also what would be the command? I appreciated your help.

  • @sarahahmedchawsheen5455
    @sarahahmedchawsheen5455 Рік тому

    Hi, what is the solution for a negative value of chi square of Hausman test MG & PMG, please?

    • @nomanarshed
      @nomanarshed  Рік тому +1

      Usually it does not happen. We should write this issue to the author of xtpmg model so device a solution. You can try to add sigmamore after the comma to see if the problem is sorted otherwise just like Eviews only report PMG model.

    • @sarahahmedchawsheen5455
      @sarahahmedchawsheen5455 Рік тому

      @@nomanarshed thanks.

  • @minyarkhayat4824
    @minyarkhayat4824 2 роки тому

    The video is interesting bravo!!! although i have some issues. i ran a simple xtpmg regression without full . i got the error message "Hessian has become unstable or asymmetric" . what can be the reason. ( considering that i have cross-over variable , variables in log and other normal variables).I
    ndeed i don't get what Iteration refers to . in my estimation i obtain a lot of Iteration . also not concave whats it mean .thank you a lot for the consideration

    • @nomanarshed
      @nomanarshed  2 роки тому

      These errors usually comes when the variables are either too many, few of them are not varying very much or there is a correlation among the variables or at their lags, so try to simplify the model by reducing lags or reducing specification (square forms or cross products) or reducing variables.

  • @KnowledgeBrain
    @KnowledgeBrain 3 роки тому +1

    Good efforts thanks

  • @sulekaramk6707
    @sulekaramk6707 2 роки тому

    Hi Noman! Thanks a lot for the video, it is very helpful. I was wondering how a similar analysis can be conducted on R Studio. I am handling dynamic panel data and using ARDL package for that purpose. However, it is not possible to estimate MG, PMG estimators within that package. Do you have any suggestions?

    • @nomanarshed
      @nomanarshed  2 роки тому +1

      Yes you can do the PMG model using PLM, my recent video has shown it. The Panel ARDL model is under development

    • @sulekaramk6707
      @sulekaramk6707 2 роки тому

      @@nomanarshed Thank you for the reply and new video! An additional question to the new video: with pmg we get long-run coefficients and by adding lags of the variables, we get short-run coeff. Is it also possible to find the speed of adjustment out of this estimation?

  • @knowledgebulb6232
    @knowledgebulb6232 Місяць тому

    i am getting below errors
    . xtpmg d(int_rate_deposit ib_bank ), lr(l.int_rate_deposit ib_bank) mg
    invalid new variable name;
    variable name __ec is in the list of predictors
    but there is no _ec in the variables name, what to do? Please help. Thank you

    • @nomanarshed
      @nomanarshed  Місяць тому

      ua-cam.com/video/7Ptgwnn_Dpw/v-deo.html its solution is discusses here

  • @HibaWorld
    @HibaWorld 4 роки тому

    Thank you for this informative video. I have a question. I have T>N (T=168 and N=28). My data is an unbalanced panel with one independent variable non-stationary and stationary after first differencing. I used PMG which turns out to be good after the Hausman test. However, I read that PMG doesn't account for cross-sectional dependencies and the option should be xtdcce2 model as it can test for cross-sectional dependencies using xtcd2. It should work with unbalanced data but it's not working. Wondering do you have any suggestion?

    • @nomanarshed
      @nomanarshed  4 роки тому

      There are few modules available to check dependency try all of them.

    • @nomanarshed
      @nomanarshed  4 роки тому

      Another way is generate residuals of PMG and do dependency on it

    • @HibaWorld
      @HibaWorld 4 роки тому

      @@nomanarshed thank you. My data doesn't generate residuals. It comes back with message that can't balance panel.I tried xtcd2 and xtcd but same result. Do you know any codes which can be useful for unbalanced panel. I am using STATA 14. Thank you

    • @rexeaston9676
      @rexeaston9676 3 роки тому

      instaBlaster...

  • @lalaa10do
    @lalaa10do 3 роки тому +1

    after dropping generated variables, when I ran the mg model, it is showing
    invalid new variable name;
    variable name __ec is in the list of predictors
    . please help

    • @nomanarshed
      @nomanarshed  3 роки тому

      This some time happens in this module. I have written to the authors about it. Try running PMG or DFE in this case

    • @lalaa10do
      @lalaa10do 3 роки тому

      ​@@nomanarshed it is happening in Stata 16. I ran the model in 13. it was successful. But when I ran PMG, it shows matrix not positive definite

    • @nomanarshed
      @nomanarshed  3 роки тому

      This means it will not converge. Use other from MG or DFE

    • @lalaa10do
      @lalaa10do 3 роки тому

      @@nomanarshed Sir, How to deal with the negative value in the Hausman test.

  • @MuhammadIshaq-cj8yf
    @MuhammadIshaq-cj8yf 4 роки тому

    Very nice sir but you did very fast last things so fast, I do same but ECT is positive in my case, what i should do ?
    another this is while hausman test is showing an error in your video, how to deal it? V-b V-B is not positive definite

    • @nomanarshed
      @nomanarshed  4 роки тому

      ECT positive means no convergence. You have to revisit the set of independent variables. Hausman test only works when signs of variables do not change between the models that is why it is giving error of not definate positive for this consult theory and see which model adhears to correct coefficient signs.

  • @marcoca4400
    @marcoca4400 2 роки тому

    I have a question, is the PMG good when the number of observations N is almost the same as the time series T? because I wanted to make a standard panel but I think it's bad when you have a small sample (I only have N= 23), that's why I ask if the PMG is good for these cases.

    • @nomanarshed
      @nomanarshed  2 роки тому

      See the specifications provided for selection of the model as not always feasible. In such cases try to estimate 2 3 versions of models and then do comparison

  • @mdnaiemhossain6074
    @mdnaiemhossain6074 3 роки тому +1

    very helpful. thanks

  • @sabashah1160
    @sabashah1160 3 роки тому

    Thanku it helps a lot
    Command for mg shows “invalid new variable name” how to do it?

    • @nomanarshed
      @nomanarshed  3 роки тому +1

      Before estimating second time. You have to remove the newly constructed variables. Like _ec

    • @sabashah1160
      @sabashah1160 3 роки тому

      Thanku

  • @sabreenkhan3498
    @sabreenkhan3498 2 роки тому

    i am facing a problem with mg . when I use human test my results show mg is missing ... and also when I run mg command I get error 110 i.e new variable name;
    variable name __ec is in the list of predictors
    r(110); can u plz help me out with this one

    • @nomanarshed
      @nomanarshed  2 роки тому

      Follow video has a partial solution. ua-cam.com/video/7Ptgwnn_Dpw/v-deo.html

  • @soosuklee98
    @soosuklee98 2 роки тому

    hi, just wondering, can you clarify that the code you used here "xtpmg d(Y X1 X2 X3 X4 X5), lr(l.Y X1 X2 X3 X4 X5)" is ARDL (1, 0, 0, 0, 0, 0)? Because in some sources it says that this command estimates ARDL(1, 1, 1, 1 1, 1). So I am not sure as to which is correct.

    • @nomanarshed
      @nomanarshed  2 роки тому

      If it is ARDL(1,1,1,1,1) the you would have seen pairs of each independent variable one with level and one with first lag. In my video there are no pairs

    • @soosuklee98
      @soosuklee98 2 роки тому

      @@nomanarshed hi thank you for your answer, so based on your answer for ARDL(1, 1, 1, 1, 1, 1) it would be xtpmg d(Y X1 l.X1 X2 l.X2 X3 l.X3 X4 l.X4 X5 l.X5), lr(l.Y X1 X2 X3 X4 X5)?

    • @soosuklee98
      @soosuklee98 2 роки тому

      @@nomanarshed I am asking this because according to the Stata Journal Paper published by Blackburne and Frank (2007), the ones who introduced the xtpmg command, give the example of xtpmg d.c d.pi d.y, lr(l.c pi y) ec(ec) replace pmg, which they state is based on a PMG ARDL model (1, 1, 1). So I am confused as to who is correct?

    • @nomanarshed
      @nomanarshed  2 роки тому

      If we compare with restricted and unrestricted ardl equation method then he is right as in restricted ardl there is 1 lag less as compared to unrestricted ardl so if ardl(1,1,1) is developed in unrestricted form then in restricted form all lags would be subtracted by 1. So the code which i showed is technically ARDL (1,1,1) before restriction and ARDL(0,0,0) after restriction. You can get this logiv from the book of walter enders advanced time series econometrics

    • @soosuklee98
      @soosuklee98 2 роки тому

      @@nomanarshed Hello and thank you for your most informative answers. So for instance, when researchers state they did PMG ARDL (1, 1) but only show short run difference coefficients they are actually referring to the unrestricted ardl and if we change this to restricted model this becomes ARDL (1, 0)? Also is there are an ARDL(0, 0, 0)? I believe that the dependent variable lag is always 1 in any panel ardl model?

  • @shanemuhammadchabdulgafor
    @shanemuhammadchabdulgafor Рік тому

    Jazak Allah for help

  • @rochnaarora7478
    @rochnaarora7478 3 роки тому

    when we have to run ARDL (1 1 1 1) instead of ARDL (1 0 0 0) as you have explained , what will the change in the command be like?
    Will these lagged variables be only eneterd into lr part of the command? Please reply.. its urgent

    • @nomanarshed
      @nomanarshed  3 роки тому

      Do not change in lr add lags in the other section which starts with d. In tha add variables using l.

    • @rochnaarora7478
      @rochnaarora7478 3 роки тому

      @@nomanarshed but sir lag of depnedent varaible is included in lr component so why the lags of independent variable will be included in d component..
      Isnt that asymmetric in specification?

    • @nomanarshed
      @nomanarshed  3 роки тому

      That lag of dependent is made in default by author of this code. I do not exactly know why is that

  • @rochnaarora7478
    @rochnaarora7478 3 роки тому

    Why does the iterations process in PMG model not halting rather the iterations in my case are continuing. What could be the possible reason for that and what solution do you offer for the same? Waiting for an early reply Sir!!!

    • @nomanarshed
      @nomanarshed  3 роки тому

      It will iterate 40000 times. Usually when it is not stoping it means that the particular model might not converge.

    • @rochnaarora7478
      @rochnaarora7478 3 роки тому

      @@nomanarshed Does that suggest to re specify our model?

    • @nomanarshed
      @nomanarshed  3 роки тому +1

      @@rochnaarora7478 apply the mg or dfe type see if they work other wise reduce lags or variables

    • @KeziaSpeaksHerMind
      @KeziaSpeaksHerMind Рік тому

      I have the same issue with my pmg.

  • @DIEGOMARTINEZ-ow4kj
    @DIEGOMARTINEZ-ow4kj 3 роки тому

    Hello! When I run the command "xtpmg" ending in "mg" Stata reports the error "r(498)" which is "Maximum number of iterations exceeded." Could you help me? Testing with "set matsiz" I saw that with "set matsiz 263" I got "matsize too small" and with "set matsiz 264" I got "maximum number of iterations exceeded". Does this mean that my model cannot be estimated with this technique?

    • @nomanarshed
      @nomanarshed  3 роки тому

      Use the following set matsize 11000

    • @DIEGOMARTINEZ-ow4kj
      @DIEGOMARTINEZ-ow4kj 3 роки тому

      @@nomanarshed If I execute "set matsize 11000" Stata reports me: "op. sys. refuses to provide memory". I'm going crazy @_@

    • @nomanarshed
      @nomanarshed  3 роки тому

      Your current model is too complicated to be estimated. For that either find a bigger machine or see how set mat size can be applied in your pc. What i usually do in this case is reduce the variables in the model or use any other

  • @phdscholar5618
    @phdscholar5618 4 роки тому

    Thank you so good effort,
    Sir, No need to find the same values one by one in excel here is a command to do it within seconds
    drop if date==date[_n-1]
    hope it will work.

    • @nomanarshed
      @nomanarshed  4 роки тому

      That command will remove the data but if we need it and date are wrong because of typo then we have to do it manually

    • @phdscholar5618
      @phdscholar5618 4 роки тому

      @@nomanarshed yes Sir you are right it does so but it is a good option for duplicates observation as we don't need them more.

    • @nomanarshed
      @nomanarshed  4 роки тому

      Yes. You suggesstion was good for data cleaning.

  • @salmabibi3833
    @salmabibi3833 4 роки тому +1

    great effort stay blessed

  • @kanchandatta4668
    @kanchandatta4668 9 місяців тому

    Pmg model will be better than mg model. Since the p value of Hausman statistic is 0.000 or less than 0.05.

    • @nomanarshed
      @nomanarshed  9 місяців тому

      Yes as disucssed in the paper of Blackburne and Frank

  • @kubraylmaz5021
    @kubraylmaz5021 3 роки тому

    hello can you help me? hausman test conclusion = chi2(10) = (b-B)'[(V_b-V_B)^(-1)](b-B)
    = -64.53 chi2 model fitted on these
    data fails to meet the asymptotic
    assumptions of the Hausman test;
    see suest for a generalized test
    what should I do?
    Good work

    • @nomanarshed
      @nomanarshed  3 роки тому +1

      Then happens when the hausman chi2 value is less than 0. For that do the test again by writing hausman re fe. Means write re model first

  • @smsm314
    @smsm314 4 роки тому +1

    Congratulations.

  • @temesgenfuri9875
    @temesgenfuri9875 3 роки тому

    I HAVE USED PMG MODEL TO REGRESS GDP ON ITS EXPLANATORY VARIABLES . BUT STATA 15 SAY THAT IT CANNOT ACCEPT MORE THAN 14 VARIABLES . WHAT SHALL I DO FOR REST EXPLANATORY VARIABLES

    • @nomanarshed
      @nomanarshed  3 роки тому

      PMG mode is not used for more than 5-7 variables. if you have more than that they try to make sub groups of variables and make separate model for each group or make indices for each subgroup and make one model.

  • @peternarh
    @peternarh 2 роки тому

    Hello, @Noman Arshed thank you for your informative video.
    I have a little challenge. Whenever I ran the codes for the PMG and the MG I have the following errors:
    "initial values not feasible"
    r(1400);
    "expression (-_b[var]/_b[L.var]) evaluates to missing" respectively.
    Can you please help me to overcome this?

    • @nomanarshed
      @nomanarshed  2 роки тому +2

      It means model for that specification is not converging. Reduce variables or change the model

    • @nir8325
      @nir8325 11 місяців тому

      @@nomanarshed i have 1 dependent and 6 independent variable . still got the same thing what should i do?

  • @aniksaha9925
    @aniksaha9925 2 роки тому

    In pmg, i get too many iteration upto 100, then "hessian has become unstable or asymmetric" appears

    • @nomanarshed
      @nomanarshed  2 роки тому

      You need to simplify the model andimit the iterations using help xtmg. If the problems is not solved then contact the author of the module

  • @cesartimb8311
    @cesartimb8311 3 роки тому

    hausman mg dfe, sigmamore
    estimation result dfe not found
    hello everyone. running the hausman test to choose between the mg and dfe, this is what i get. what can i do? thanks

    • @nomanarshed
      @nomanarshed  3 роки тому

      You have not estimated and stored dfe model yet

    • @selen7009
      @selen7009 2 роки тому

      DFE has to be in capital letters

  • @pasapasa3645
    @pasapasa3645 4 роки тому

    Thanks for video, really...

  • @mohammadazeemkhan7969
    @mohammadazeemkhan7969 3 роки тому

    I think you made some errors while running the hausman test, it is other way around.

  • @danielchinedu5300
    @danielchinedu5300 Рік тому

    Your screen is not visible enough

    • @nomanarshed
      @nomanarshed  Рік тому

      Please increase the video pixels in youtube. It will become visible

    • @nomanarshed
      @nomanarshed  Рік тому

      you can get the codes using ua-cam.com/video/7tCTaO2hGgY/v-deo.html