(Stata13):Determine Optimal Lag Selection

  Рет қаралды 33,971

CrunchEconometrix

CrunchEconometrix

Күн бұрын

Пікірлер: 128
@CrunchEconometrix
@CrunchEconometrix 6 жыл бұрын
KZbin 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, help me stay online.
@bobrs94
@bobrs94 4 жыл бұрын
Thank you so much for these videos! They are extreme helpful for understanding some topics that I'm currently learning at the Master's Degree in Economics, regards from Mexico!
@CrunchEconometrix
@CrunchEconometrix 4 жыл бұрын
Glad you like them, Rafa! Much love from Nigeria!
@samo6391
@samo6391 5 ай бұрын
Thank you for this lecture. Crystal clear and straight to the point. easy to understand
@CrunchEconometrix
@CrunchEconometrix 5 ай бұрын
U're welcome.
@sweetyvale7102
@sweetyvale7102 6 ай бұрын
very informative and clear as crystal, more of this, thank you very much
@CrunchEconometrix
@CrunchEconometrix 6 ай бұрын
Glad to hear this... deeply appreciated 🙏🥰
@syedamarjanarazzak5130
@syedamarjanarazzak5130 3 жыл бұрын
omg! thank you so much Ma'am, it was really helpful. Subscribed.
@CrunchEconometrix
@CrunchEconometrix 3 жыл бұрын
I appreciate your subscription, thanks a lot!
@presak4438
@presak4438 Жыл бұрын
You are really good. Thank you
@CrunchEconometrix
@CrunchEconometrix Жыл бұрын
Thanks so much for your encouraging words, deeply appreciated 🥰🙏
@stephendavis2592
@stephendavis2592 4 жыл бұрын
Very helpful, Thank you very much!!
@CrunchEconometrix
@CrunchEconometrix 4 жыл бұрын
Thanks for the encouraging words, Stephen. Deeply appreciated! Please may I know from where (location) you are reaching me?
@meganlydon1372
@meganlydon1372 3 жыл бұрын
Thank you so much for this video! Is there a similar command to varsoc for panel data? Or is there a rule of thumb about selecting lags for monthly data with repeated measures? Many thanks!
@CrunchEconometrix
@CrunchEconometrix 3 жыл бұрын
Hi Megan, but I gave the guide to selecting lags for different time series.
@meriemgharsallah2692
@meriemgharsallah2692 3 жыл бұрын
Hi Madam, I have to thank you first for your helpful videos. I am estimating a panel data set through FMOLS and I need to check the stationarity of all variables so i've one question: How to determine the lag length in panel data? help me, please
@CrunchEconometrix
@CrunchEconometrix 3 жыл бұрын
Hi Meriem, thanks for the encouraging feedback, deeply appreciated! Use pvarsoc syntax in Stata.
@rachelzoaka
@rachelzoaka 5 ай бұрын
Hello Professor. Please do you have a detailed video on the cusum and cusum squared test for stability?
@CrunchEconometrix
@CrunchEconometrix 5 ай бұрын
I did them in some of my ARDL videos.
@phuongthaotran8183
@phuongthaotran8183 20 күн бұрын
Hi. I use the annual data but the result I got is lag = 4. The number of obs is just 33. Is this still okay? Or I have to decrease the lag to 1 or 2? Hopefully to get the reply from you soon!
@CrunchEconometrix
@CrunchEconometrix 17 күн бұрын
You can use 1 lag and put a note in your work explaining why: "to avoid losing observations and degrees of freedom."
@samsonmayaka7896
@samsonmayaka7896 3 жыл бұрын
very well explained, what if we used the log form of the variables , would it affect our decision?
@CrunchEconometrix
@CrunchEconometrix 3 жыл бұрын
Try it to see the outcomes.
@aburahif1402
@aburahif1402 3 жыл бұрын
How to determine optimal lag in panel data in STATA? Can anyone help me?
@CrunchEconometrix
@CrunchEconometrix 3 жыл бұрын
Hi Shaws, watch my panel ARDL videos on what to do.
@aburahif1402
@aburahif1402 3 жыл бұрын
Sure and thank a ton Ma’am. 😊
@yizzi25
@yizzi25 6 жыл бұрын
Thank you so much for a great video. It helped me out a lot!
@CrunchEconometrix
@CrunchEconometrix 6 жыл бұрын
Thanks for your comments, Yasser. Humbly appreciated! I'll be glad if you can help share the link to my KZbin channel with your friends, students and colleagues☺️
@littlerathful
@littlerathful 4 жыл бұрын
Hi, thank you for the video. It is very helpful. I have one question. I am doing the prediction using autoregressive model so I am now selecting the lag order using AIC. Should I use varsoc variableX or lnx or dlnx? When I did my ADF test, I used dlnx so I tried using varsoc dlnx but it turned out to be 0 lag. so I am a bit confused. Looking forward to your feedback.
@CrunchEconometrix
@CrunchEconometrix 4 жыл бұрын
Hi Sorik, thanks for the encouraging feedback. Deeply appreciated! It is advisable you use the form of the variable you intend using for analysis. Thanks.
@ahlemouhibi3582
@ahlemouhibi3582 2 жыл бұрын
Thanks for your viedo it,s so interesting i want to ask you two questions please and i need your answer : there you choose the maxium lags for each variables as we can used to ADF test and other unit root tests ? then in my case i found that 4 variables have the lowest values in the SBIC but the last variable has the lowest value in AIC so what can i do please??
@CrunchEconometrix
@CrunchEconometrix 2 жыл бұрын
Hi Ahlem, you can either stick to uniformity or use different criterion as related to each variable. Remember, to put in a note to explain what you did in your work.
@economics-for-beginners3583
@economics-for-beginners3583 Жыл бұрын
Can you use "varsoc GDP", for instance, when performing the ADF unit root test?
@CrunchEconometrix
@CrunchEconometrix Жыл бұрын
"Varsoc" is used to obtain the optimal lag length. You may then decide to incorporate the lag length when performing the ADF test.
@economics-for-beginners3583
@economics-for-beginners3583 Жыл бұрын
@@CrunchEconometrix Many thanks again for your kind reply. One additional question - suppose we want to make the series stationary. In STATA I define a variable dGDP = d.GDP, where dGDP is the first difference. Is it necessary to execute the varsoc command (varsoc dGDP), determine the lag length first, and then perform the unit root test on dGDP? I personally do not think that lags need to be specified when performing the unit root test on first-differenced variable(s). I tried, and both AIC and SBIC indicate 0 lag for the variable GDP. Second, do we use the varsoc command in the same way when performing the PP test? Thank you very much again.
@CrunchEconometrix
@CrunchEconometrix Жыл бұрын
You may want to follow the steps indicated in my Time Series videos for better understanding. Thanks
@projectbraap3218
@projectbraap3218 5 жыл бұрын
Hi! Thanks for another great video. I was wondering if you can use the varsoc command on any variable before performing an ADF test on that variable. Hence, can I determine optimal lag length for ADF using varsoc? Thanks in advance. Your videos have been very helpful
@CrunchEconometrix
@CrunchEconometrix 5 жыл бұрын
Hi Braap, you mixed up your queries but I get the point....yes, perform the varsoc command on variables not on the ADF (test for unit root).
@chimukamondemulala
@chimukamondemulala 2 жыл бұрын
Thank you so much for your videos! I have one question though it's not really related to this. How do you validate a simple linear model in Stata? I'm a new user.
@CrunchEconometrix
@CrunchEconometrix 2 жыл бұрын
Hi Chimuka, the model's diagnostics are used for validation. Kindly read up on them. Several resources available online. Thanks
@chimukamondemulala
@chimukamondemulala 2 жыл бұрын
@@CrunchEconometrix Thank you so much Dr!
@deeg1385
@deeg1385 4 жыл бұрын
Thank you Prof
@CrunchEconometrix
@CrunchEconometrix 4 жыл бұрын
Hi Darcy, you are welcome! ❤️
@user-jz4bw7gw4u
@user-jz4bw7gw4u Жыл бұрын
For a panel data, which one should be used to determine the proper lags?
@CrunchEconometrix
@CrunchEconometrix Жыл бұрын
Your query is unclear. Kindly recast.
@MA-pc3wu
@MA-pc3wu 3 жыл бұрын
What does it mean if my annual time series data shows optimum lag length 3 for my model? I have 5 independent variables.
@CrunchEconometrix
@CrunchEconometrix 3 жыл бұрын
It implies that is the optimal lag length to use.
@irinahaque5183
@irinahaque5183 Жыл бұрын
Miss, I am working with panel data of 49 countries with 108 months and want to run pmg model in Stata. Can you explain how to select optimal lag for panel data for pmg estimation of dependent and independent variables?
@CrunchEconometrix
@CrunchEconometrix Жыл бұрын
Kindly watch my videos on panel ARDL. Detailed enough to guide you. Stata code for lag selection is shown in the video. Thanks.
@irinahaque5183
@irinahaque5183 Жыл бұрын
Thanks Miss. I just have checked. It's really helpful.
@kailin3346
@kailin3346 4 жыл бұрын
Hi professor Thanks for your great efforts! I have two quick questions: 1. If the criterion says the optimal lag is one, can I use one lag in vecm? Since the lag will then reduce to zero, which is not desirable. 2. How can I select the optimal lag length for ADF test? Can I use the varsoc command? Thank you in advance!
@CrunchEconometrix
@CrunchEconometrix 4 жыл бұрын
Hi Kai, thanks for the encouraging words and feedback. Deeply appreciated! (1) retain the one lag; (2) Yes.
@kailin3346
@kailin3346 4 жыл бұрын
@@CrunchEconometrix Thank you so much!
@prabirghosh5015
@prabirghosh5015 5 жыл бұрын
Thank you very much for your work. please tell me for optimum lag selection will I use the variable in their level form or level transform form i.e. log form?
@CrunchEconometrix
@CrunchEconometrix 5 жыл бұрын
Either is applicable depending on if you are estimating a level or log regression.
@jackmurphy2403
@jackmurphy2403 5 жыл бұрын
Hi, thanks for the video! When I try to use varsoc I get the error message 'repeated time values in sample' since I have a number of observations from the same years but different countries. I have tried to fix this through differentiating each year e.g. 2009a, 2009b etc. and have used this as my time variable to declare the dataset as timeseries. However, now when I run varsoc I get the error message 'no observations'. Can you help?
@CrunchEconometrix
@CrunchEconometrix 5 жыл бұрын
Hi Jack, thanks for the positive feedback on my videos. Deeply appreciated! The mistake you made is that you are using a time series syntax for panel data. The varsoc syntax is for TS analysis and not PD. Watch my well-explained videos on panel ARDL. You'll be glad you did.
@surajsheth3214
@surajsheth3214 4 жыл бұрын
Hi, thanks for the video. I thought when you use varsoc, you must do so on the differenced variables? (i.e. dgdp, dpce, dpdi rather than gdp, pce and pdi) And if, you apply the varsoc command on the differenced variables, how much difference will this make to the outcome of the AIC, HQUIC and SBIC results?
@CrunchEconometrix
@CrunchEconometrix 4 жыл бұрын
Hi Suraj, the "varsoc" can be applied to all forms of a variable. You'll have to find out the outcomes on the information criteria when you execute the command. It's impossible for me to tell you the precise outcome. Please may I know from where (location) you are reaching me?
@sabashah1160
@sabashah1160 2 жыл бұрын
Please show how to select lag length in panel ARDL model. I dnt get it straight from this vedio
@CrunchEconometrix
@CrunchEconometrix 2 жыл бұрын
Hi Saba, this video is very clear and well explained. You may want to watch it again. Thanks.
@sabashah1160
@sabashah1160 2 жыл бұрын
@@CrunchEconometrix mam it is. But as naive it’s hard for me to get the idea of how to select lags in model. Can u please enlighten me
@CrunchEconometrix
@CrunchEconometrix 2 жыл бұрын
I advise you watch the clip again to get the explanation.
@fuzhufeifei
@fuzhufeifei 5 жыл бұрын
Dear Professor, I'm using ARDL method. Is it preferred to test optimal lag order for individual variables?
@CrunchEconometrix
@CrunchEconometrix 5 жыл бұрын
Hi Cherry, yeah absolutely. It's one of the pre-estimation procedure.
@meriawazhipehchaanhai...6821
@meriawazhipehchaanhai...6821 4 жыл бұрын
@@CrunchEconometrix mam at the time of selecting optimal lag is there any condition that variables must be stationary
@CrunchEconometrix
@CrunchEconometrix 4 жыл бұрын
Hi Meena, time series analysis requires the use of stationary or integrated series.
@meriawazhipehchaanhai...6821
@meriawazhipehchaanhai...6821 4 жыл бұрын
@@CrunchEconometrix mam i mean in ARDL we first of all select optimal lag. for this optimal lag we go to estimate VAR then put variables in it. than what should be the integration order of the variables to select optimal lag for ARDL. Is this requires variables stationarity before ARDL.
@CrunchEconometrix
@CrunchEconometrix 4 жыл бұрын
Meena, kindly watch my ARDL videos. They are well explained. Thanks.
@sibylla553
@sibylla553 2 жыл бұрын
My criterion yielded both positive and negative results. Which one should I choose? Thank you ☺️
@CrunchEconometrix
@CrunchEconometrix 2 жыл бұрын
Hi Bylla, I'm unable to understand your question. Kindly rephrase.
@sibylla553
@sibylla553 2 жыл бұрын
@@CrunchEconometrix it's now fixed, thanks
@CrunchEconometrix
@CrunchEconometrix 2 жыл бұрын
Glad to hear 🙏
@madinabunje3960
@madinabunje3960 3 жыл бұрын
Maam thanks so much for your videos. based on basis on optimal lags for annual data, i used varsoc for a variable and the optimal lag was 4 instead of 2 provided my data set is 30 in number. what can i do with this variable?
@CrunchEconometrix
@CrunchEconometrix 3 жыл бұрын
With 30 obs, estimate with 1 or 2 lags and put a note in your work explaining why.
@daily_unknown-g
@daily_unknown-g 3 жыл бұрын
@@CrunchEconometrix Hello maam. I really appreciate your videos. I have the same trouble where the optimal lag is 4 instead of 2 for yearly data, and my data set only 12. Should i estimate with 1 or 2 lag and put a reason note, and if yes can you give me some ideas about what to write on the reason note. Thank you so much.
@CrunchEconometrix
@CrunchEconometrix 3 жыл бұрын
No reasonable time series analysis can be conducted with 12 observations. Increase to at least 30 years.
@tinaeriksen2075
@tinaeriksen2075 4 жыл бұрын
Hi! You mention yearly, quarterly and monthly, but how many lags do you usually use for daily data? :) Thanks
@CrunchEconometrix
@CrunchEconometrix 4 жыл бұрын
Hi Tina, use up to 365.
@oumaimadh254
@oumaimadh254 4 жыл бұрын
hello sir plz do for us a video ow to determine optimal lags in Stata (ARDL PANEL)
@CrunchEconometrix
@CrunchEconometrix 4 жыл бұрын
Hi Oumaina, thanks for the suggestion but I covered that already in my PANEL ARDL video series. Kindly watch them. Regards.
@akhliddinismailov3766
@akhliddinismailov3766 4 жыл бұрын
Professor, how do you think about other lag selection methods? Are they applicable for ARDL ? What about 4 lags for quarterly data?
@CrunchEconometrix
@CrunchEconometrix 4 жыл бұрын
Yes, 4 lags is ok. Though EViews assigns automatic lags during estimation.
@brijeshyadav3553
@brijeshyadav3553 4 жыл бұрын
thank you, mam, I have a question what are the guidelines for LR criteria for selecting the optimum lag length ????
@CrunchEconometrix
@CrunchEconometrix 4 жыл бұрын
I never used the LR. You may need to check other online resources for more information. Thanks.
@brijeshyadav3553
@brijeshyadav3553 4 жыл бұрын
@@CrunchEconometrix thanks mam
@francisowino6985
@francisowino6985 5 жыл бұрын
hello, how are lags applicable in the ARDL model? Do we use different lags for each of the variable?
@CrunchEconometrix
@CrunchEconometrix 5 жыл бұрын
Hi Francis, you can read the essence of lags from basic econometrics textbooks and watch my ARDL videos on the practical application...may I know from where (location) you are reaching you?
@alessandrocremaschini414
@alessandrocremaschini414 6 жыл бұрын
Hi, you ran varsoc with three variables "jointly" and then for each one, how should interpret different results as you get? I mean, in the first example you get 2 optimal lag lenght but for pce just two.(in my monthly data i've got just 1 or two lags)
@CrunchEconometrix
@CrunchEconometrix 6 жыл бұрын
Hi girl, this video explains optimal lag selection if your estimating either a VAR or ARDL model. Remember that for a VAR model all the variables take the same number of lags, hence in the case it is the "optimal lag for the model" that is determined and not for the variables. So the code will be "varsoc y, x1, x1". For ARDL model, "the variable optimal lags" will be determined individually, that is "varsoc y", "varsoc x1", "varsoc x2". Interpretations are are explained in the video.
@alessandrocremaschini414
@alessandrocremaschini414 6 жыл бұрын
Thank you for your reply: i think i’m wrong ‘cause i’m just deciding how many lags to use in the adf test.
@badiahahmed2085
@badiahahmed2085 4 жыл бұрын
@@CrunchEconometrix thank you very much for your useful video, I have a question please, I'm using panel ARDL and I have followed all your panel ARDL videos. However, after I have applied the optimal lags command, the command: xtpmg d.RGDP d.lnFDX d.lnINF d.lnGOV d.lnGFCF d.lnTRD, lr(l.RGDP 2.lnFDX 1.lnINF lnGOV lnGFCF lnTRD) ec(ECT) replace pmg with optimal lags doesn't work!? How we can apply this command with the optimal lags for example with lag 2 for FDX and lag 1 foe INF variables? Thanks
@fuzhufeifei
@fuzhufeifei 5 жыл бұрын
My second questions is that I tried to test the optimal lags for the whole model, putting all the variables in one command. However, Stata says that: matsize too small. You have attempted to create a matrix with too many rows or columns or attempted to fit a model with too many variables. You need to increase matsize; it is currently 400. Use set matsize; see help matsize. I increased it to 1000. Then I got results. But the table is missing a lot results. So I'm thinking that if it is ok to use test individual lag orders then I will use this method instead of putting all variables in one command. I'm using ARDL model. Does professor have any suggestion?
@CrunchEconometrix
@CrunchEconometrix 5 жыл бұрын
My advice: test individually.
@nomaswazinkosi8918
@nomaswazinkosi8918 4 жыл бұрын
Hi I have two questions if you could please assist me. 1. How do I derive a short run multiplier of yt+1 with respect to Xt, i.e dYt+1/dXt for a finite distributed lag model yt=1,78 +0.75Xt +0.2Xt-1 +0,35Yt-1. 2.how do l show and explain that as k→∞, dYt+k/dXt →0. Please help, thank you.
@CrunchEconometrix
@CrunchEconometrix 4 жыл бұрын
Hi Nomaswazi, you will have to refer to the textbook where this topic in time series is covered. Thanks.
@nomaswazinkosi8918
@nomaswazinkosi8918 4 жыл бұрын
@@CrunchEconometrix thanks
@nomaswazinkosi8918
@nomaswazinkosi8918 4 жыл бұрын
@@CrunchEconometrix hi, do have any textbooks you can recommend?
@CrunchEconometrix
@CrunchEconometrix 4 жыл бұрын
@@nomaswazinkosi8918 I always recommend: Introductory Econometrics by Wooldridge and Basic Econometrics by Gujarati.
@nomaswazinkosi8918
@nomaswazinkosi8918 4 жыл бұрын
@@CrunchEconometrix thank you so much.
@mrzadocknanyaro7584
@mrzadocknanyaro7584 4 жыл бұрын
what does it mean when the aic, bic, sbic, or hqic has an asteriks sign to it ?
@CrunchEconometrix
@CrunchEconometrix 4 жыл бұрын
Those are the optimal lag length for the respective information criteria.
@armenkaprelian
@armenkaprelian 3 жыл бұрын
thank you :)
@CrunchEconometrix
@CrunchEconometrix 3 жыл бұрын
You are welcome, Armen😊
@ghadaommezzine3065
@ghadaommezzine3065 5 жыл бұрын
How can i determine optimal lag for panel data ? i applied the command which you are cited in the step 5 (panel ARDL estimation steps 5 to7 but he has no result .
@CrunchEconometrix
@CrunchEconometrix 5 жыл бұрын
Hi Ghada, you should get something. What error message did you receive?
@ghadaommezzine3065
@ghadaommezzine3065 5 жыл бұрын
@@CrunchEconometrix program error: code follows on the same line as open brace
@CrunchEconometrix
@CrunchEconometrix 5 жыл бұрын
The error is from you. Better to use my dofile. Available on my website.
@ghadaommezzine3065
@ghadaommezzine3065 5 жыл бұрын
@@CrunchEconometrix i used the code egain but "invalid syntax"
@CrunchEconometrix
@CrunchEconometrix 5 жыл бұрын
@@ghadaommezzine3065 You have to install the ardl syntax.
@ivankiryewala814
@ivankiryewala814 6 жыл бұрын
How do you treat a model where you have dependent and independent variables??!
@CrunchEconometrix
@CrunchEconometrix 6 жыл бұрын
Hi Ivan, pls clarify ur query bcos a model should have both depvar and explvar.
@ivankiryewala814
@ivankiryewala814 6 жыл бұрын
@@CrunchEconometrix i was meaning. Do all variables have to be dependent while running varsoc
@CrunchEconometrix
@CrunchEconometrix 6 жыл бұрын
@@ivankiryewala814 Yes
@ivankiryewala814
@ivankiryewala814 6 жыл бұрын
@@CrunchEconometrix can i ask why because stata provides for independent variables too. I tried to find the lag length independently for each variable and then for the model where all variables were dependent. It turns out that the lag length of the model is very much dictated by that of the variable with the most lags.. When i tried to run a VECM using that lag order. There was multicollinearity through out the model upto lag 6..
@CrunchEconometrix
@CrunchEconometrix 6 жыл бұрын
@@ivankiryewala814 All I'll say is that you can decide to follow my procedure any run your analysis but if you have another way, then you can use that too.
@ashnagangoo6728
@ashnagangoo6728 6 жыл бұрын
Hello, do we follow same command for panel dataset?
@CrunchEconometrix
@CrunchEconometrix 6 жыл бұрын
Not a all. It's a different procedure for panel data. I have a video on that. Watch the videos on "Panel ARDL Estimations"
@ashnagangoo6728
@ashnagangoo6728 6 жыл бұрын
Many thanks i got the command
Magic or …? 😱 reveal video on profile 🫢
00:14
Andrey Grechka
Рет қаралды 85 МЛН
这三姐弟太会藏了!#小丑#天使#路飞#家庭#搞笑
00:24
家庭搞笑日记
Рет қаралды 124 МЛН
POV: Your kids ask to play the claw machine
00:20
Hungry FAM
Рет қаралды 15 МЛН
Basic Time Series in Stata: Finite Distributed Lag Models
17:29
Mike Jonas Econometrics
Рет қаралды 10 М.
Panel VAR in R
11:59
Justin Eloriaga
Рет қаралды 14 М.
Performing Bounds Test from ARDL in Stata
11:25
Excelling with Naomi
Рет қаралды 9 М.
VAR model in stata Part 1
21:10
JDEConomics
Рет қаралды 51 М.
Time Series Model Selection (AIC & BIC) : Time Series Talk
9:42
Magic or …? 😱 reveal video on profile 🫢
00:14
Andrey Grechka
Рет қаралды 85 МЛН