When I run xtgls depvar indepvar...., panels(corr) corr(ar1) I get this error "year is not regularly spaced or does not have intervals of delta -- use the force option to treat the intervals as though they were regular " then I use force at the end but still shows this error "panels must be balanced". I have already used "xtset code year" to define it is a panel data.
There are no direct post estimation diagnostics available. what people have done is they generate the residuals and check manually like sktest for normality, AR1 equation based DW test for autocorrelation, BG test using squared residuals as dv for heteroskedasticity and adding estimated dependent squared in the model to check for RESET test. other tests include cross sectional dependence on residuals. etc
The panels(corr) is actually for timeseries correlation and it is applied on balanced data only. Try estimating driscoll and kraay regression which is robust to crosssectional regression.
How about to look for the R square on this FGLS ( xtgls depvar indepvar...., panels(corr) corr(ar1))? If there isn't what is to use for the replacement?
This is not a dynamic model so it does not require unit root and countegration test. In post estimation hetroscedasticity, autocorrelation and cross sectional dependence tests needed to be checked
Sir when I am running FGLS command with panels(correlated ) in stata 17 I am getting an error r(459) panels must be balanced my panel is already strongly balanced plz if you can help me
if stata says data is strongly balanced it only means that each cross section has equal number of years, but for data to be balanced you need to make sure there are no missing values in the data. some values can still be dropped if you had taken log to negative values.
Hello sir, how to correct heteroskedasticity and cross sectional dependence for unbalanced panel data? When I run xtgls depvar indepvar...., panels(correlated) corr(independent). I am getting error that "panels must be balanced". In my case N is 485 and T is 21. My data is highly unbalanced. It is not possible to interpolate. What to do?
XTGLS only helps in time series autocorrelation not the cross sectional autocorrelation (cross sectional dependence). In your case you should use Panel Corrected Standard Error Regression or Driscoll and Kraay regression.
Please if there is no cross sectional dependence, we still can use FGLS, and is ok to use it also while there is multicollinearity problem between two variable in the model?
FGLS model is only applicable for stationary data with no dependence. While all models are estimateable under moderate multicollinearity. It will make the estimates biased. One should check if multicollineairty is ignorable.
@@nomanarshed Thanks very much drNoman Arshed, now my data the dependent variable has no cross-sectional dependence, and my independent variable has cross-sectional dependence. in this case what can i do with FGLS model, Sorry to bother you. Jazzak Allah Dr..
hi sir i believe ill get a reply, My study is related to only one country and I have monthly data for 9 variables where 1 variable is dependent rest are independent please suggest me the methodology how to know the relationship for this time series data
What if there is only cross-sectional correlation (i.e., cross-sectional dependency) in the model without autocorrelation and heteroscedasticity, how can we fix that problem in this case?
@@nomanarshed what about just applying " xtgls y1 x1 x2" command? Don't you think it does solve cross-sectional dependency automatically in panel data?
@@nomanarshed "xtscc P1 MktRF SMB HML Mom D2 D3 D4 D5 D6" P1 is my dependent variable and Ds represent dummy variables. Can I use it that way then? Thank you
I get this error "year is not regularly spaced or does not have intervals of delta -- use the force option to treat the intervals as though they were regular". Time variable is from 2017 to 2021 and it has no gaps. I do not find any problem with column "year". Before that, I have used xtset id year to define panel data. Can you help me with this problem?
Try to use the solution in this video otherwise your year variables do not have common pattern, then in this case you cannot use time series regression, you can use time dummies in simple cross sectional regression. th-cam.com/video/H6hjYMxEAvU/w-d-xo.html
Cannot compare GMM is used to solve endogeneity and GMM is sensitive to heteroskedasticity. FGLS is used to make model robust to heteroskedasticity. Both models can be used in panel data.
@@nomanarshed Thanks for the reply sir. Can you please let me know what are the conditions to use FGLS over fe or re ? Can we also use industry dummy in FGLS?
@@nomanarshed Thank you for your informative videos. I believe for the FGLS model, T > N. I have a close similar question about choosing between the FGLS and ARDL models, given my data's characteristics (T > N, heteroskedasticity). Could you advise on criteria for selection, considering research objectives versus elimination criteria? Additionally, can the FGLS model be used when some variables are stationary at I(1) and I(0) and there is cointegration between them? I'm sorry if my question sounds basic to you. I am new to these types of models. I appreciate your insight.
When I run xtgls depvar indepvar...., panels(corr) corr(ar1) I get this error "year is not regularly spaced or does not have intervals of delta -- use the force option to treat the intervals as though they were regular
"
then I use force at the end but still shows this error "panels must be balanced". I have already used "xtset code year" to define it is a panel data.
th-cam.com/video/hMuMst3k1YQ/w-d-xo.html this video will help in filling gaps
Hello , After running the fgls model how can I do post estimation diagnostic tests? To check of the problems have been solved ?
There are no direct post estimation diagnostics available. what people have done is they generate the residuals and check manually like sktest for normality, AR1 equation based DW test for autocorrelation, BG test using squared residuals as dv for heteroskedasticity and adding estimated dependent squared in the model to check for RESET test. other tests include cross sectional dependence on residuals. etc
Hi Dr. Which result should we interpret after remove all problems? Is it the last output?
Yes . The output which has no problems
Thanks Dr.
Helpful video. My data is unbalanced panel and panels(corr) is not working. But there is cross-sectional correlation. What can I do?
The panels(corr) is actually for timeseries correlation and it is applied on balanced data only. Try estimating driscoll and kraay regression which is robust to crosssectional regression.
How about to look for the R square on this FGLS ( xtgls depvar indepvar...., panels(corr) corr(ar1))? If there isn't what is to use for the replacement?
In advanced methods, R squared is not a good criteria to judge the value of a model. Any ways, you can manually generate it by generating residuals.
Wat to do if we only have heteroscadetisity and auto correlation but no cross sectional dependence.
This FGLS model is suited for that. It does not work when cross sectional dependence is present
5339 Barton Extension
Hi, I used the code crest but it said “too many variables specified”. How can I deal with it? Thank you so much
Can you share the code here
is fgls model requires cointegration an unit root test, and what are the postestimation tests after running fgls model? thanks.
This is not a dynamic model so it does not require unit root and countegration test. In post estimation hetroscedasticity, autocorrelation and cross sectional dependence tests needed to be checked
@@nomanarshed thanks Dr. Noman, I appreciate your reply .
Sir when I am running FGLS command with panels(correlated ) in stata 17 I am getting an error r(459) panels must be balanced
my panel is already strongly balanced
plz if you can help me
if stata says data is strongly balanced it only means that each cross section has equal number of years, but for data to be balanced you need to make sure there are no missing values in the data. some values can still be dropped if you had taken log to negative values.
can we use xtgls with FE, i.e. i.year??
E.g.
xtgls depvar Indeptvars, fe
i.id for cross section FE and i.year for time FE can be used in xtgls.
584 Durgan Meadows
Hello sir, how to correct heteroskedasticity and cross sectional dependence for unbalanced panel data? When I run xtgls depvar indepvar...., panels(correlated) corr(independent). I am getting error that "panels must be balanced". In my case N is 485 and T is 21. My data is highly unbalanced. It is not possible to interpolate. What to do?
Please help me with problem
XTGLS only helps in time series autocorrelation not the cross sectional autocorrelation (cross sectional dependence). In your case you should use Panel Corrected Standard Error Regression or Driscoll and Kraay regression.
shared
@noman Arshed can we use FGLS... in case when no. of cross-sections are more than no. of time dimensions (N>T) ?
It is preferable when T>N but studies have used this model for N>T
@@nomanarshed Thanks for replying, then how we can justify in this case, coz both cases (N>T and T>N) are there in literature?
If it is a paper just add references. If it is a phd thesis you can do one more type of estimation for robutness analysis.
@@nomanarshed Thanks, it definitely helps.
Welcome
Interesting
Thanks !
You are welcome!
Can I use FGLS with Fixed effects at the same time?
Yes using LSDV method add dummies of your cross sections. It will make your model fixed effect.
Please if there is no cross sectional dependence, we still can use FGLS, and is ok to use it also while there is multicollinearity problem between two variable in the model?
FGLS model is only applicable for stationary data with no dependence. While all models are estimateable under moderate multicollinearity. It will make the estimates biased. One should check if multicollineairty is ignorable.
@@nomanarshed Thanks very much drNoman Arshed, now my data the dependent variable has no cross-sectional dependence, and my independent variable has cross-sectional dependence. in this case what can i do with FGLS model, Sorry to bother you.
Jazzak Allah Dr..
088 Nicolette Row
hi sir i believe ill get a reply, My study is related to only one country and I have monthly data for 9 variables where 1 variable is dependent rest are independent please suggest me the methodology how to know the relationship for this time series data
how many total months are there. You can explore this video for symptomatic selection of time series model th-cam.com/video/BspVpx0oHHY/w-d-xo.html
What if there is only cross-sectional correlation (i.e., cross-sectional dependency) in the model without autocorrelation and heteroscedasticity, how can we fix that problem in this case?
Significant cross sectional correlation is cross sectional dependence. In that case you should you driscoll kray model.
@@nomanarshed what about just applying " xtgls y1 x1 x2" command? Don't you think it does solve cross-sectional dependency automatically in panel data?
@@nomanarshed "xtscc P1 MktRF SMB HML Mom D2 D3 D4 D5 D6" P1 is my dependent variable and Ds represent dummy variables. Can I use it that way then? Thank you
Its documentation does not make it robust to any thing it this command. You need to add robustness after comma
Yes. This is the way to make robust for cs dependence
I get this error "year is not regularly spaced or does not have intervals of delta -- use the force option to treat the intervals as though they were regular". Time variable is from 2017 to 2021 and it has no gaps. I do not find any problem with column "year". Before that, I have used xtset id year to define panel data. Can you help me with this problem?
Try to use the solution in this video otherwise your year variables do not have common pattern, then in this case you cannot use time series regression, you can use time dummies in simple cross sectional regression. th-cam.com/video/H6hjYMxEAvU/w-d-xo.html
@@nomanarshed Thank you, I'm so grateful for that
241 Sammie Ports
is GMM better than FGLS? Whaat are the conditions where we can use GMM over FGLS?
Cannot compare GMM is used to solve endogeneity and GMM is sensitive to heteroskedasticity. FGLS is used to make model robust to heteroskedasticity. Both models can be used in panel data.
@@nomanarshed Thanks for the reply sir. Can you please let me know what are the conditions to use FGLS over fe or re ? Can we also use industry dummy in FGLS?
@@Ganieirfan FGLS is used when N > T and the data may have heteroskedasiticty and autocorrelation. FGLS has better ability to be robust against FE RE
@@nomanarshed Thank you for your informative videos. I believe for the FGLS model, T > N. I have a close similar question about choosing between the FGLS and ARDL models, given my data's characteristics (T > N, heteroskedasticity).
Could you advise on criteria for selection, considering research objectives versus elimination criteria? Additionally, can the FGLS model be used when some variables are stationary at I(1) and I(0) and there is cointegration between them?
I'm sorry if my question sounds basic to you. I am new to these types of models.
I appreciate your insight.