Announcement

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

  • Orthogonalization using regression residuals

    Dear Stata Members
    I have a cross country dataset that has a country-wise measure of policy uncertainty index for each year. There are 22 countries and for each year, each country will have a value which I call the "index_value". Now the issue is that, the U.S due to its large size and other influence on trade/monetary policies, it can have a cascading impact on other countries. For instance, when the U.S increases say its policy rates, not only does its "index_value"changes but other countries index_value also react to it. I would like to disentage the impact of the effect of index_value of U.S from other countries. One way in the literature is to "orthogonalize the index_value of each country in the sample with respect to that of the U.S. by regressing the "index_value" of each country on the "index_value" of the U.S. Having been purged of any potential confounding effect of U.S. index_value, the residuals of this regression (index_value_resid), by construction, represent a cleaner measure of policy uncertainty in each country".

    My question is that what is the logic of orthogonality in the above circumstance? I tried the below code and got the following output

    Code:
    * Example generated by -dataex-. For more info, type help dataex
    clear
    input int year str24 countryofexchange byte country_code float(index_value us_index_value)
    2000 "Australia"                 1 4.28037  4.5701
    2001 "Australia"                 1  4.7955  5.0251
    2002 "Australia"                 1 4.43311 4.85707
    2003 "Australia"                 1 4.67781 4.85087
    2000 "Brazil"                    2 4.51194  4.5701
    2001 "Brazil"                    2 4.66751  5.0251
    2002 "Brazil"                    2 4.81762 4.85707
    2003 "Brazil"                    2 4.68208 4.85087
    2000 "Canada"                    3 3.97718  4.5701
    2001 "Canada"                    3 4.78865  5.0251
    2002 "Canada"                    3 4.66665 4.85707
    2003 "Canada"                    3 4.70914 4.85087
    2000 "Chile"                     4 4.78905  4.5701
    2001 "Chile"                     4 5.01483  5.0251
    2002 "Chile"                     4 4.94795 4.85707
    2003 "Chile"                     4 4.71154 4.85087
    2000 "China"                     5  3.5714  4.5701
    2001 "China"                     5 3.77717  5.0251
    2002 "China"                     5 3.97991 4.85707
    2003 "China"                     5 4.09675 4.85087
    2000 "Colombia"                  6  4.8058  4.5701
    2001 "Colombia"                  6 4.76195  5.0251
    2002 "Colombia"                  6 4.73215 4.85707
    2003 "Colombia"                  6 4.57414 4.85087
    2000 "United Kingdom"           21 3.86795  4.5701
    2001 "United Kingdom"           21 4.51501  5.0251
    2002 "United Kingdom"           21 4.53173 4.85707
    2003 "United Kingdom"           21 4.90331 4.85087
    2000 "United States of America" 22  4.5701  4.5701
    2001 "United States of America" 22  5.0251  5.0251
    2002 "United States of America" 22 4.85707 4.85707
    2003 "United States of America" 22 4.85087 4.85087
    end
    Code:
     xtset country_code year
    
    Panel variable: country_code (strongly balanced)
     Time variable: year, 2000 to 2003
             Delta: 1 unit
    
    . xtreg us_index_value index_value  , fe vce(r)
    
    Fixed-effects (within) regression               Number of obs     =         32
    Group variable: country_code                    Number of groups  =          8
    
    R-squared:                                      Obs per group:
         Within  = 0.4204                                         min =          4
         Between =      .                                         avg =        4.0
         Overall = 0.1483                                         max =          4
    
                                                    F(1,7)            =      31.29
    corr(u_i, Xb) = -0.8045                         Prob > F          =     0.0008
    
                               (Std. err. adjusted for 8 clusters in country_code)
    ------------------------------------------------------------------------------
                 |               Robust
    us_index_v~e | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
    -------------+----------------------------------------------------------------
     index_value |   .4820206   .0861737     5.59   0.001     .2782522    .6857889
           _cons |   2.628203   .3928748     6.69   0.000     1.699202    3.557204
    -------------+----------------------------------------------------------------
         sigma_u |  .15334544
         sigma_e |   .1466756
             rho |  .52222026   (fraction of variance due to u_i)
    ------------------------------------------------------------------------------
    
    . predict Index_res, residuals
    
    . univar Index_res
                                            -------------- Quantiles --------------
    Variable       n     Mean     S.D.      Min      .25      Mdn      .75      Max
    -------------------------------------------------------------------------------
    Index_res      32     0.00     0.19    -0.37    -0.11    -0.02     0.09     0.58
    -------------------------------------------------------------------------------
    .

    Is the above model a correct one? Should I go for reg or xtreg (I thought as it is a panel, I used xtreg and controlled for country level fixed effects (8), and clusters standard errors though clusters are 8 in this, I have 22 in real ). I haven't put year dummies as one dummy is constantly being omitted because of multicollinearity (could be case of US index).
    Am I doing the correct thing? How do we know our measure Index_res, is orthogonal to us_index_value?
    Any thoughts/remarks are highly welcome as I am experimenting with this


  • #2
    Dear Stata Members
    kindly let me know if any further information is required related to the above post.

    Comment


    • #3
      In this context, "orthogonal" is just a Greek word for "correlation zero." If you run -corr index_res us_index_value- and get zero, as I expect you will, you are good to go.

      Comment


      • #4
        Thanks Clyde Schechter for the suggestion.

        Comment

        Working...
        X