Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Correlated variables in fixed-effects model

    Hi,
    I am working with a fixed-effects estimation on a panel data set for 15 countries.

    Suppose the following is the 'central' model: xtreg depvar var1 var2, fe

    I then introduce a control variable: xtreg depvar var1 var2 var3, fe

    Inclusion of the control variable var3 makes one of my previous explanatory variables, say, var2 insignificant. Therefore I suspect that the possibility that var2 and var3 might be correlated such that the control variable draws the effect of the original explanatory variable. To test the correlation, I run: bysort Country: correl var2 var3

    The country-wise correlation coefficients range from 0.7 to 0.85. I am wondering whether this is sufficient evidence to indeed explain why var2 becomes an insignficant predictor upon the inclusion of var3. If not ,advice to run any other tests as a check for correlation to explain loss of significance of var2 would be very helpful. Thank you.

  • #2
    Anusha:
    you may want to take a look at -estat vce, corr-, too.
    Kind regards,
    Carlo
    (Stata 19.0)

    Comment


    • #3
      Originally posted by Carlo Lazzaro View Post
      Anusha:
      you may want to take a look at -estat vce, corr-, too.
      Hi Carlo, thanks for replying.

      Are you asking me to use the -estat vce, corr- command after -regress var2 var3-? Because when I do that the matrix I get includes the correlation between only the constant term and var3 which does not tell me anything... How can I see the matrix of corrleation for both var2 and var3?

      Comment


      • #4
        Anusha:
        it may well be that -var2- was omitted due to collinearity (however, if that were the case, Stata should have informed you with a note).
        I do hope that the following two toy-example can be useful:
        1) after -regress-:
        Code:
        . sysuse auto.dta
        (1978 Automobile Data)
        
        . regress price mpg i.foreign
        
              Source |       SS           df       MS      Number of obs   =        74
        -------------+----------------------------------   F(2, 71)        =     14.07
               Model |   180261702         2  90130850.8   Prob > F        =    0.0000
            Residual |   454803695        71  6405685.84   R-squared       =    0.2838
        -------------+----------------------------------   Adj R-squared   =    0.2637
               Total |   635065396        73  8699525.97   Root MSE        =    2530.9
        
        ------------------------------------------------------------------------------
               price |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
        -------------+----------------------------------------------------------------
                 mpg |  -294.1955   55.69172    -5.28   0.000    -405.2417   -183.1494
                     |
             foreign |
            Foreign  |   1767.292    700.158     2.52   0.014     371.2169    3163.368
               _cons |   11905.42   1158.634    10.28   0.000     9595.164    14215.67
        ------------------------------------------------------------------------------
        
        . estat vce, corr
        
        Correlation matrix of coefficients of regress model
        
                     |                  1.         
                e(V) |      mpg   foreign     _cons
        -------------+------------------------------
                 mpg |   1.0000                    
           1.foreign |  -0.3934    1.0000          
               _cons |  -0.9530    0.2231    1.0000
        2) after -xtreg, fe-:
        Code:
        . use "http://www.stata-press.com/data/r14/nlswork.dta", clear
        (National Longitudinal Survey.  Young Women 14-26 years of age in 1968)
        
        . xtreg ln_wage age tenure , fe
        
        Fixed-effects (within) regression               Number of obs     =     28,101
        Group variable: idcode                          Number of groups  =      4,699
        
        R-sq:                                           Obs per group:
             within  = 0.1296                                         min =          1
             between = 0.1916                                         avg =        6.0
             overall = 0.1456                                         max =         15
        
                                                        F(2,23400)        =    1742.76
        corr(u_i, Xb)  = 0.1302                         Prob > F          =     0.0000
        
        ------------------------------------------------------------------------------
             ln_wage |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
        -------------+----------------------------------------------------------------
                 age |   .0121949   .0004131    29.52   0.000     .0113852    .0130045
              tenure |   .0211313   .0008015    26.37   0.000     .0195604    .0227023
               _cons |   1.256467   .0109792   114.44   0.000     1.234947    1.277987
        -------------+----------------------------------------------------------------
             sigma_u |  .39034493
             sigma_e |  .29808194
                 rho |  .63165531   (fraction of variance due to u_i)
        ------------------------------------------------------------------------------
        F test that all u_i=0: F(4698, 23400) = 8.02                 Prob > F = 0.0000
        
        . estat vce, corr
        
        Correlation matrix of coefficients of xtreg model
        
                e(V) |      age    tenure     _cons
        -------------+------------------------------
                 age |   1.0000                    
              tenure |  -0.5515    1.0000          
               _cons |  -0.9683    0.3753    1.0000
        Kind regards,
        Carlo
        (Stata 19.0)

        Comment

        Working...
        X