# st: xi: reg or xi: areg - yield different results in the constant term

 From Kaspar Dardas <[email protected]> To [email protected] Subject st: xi: reg or xi: areg - yield different results in the constant term Date Thu, 14 Jan 2010 11:55:36 +0100

Hi statalisters,

I wan to run a multivariate regression on panel data with dummy
variables which control for years & sectors. Some sectors repeat
multiple times in the same year (thus
I am not able to tsset this panel data set- Stata give me an error message).

To control for the year and sector (firm) effects I tried all of the
approaches below. In (1) I simply use dummies for years and sectors,
in (2) I absorb sectors, in (3) I absorb years.
My problem is that the "constant" , as well as its t-value  for each
of the three approaches is totally different (please see below). Why
is this? (Sorry, for this naive question but I am
extremely confused by this)? Shouldn't "areg XXXXXX, absorb()" yield
in the same results as xi with two dummy variables?

My second question:
Is there maybe any other method that I could use to absorb both year
and sector? My goal is actually not to show any of the regression
results for year AND sector.
I couldn't find anything on statalist.

(1) xi: reg CAR1 INSIDER_B INSIDER_C INSIDER_D MULTIPLE_TRADE
TRANSACTION_SIZE MARKET_CAPITALIZATION i.year i.sector , robust

(2) xi: areg CAR1 INSIDER_B INSIDER_C INSIDER_D MULTIPLE_TRADE
TRANSACTION_SIZE MARKET_CAPITALIZATION i.year, absorb(sector) robust

(3) xi: areg CAR1 INSIDER_B INSIDER_C INSIDER_D MULTIPLE_TRADE
TRANSACTION_SIZE MARKET_CAPITALIZATION i.sector, absorb(year) robust

Cheers,

Kaspar

. xi: reg CAR1 INSIDER_B INSIDER_C INSIDER_D MULTIPLE_TRADE
TRANSACTION_SIZE MARKET_CAPITALIZATION i.year i.sector , robust
i.year            _Iyear_2003-2009    (naturally coded; _Iyear_2003 omitted)
i.sector          _Isector_10-55      (naturally coded; _Isector_10 omitted)

Linear regression                                      Number of obs =    1159
F( 21,  1137) =    6.14
Prob > F      =  0.0000
R-squared     =  0.1283
Root MSE      =  .12156

------------------------------------------------------------------------------
|               Robust
CAR1 |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
INSIDER_B |   .0497534   .0168007     2.96   0.003     .0167895    .0827173
INSIDER_C |    -.00264   .0078899    -0.33   0.738    -.0181203    .0128403
INSIDER_D |  -.0178614    .014155    -1.26   0.207    -.0456343    .0099115
MULTIPLE_T~E |   .0284563   .0079939     3.56   0.000     .0127718    .0441408
TRANSACTIO~E |   .0185318   .0048029     3.86   0.000     .0091082    .0279554
MARKET_CAP~N |  -.0012736   .0002546    -5.00   0.000     -.001773   -.0007741
_Iyear_2004 |  -.0336727   .0227413    -1.48   0.139    -.0782923    .0109469
_Iyear_2005 |  -.0238509   .0191565    -1.25   0.213     -.061437    .0137352
_Iyear_2006 |   .0167628   .0196738     0.85   0.394    -.0218383    .0553639
_Iyear_2007 |  -.0168189   .0184682    -0.91   0.363    -.0530545    .0194167
_Iyear_2008 |  -.0097824   .0182258    -0.54   0.592    -.0455423    .0259776
_Iyear_2009 |   .0543204   .0216637     2.51   0.012     .0118152    .0968256
_Isector_15 |  -.0082766   .0159886    -0.52   0.605     -.039647    .0230939
_Isector_20 |   .0013996   .0153361     0.09   0.927    -.0286907    .0314899
_Isector_25 |  -.0389013   .0129421    -3.01   0.003    -.0642944   -.0135082
_Isector_30 |  -.0495209   .0181734    -2.72   0.007     -.085178   -.0138637
_Isector_35 |   .0050161   .0194823     0.26   0.797    -.0332093    .0432415
_Isector_40 |   -.048742   .0138493    -3.52   0.000     -.075915    -.021569
_Isector_45 |  -.0007909   .0151398    -0.05   0.958    -.0304959    .0289142
_Isector_50 |   .0048057     .04511     0.11   0.915    -.0837026     .093314
_Isector_55 |  -.0679753   .0213536    -3.18   0.001    -.1098721   -.0260784
_cons |   .0499989   .0220629     2.27   0.024     .0067103    .0932874

. xi: areg CAR1 INSIDER_B INSIDER_C INSIDER_D MULTIPLE_TRADE
TRANSACTION_SIZE MARKET_CAPITALIZATION i.year, absorb(sector) robust
i.year            _Iyear_2003-2009    (naturally coded; _Iyear_2003 omitted)

Linear regression, absorbing indicators                Number of obs =    1159
F( 12,  1137) =    7.22
Prob > F      =  0.0000
R-squared     =  0.1283
Root MSE      =  .12156

------------------------------------------------------------------------------
|               Robust
CAR1 |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
INSIDER_B |   .0497534   .0168007     2.96   0.003     .0167895    .0827173
INSIDER_C |    -.00264   .0078899    -0.33   0.738    -.0181203    .0128403
INSIDER_D |  -.0178614    .014155    -1.26   0.207    -.0456343    .0099115
MULTIPLE_T~E |   .0284563   .0079939     3.56   0.000     .0127718    .0441408
TRANSACTIO~E |   .0185318   .0048029     3.86   0.000     .0091082    .0279554
MARKET_CAP~N |  -.0012736   .0002546    -5.00   0.000     -.001773   -.0007741
_Iyear_2004 |  -.0336727   .0227413    -1.48   0.139    -.0782923    .0109469
_Iyear_2005 |  -.0238509   .0191565    -1.25   0.213     -.061437    .0137352
_Iyear_2006 |   .0167628   .0196738     0.85   0.394    -.0218383    .0553639
_Iyear_2007 |  -.0168189   .0184682    -0.91   0.363    -.0530545    .0194167
_Iyear_2008 |  -.0097824   .0182258    -0.54   0.592    -.0455423    .0259776
_Iyear_2009 |   .0543204   .0216637     2.51   0.012     .0118152    .0968256
_cons |   .0321451   .0183156     1.76   0.080     -.003791    .0680812
-------------+----------------------------------------------------------------
sector |   absorbed                                      (10 categories)
. xi: areg CAR1 INSIDER_B INSIDER_C INSIDER_D MULTIPLE_TRADE
TRANSACTION_SIZE MARKET_CAPITALIZATION i.sector, absorb(year) robust
i.sector          _Isector_10-55      (naturally coded; _Isector_10 omitted)

Linear regression, absorbing indicators                Number of obs =    1159
F( 15,  1137) =    5.87
Prob > F      =  0.0000
R-squared     =  0.1283
Root MSE      =  .12156

------------------------------------------------------------------------------
|               Robust
CAR1 |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
INSIDER_B |   .0497534   .0168007     2.96   0.003     .0167895    .0827173
INSIDER_C |    -.00264   .0078899    -0.33   0.738    -.0181203    .0128403
INSIDER_D |  -.0178614    .014155    -1.26   0.207    -.0456343    .0099115
MULTIPLE_T~E |   .0284563   .0079939     3.56   0.000     .0127718    .0441408
TRANSACTIO~E |   .0185318   .0048029     3.86   0.000     .0091082    .0279554
MARKET_CAP~N |  -.0012736   .0002546    -5.00   0.000     -.001773   -.0007741
_Isector_15 |  -.0082766   .0159886    -0.52   0.605     -.039647    .0230939
_Isector_20 |   .0013996   .0153361     0.09   0.927    -.0286907    .0314899
_Isector_25 |  -.0389013   .0129421    -3.01   0.003    -.0642944   -.0135082
_Isector_30 |  -.0495209   .0181734    -2.72   0.007     -.085178   -.0138637
_Isector_35 |   .0050161   .0194823     0.26   0.797    -.0332093    .0432415
_Isector_40 |   -.048742   .0138493    -3.52   0.000     -.075915    -.021569
_Isector_45 |  -.0007909   .0151398    -0.05   0.958    -.0304959    .0289142
_Isector_50 |   .0048057     .04511     0.11   0.915    -.0837026     .093314
_Isector_55 |  -.0679753   .0213536    -3.18   0.001    -.1098721   -.0260784
_cons |   .0519569   .0128407     4.05   0.000     .0267628     .077151
-------------+----------------------------------------------------------------
year |   absorbed                                       (7 categories)
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/