You are not logged in. You can browse but not post. Login or Register by clicking 'Login or Register' at the top-right of this page. For more information on Statalist, see the FAQ.
I find that your margins and marginsplot can only analyze the interaction of one categorical variable and continuous variable or two categorical variables. But I want to analyze the interaction of two continuous variables, how can I do?
I am sorry that the bug had significant effects on your results.
From your results, it seems that there are some issues primarily related to the variables offideputy and offdepdyn. But there is not much more I can say about that. While this is probably not satisfying, sometimes we may just have to live with some imperfection in our models. If you can justify your model specification on theoretical grounds, it might be acceptable to put less emphasis on the specification tests. This also depends on whether the troublesome variables are your main variables of interest or just some control variables. The specification tests then could tell us that we need to be cautious with the interpretation of our results. A perfect model may not exist given the available data.
Arellano-Bond test for autocorrelation of the first-differenced residuals
H0: no autocorrelation of order 1: z = -2.6878 Prob > |z| = 0.0072
H0: no autocorrelation of order 2: z = -0.7629 Prob > |z| = 0.4455
H0: no autocorrelation of order 3: z = 0.7649 Prob > |z| = 0.4444
.
. estat overid
Sargan-Hansen test of the overidentifying restrictions
H0: overidentifying restrictions are valid
collinearity check...
collinearities detected in [Y X] (right to left): 0o.offideputy#co.dynamics
collinearities detected in [Y X Z] (right to left): __alliv_51 __alliv_50 __alliv_49 __alliv_48 __alliv_47 __alliv_46 __alliv_45 __alliv_40
> __alliv_39 __alliv_37 __alliv_33 0o.offideputy#co.dynamics
collinearities detected in [X Z Y] (right to left): 2011.year 2010.year 2009.year 2008.year 2007.year 2006.year 2005bn.year 0o.offideputy#co
> .dynamics agee sex edu area
warning: collinearities detected, reparameterization may be advisable
Overidentification test: Kleibergen-Paap robust LIML-based (LM version)
Test statistic robust to heteroskedasticity and clustering on code
j= 19.93 Chi-sq( 25) p-value=0.7506
Underidentification test: Kleibergen-Paap robust LIML-based (LM version)
Test statistic robust to heteroskedasticity and clustering on code
j= 20.84 Chi-sq( 26) p-value=0.7501
From a programmer's perspective, factor variables and interaction terms are some of the nastiest animals in the Stata universe. They always find a way to escape your carefully designed algorithms. So it happened again with xtdpdgmm. There was unfortunately an annoying bug that could result in incorrect estimates when interaction terms were specified as instruments. I hopefully now managed to tame these animals once and for all with the latest bug fix.
Version 2.3.1 is now available on my personal website and on SSC (with the usual thanks to Kit Baum).
The underid command with option sw should normally provide you detailed underidentification statistics separately for each regressor. Did you not get those additional statistics? These might tell you for which coefficient there could be an identification problem. Everything else looks good.
Regarding your interaction effect, I believe the categorical variable can take on values 0 or 1, which is why you see separate coefficients. Effectively, you are estimating separate effects for the regressor z when x=0 and when x=1. Your lag specification seems to be alright.
Notice that your example made me aware of a bug in xtdpdgmm that could occur when interaction effects are specified in the list of instruments. I just fixed this bug in a new version that is now available on my personal website. I will make a separate accouncement once it is available on SSC as well.
Arellano-Bond test for autocorrelation of the first-differenced residuals
H0: no autocorrelation of order 1: z = -2.8390 Prob > |z| = 0.0045
H0: no autocorrelation of order 2: z = -0.5382 Prob > |z| = 0.5905
H0: no autocorrelation of order 3: z = 0.4724 Prob > |z| = 0.6366
.
. estat overid
Sargan-Hansen test of the overidentifying restrictions
H0: overidentifying restrictions are valid
collinearity check...
collinearities detected in [Y X] (right to left): 0o.offideputy#co.dynamics
collinearities detected in [Y X Z] (right to left): __alliv_52 __alliv_51 __alliv_50 __alliv_49 __alliv_48 __alliv_47 __alliv_46 __alliv_41
> __alliv_40 __alliv_38 __alliv_34 0o.offideputy#co.dynamics
collinearities detected in [X Z Y] (right to left): 2011.year 2010.year 2009.year 2008.year 2007.year 2006.year 2005bn.year 0o.offideputy#co
> .dynamics agee sex edu area
warning: collinearities detected, reparameterization may be advisable
Overidentification test: Kleibergen-Paap robust LIML-based (LM version)
Test statistic robust to heteroskedasticity and clustering on code
j= 16.32 Chi-sq( 26) p-value=0.9283
Underidentification test: Kleibergen-Paap robust LIML-based (LM version)
Test statistic robust to heteroskedasticity and clustering on code
j= 34.95 Chi-sq( 27) p-value=0.1400
what's wrong with it? Another question: when the lag of one categorical variable times the lag of another continuous varible, the code is l.x#cl.z(x is categorial, z is continuous), the outcome has two lines of results, line 0 and line 1. What's the meaning? How do I specify the lag of one categorical variable times the lag of another continuous variable?
Thanks. I have some other doubts. Among the serial correlation test, overidentification test, incremental overidentification test, and underidentification test, the former three tests are very easy to pass, however, the underidentification test is very difficult to (even always not)pass,why? What's more,changing the order of the lag of the instruments will lead to largely vary in the underidentification test, but not vary in the former three tests,why?
Hello,why the serial correlation test and the overidentificaton test are easy to pass, while the underidentification test is difficult to pass? What are main possible resons?
Notice that for the underidentification test the null hypothesis is that the model is indeed underidentified. Therefore, you actually want to reject the null hypothesis.
For the overidentification test, the null hypothesis is that the model is correctly specified. Therefore, here you do not want to reject the null hypothesis.
If the model is underidentified, then the overidentification tests may not be very reliable because they rely on the maintained assumption that there are at least as many valid instruments available as is needed to identify all coefficients.
Hello,why the serial correlation test and the overidentificaton test are easy to pass, while the underidentification test is difficult to pass? What are main possible resons?
It is correct that xtdpdgmm does not do anything to specifically address cross-sectional dependence. Time dummies can account for cross-sectional dependence due to common shocks assuming homogeneity of the effects of these shocks across units. Any other variables that are constant across units but vary over time become redundant in the presence of time dummies, unless you create interaction terms of these common-shock variables with variables that vary across units. The latter could be away to approximate heterogenous effects of common shocks conditional on observed variables. Obviously, all of this is more restrictive than other approaches for large-N, large-T panel models with common factors / interactive fixed effects, but xtdpdgmm is primarily intended for small-T data.
I am using xtdpdgmm for my research. As far as i know xtdpdgmm (and gmm estimation in general) does not account for cross sectional dependency.
My data (maybe most of the panel data) suffers from cross sectional dependency and i tried to use extra variables to capture time varying common factors across cross sections to eliminate this problem. But later i realised that we are already using time dummies as regressors with the teffects option (or manually). Since (strong) cross-sectional dependence arise from time varying common shocks, aren't we eliminating it by adding year dummies as regressors? Will any other extra variables to capture time varying common shocks other than time dummies be redundant in this occasion?
Leave a comment: