Announcement

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

  • vif for dummy variables like country and years dummie

    Dear Statalist Users,

    I have regression models in which have country and years dummy, when I check for vif, it comes more than 10 especially for country dummies (please see table below):

    My question, do I need to account for country and years dummies' vif , and if no, how I can write the code to calculate the vif for the main variables in the model without calculating the vif for years and country dummies. Thank you
    Code:
    . vif
    
        Variable |       VIF       1/VIF 
    -------------+----------------------
              UK |    411.49    0.002430
          Canada |    334.33    0.002991
       RuleofLaw |    237.65    0.004208
       Australia |    207.76    0.004813
          Sweden |    192.97    0.005182
         Finland |    191.48    0.005222
          Norway |    185.83    0.005381
          France |    179.49    0.005571
      Netherland |    151.43    0.006604
         Denmark |    118.09    0.008468
     Switzerland |    110.84    0.009022
           Spain |    100.39    0.009961
         Ireland |    100.05    0.009995
         Belgium |     70.60    0.014164
          Crisis |     11.53    0.086711
      PostCrisis |      9.11    0.109751
    WidelyHel~20 |      8.73    0.114535
       Year_2012 |      8.15    0.122679
       Year_2011 |      8.12    0.123100
       Year_2010 |      7.88    0.126908
       Year_2009 |      7.66    0.130602
           Italy |      7.48    0.133657
    FamilyCon~20 |      7.01    0.142677
      Industry_5 |      5.39    0.185422
      Industry_1 |      4.54    0.220200
      Industry_6 |      4.32    0.231591
      Industry_3 |      4.32    0.231726
    StateCont~20 |      4.25    0.235516
      Industry_2 |      3.66    0.273000
      Industry_9 |      3.38    0.295897
    PropertyPl~t |      2.91    0.343936
    
    -------------+----------------------
        Mean VIF |     60.62
    
    .

  • #2
    Any suggestion please

    Comment


    • #3
      On this evidence, you shouldn't be trying to code a report that doesn't indicate the problems with the model. You should be trying to fix the model.

      I say on this evidence because, naturally, a table of VIF is all that you show us, not even the original model command.

      (I suspect that others had similar thoughts, but pulled back from saying something limited, negative and (perhaps) obvious.)

      Comment


      • #4
        Thank you for your reply and advice.

        Below I show the command and the results as well.Any comments please. Thank you.

        Code:
        . regress BDI_16 L.(IO_Domestic $X $Y $I $C), robust cluster (CountryID)
        note: L.Year_2006 omitted because of collinearity
        note: L.Year_2012 omitted because of collinearity
        note: L.Industry_7 omitted because of collinearity
        note: L.Denmark omitted because of collinearity
        
        Linear regression                               Number of obs     =      2,028
        F(13, 14)         =          .
        Prob > F          =          .
        R-squared         =     0.2802
        Root MSE          =      1.888
        
        (Std. Err. adjusted for 15 clusters in CountryID)
        
        Robust
        BDI_16       Coef.   Std. Err.      t    P>t     [95% Conf. Interval]
        
        IO_Domestic
        L1.   -.0094184   .0044187    -2.13   0.051    -.0188956    .0000588
                                 
        LogTotalAsset
        L1.    .3307708   .2527381     1.31   0.212    -.2112985    .8728402
                                 
        SalesGrowthRate
        L1.    .0410934   .2105628     0.20   0.848    -.4105189    .4927057
                                 
        Leverage
        L1.    .7224189   .6769358     1.07   0.304     -.729464    2.174302
                                 
        Cash
        L1.   -.8727844   .9030625    -0.97   0.350    -2.809661    1.064092
                                 
        CapitalExpenditure
        L1.    4.431041   1.413341     3.14   0.007     1.399725    7.462357
                                 
        MarkettoBookValue
        L1.    .0475877   .0333987     1.42   0.176    -.0240454    .1192208
                                 
        ReturnonAsset
        L1.    1.707071   .8869409     1.92   0.075    -.1952282     3.60937
                                 
        PropertyPlantandEquipment
        L1.   -.8316488   .4172822    -1.99   0.066     -1.72663    .0633325
                                 
        AnalystCoverage
        L1.    .0079802   .0120067     0.66   0.517    -.0177715    .0337319
                                 
        CrossListingDummy
        L1.   -.1793173   .2398602    -0.75   0.467    -.6937662    .3351317
                                 
        RuleofLaw
        L1.   -.0482036   .0495183    -0.97   0.347    -.1544096    .0580025
                                 
        Crisis
        L1.    .4732932   .1834144     2.58   0.022     .0799085    .8666778
                                 
        PostCrisis
        L1.    .0295949   .3080075     0.10   0.925    -.6310156    .6902054
                                 
        FamilyControlling_20
        L1.    .9660318   .5111488     1.89   0.080    -.1302733    2.062337
                                 
        StateControlling_20
        L1.    .3578423   .5773058     0.62   0.545    -.8803554     1.59604
                                 
        WidelyHeldat_20
        L1.    .0758965   .3999505     0.19   0.852    -.7819121    .9337051
                                 
        Year_2006
        L1.           0  (omitted)
                                 
        Year_2007
        L1.    .0348819   .0940123     0.37   0.716    -.1667545    .2365183
                                 
        Year_2008
        L1.    .0511911   .1863545     0.27   0.788    -.3484996    .4508818
                                 
        Year_2009
        L1.   -.1675949   .2841458    -0.59   0.565     -.777027    .4418373
                                 
        Year_2010
        L1.    .0202414    .313365     0.06   0.949    -.6518595    .6923424
                                 
        Year_2011
        L1.    .3438802   .3338418     1.03   0.320    -.3721392      1.0599
                                 
        Year_2012
        L1.           0  (omitted)
                                 
        Industry_1
        L1.    -.303481   .5155339    -0.59   0.565    -1.409191    .8022294
                                 
        Industry_2
        L1.    .4187083   .5662959     0.74   0.472    -.7958755    1.633292
                                 
        Industry_3
        L1.    .5670687   .4605605     1.23   0.239    -.4207353    1.554873
                                 
        Industry_4
        L1.   -.2064466   .5066541    -0.41   0.690    -1.293112    .8802182
                                 
        Industry_5
        L1.   -.2500781   .4938907    -0.51   0.620    -1.309368     .809212
                                 
        Industry_6
        L1.   -.6200133   .5523763    -1.12   0.281    -1.804743     .564716
                                 
        Industry_7
        L1.           0  (omitted)
                                 
        Industry_8
        L1.    .2358787   .6828852     0.35   0.735    -1.228764    1.700522
                                 
        Industry_9
        L1.   -.4565187    .571185    -0.80   0.437    -1.681589    .7685514
                                 
        Australia
        L1.   -.2780603   .3148107    -0.88   0.392     -.953262    .3971414
                                 
        Belgium
        L1.   -.3280998    .509116    -0.64   0.530    -1.420045    .7638455
                                 
        Canada
        L1.    .5330154   .2903987     1.84   0.088    -.0898279    1.155859
                                 
        Denmark
        L1.           0  (omitted)
                                 
        Finland
        L1.    .2531874   .2143378     1.18   0.257    -.2065215    .7128962
                                 
        France
        L1.    .7798969    .477594     1.63   0.125    -.2444403    1.804234
                                 
        India
        L1.    -4.27671   2.139008    -2.00   0.065    -8.864426    .3110067
                                 
        Ireland
        L1.     .850713   .2382609     3.57   0.003     .3396943    1.361732
                                 
        Italy
        L1.   -2.714751   1.854488    -1.46   0.165    -6.692231     1.26273
                                 
        Netherland
        L1.    .7508282   .2529876     2.97   0.010     .2082238    1.293433
                                 
        Norway
        L1.    2.066916   .1873225    11.03   0.000     1.665149    2.468683
                                 
        Spain
        L1.   -.5712559   .7228659    -0.79   0.443    -2.121649    .9791373
                                 
        Sweden
        L1.    2.212823   .1969369    11.24   0.000     1.790435     2.63521
                                 
        Switzerland
        L1.    .1526121   .2107167     0.72   0.481    -.2993302    .6045544
                                 
        UK
        L1.    1.084445   .3973656     2.73   0.016     .2321806    1.936709
                                 
        _cons    11.14169   5.192184     2.15   0.050     .0055651    22.27782
        
        
        . vif
        
        Variable        VIF       1/VIF 
        
        RuleofLaw
        L1.     236.34    0.004231
        India
        L1.     154.89    0.006456
        Italy
        L1.     130.11    0.007686
        Spain
        L1.      25.94    0.038549
        UK
        L1.      16.31    0.061305
        France
        L1.      15.85    0.063079
        Crisis
        L1.      10.38    0.096349
        WidelyHel~20
        L1.       8.82    0.113348
        Belgium
        L1.       8.70    0.114979
        Year_2011
        L1.       8.60    0.116228
        Year_2010
        L1.       8.19    0.122084
        Year_2009
        L1.       7.96    0.125601
        Canada
        L1.       7.42    0.134857
        PostCrisis
        L1.       7.26    0.137673
        FamilyCon~20
        L1.       7.05    0.141772
        Australia
        L1.       6.25    0.160112
        Industry_5
        L1.       5.55    0.180255
        Industry_1
        L1.       4.51    0.221547
        Industry_6
        L1.       4.39    0.227708
        Industry_3
        L1.       4.35    0.230066
        StateCont~20
        L1.       4.27    0.234294
        Industry_2
        L1.       3.70    0.269947
        Netherland
        L1.       3.50    0.285363
        Industry_9
        L1.       3.46    0.288724
        Ireland
        L1.       3.46    0.289197
        Sweden
        L1.       3.13    0.319937
        PropertyPl~t
        L1.       2.97    0.336200
        Finland
        L1.       2.97    0.337139
        Norway
        L1.       2.93    0.340816
        Industry_8
        L1.       2.86    0.349720
        Industry_4
        L1.       2.76    0.362388
        Switzerland
        L1.       2.75    0.363191
        IO_Domestic
        L1.       2.73    0.365655
        CapitalExp~e
        L1.       2.36    0.423463
        Year_2008
        L1.       2.33    0.428270
        LogTotalAs~t
        L1.       2.31    0.432587
        AnalystCov~e
        L1.       2.05    0.487339
        Year_2007
        L1.       1.80    0.554109
        ReturnonAs~t
        L1.       1.66    0.601411
        MarkettoBo~e
        L1.       1.66    0.602514
        Leverage
        L1.       1.65    0.607435
        CrossListi~y
        L1.       1.64    0.608804
        Cash
        L1.       1.38    0.724556
        SalesGrowt~e
        L1.       1.28    0.781414
        
        Mean VIF      16.83
        
        .

        Comment


        • #5
          I think generalized VIF (GVIF) would be more appropriate for categorical variables. I know there is an R function that can compute it, but I was not able to find anything comparable for Stata with a very cursory search. The closest I came was a conference paper by John Hendrickx and some co-authors and a Stata package called perturb. The conference paper suggests that perturb can compute GVIF--see Table 12. Type findit perturb to install.

          Meanwhile, maybe someone else can point us to a newer or better Stata implementation of GVIF.

          HTH.
          --
          Bruce Weaver
          Email: [email protected]
          Version: Stata/MP 18.5 (Windows)

          Comment


          • #6
            Thank you Dear Bruce for your valuable guidance. I hope that some body can help me to find out GVIF command in STATA.
            Last edited by Badar Khalid; 07 Dec 2016, 09:41.

            Comment


            • #7
              I have installed perturb using the following command : ssc install perturb

              Can somebody help to find out the command for executing GVIF please. Thank you
              Last edited by Badar Khalid; 07 Dec 2016, 09:41.

              Comment


              • #8
                In my view you are focusing on trying a different way of measuring the size of the problem. That's like asking for a different thermometer when the patient clearly is running a high fever.

                It would be better to find out what the problem is.

                For example, you appear to be using a plain regression model on BDI

                -- I don't know what this is, possibly

                Beck Depression Inventory
                Bee Diseases Insurance
                Baltic Dry Index
                ...

                -- you see that Googling can't triumph over my ignorance. But with economic data for several countries (??) some massive values would not be surprising and those could be acting as outliers and be one reason for apparent collinearity. Working on logarithmic scale (e.g.) might help.

                A set of VIFs like that point to overfitting, as do many mediocre P-values. You could look at scatter plot matrices, correlation matrices, principal component analysis as ways of investigating the structure of collinearity.

                Most important of all would be some economic thinking identifying a plausible simpler model but I can't help you there.

                Comment

                Working...
                X