Dear users,
I am using Stata 15 and I have an unbalanced panel data set with time indicated by variable -year- and firms identified by -id-. Moreover, as shown below, my data set contains two variables -CSP_t_s_w- and -lag_IO_w-. Using Granger causality, I would like to test the for causality between the variables (both directions).
My dataet contains 23,097 observations and 3,077 panels.
I tried using -xtgcause-
However, the following occurs:
Does anyone know what I wrong? And anybody known how I can run a successful Granger causality test?
Thank you in advance.
I am using Stata 15 and I have an unbalanced panel data set with time indicated by variable -year- and firms identified by -id-. Moreover, as shown below, my data set contains two variables -CSP_t_s_w- and -lag_IO_w-. Using Granger causality, I would like to test the for causality between the variables (both directions).
My dataet contains 23,097 observations and 3,077 panels.
I tried using -xtgcause-
However, the following occurs:
Code:
. set matsize 11000 . xtgcause CSP_t_s_w lag_IO_w, lags(1) no observations r(2000);
Does anyone know what I wrong? And anybody known how I can run a successful Granger causality test?
Thank you in advance.
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input float year long id byte CSP_t_s_w float lag_IO_w 2000 1 1 .10273538 2001 1 2 .4753718 2002 1 11 .57919884 2003 1 8 .6090328 2004 1 9 .6398019 2005 1 12 .7047455 2006 1 12 .6007842 2007 1 12 .7196747 2008 1 12 .8020943 2009 1 12 .7530805 2010 1 11 .7809083 2011 1 10 .7956449 2012 1 4 .7915173 2005 3 0 .1929813 2006 3 1 .3637863 2007 3 1 .4739601 2008 3 1 .52113575 2009 3 1 .5178801 2010 3 0 .4741296 2011 3 0 .4554001 2012 3 0 .4432893 2003 5 0 .4057413 2004 5 2 .6909133 2005 5 2 .7740778 2006 5 2 .9303825 2009 5 2 .8186493 2010 5 0 .8578832 2003 7 1 .376464 2004 7 1 .3819983 2005 7 0 .445843 2006 7 0 .4561931 2007 7 0 .53831077 2008 7 0 .52190083 2009 7 0 .58483595 2010 7 0 .6472263 2011 7 0 .59393615 2012 7 0 .6134479 2002 8 1 .08887848 2003 8 0 .7499226 2004 8 0 .9177671 2005 8 0 .9694591 2006 8 0 .944322 2007 8 0 .8915893 2008 8 0 .935876 2009 8 0 .9408627 2010 8 1 .9994474 2011 8 1 .9193724 2012 8 0 .9837171 1991 9 5 .6455355 1992 9 6 .6606081 1993 9 6 .608819 1994 9 6 .4412391 1995 9 6 .51127815 1996 9 5 .3906025 1997 9 5 .442698 1998 9 3 .25791878 1999 9 4 .638057 2000 9 3 .6750889 2001 9 2 .4281542 2002 9 3 .5414144 2003 9 2 .6030415 2004 9 2 .6430176 2005 9 4 .7083326 2006 9 4 .7252894 2007 9 5 .7247008 2008 9 4 .6766716 2009 9 4 .6793423 2010 9 8 .7151029 2011 9 7 .6948657 2012 9 6 .6775908 2006 10 0 .276984 2007 10 0 .5215995 2008 10 0 .9288951 2009 10 0 .7196317 2010 10 0 .6809544 2007 12 0 .9596174 2009 12 0 .9458403 2011 12 0 .9803602 2009 13 1 .2162916 2010 13 0 .3018089 2004 14 1 .3291313 2005 14 0 .5344354 2006 14 1 .53080064 2007 14 1 .7165132 2008 14 1 .8001877 2009 14 1 .9331361 2010 14 0 .8769743 2011 14 0 .8963494 2012 14 2 .9074407 2006 15 4 .08887848 2007 15 4 .1131506 2008 15 4 .5344937 2009 15 4 .5535941 2010 15 0 .52943635 2002 16 0 .873021 2003 16 1 .8825788 2004 16 1 .838463 2006 16 1 .9327447 2007 16 1 .9886779 2008 16 1 .9203752 end label values id id2 label def id2 1 "A", modify label def id2 3 "AACC", modify label def id2 5 "AAI", modify label def id2 7 "AAON", modify label def id2 8 "AAP", modify label def id2 9 "AAPL", modify label def id2 10 "AATI", modify label def id2 12 "AAWW", modify label def id2 13 "ABAT", modify label def id2 14 "ABAX", modify label def id2 15 "ABBC", modify label def id2 16 "ABC", modify
Comment