Announcement

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

  • initial values not feasible r(1400);

    Dear Statalist,

    I'm trying to run a continuously updating GMM estimator (CUE), after some digging I was pointing towards the community command xtdpdgmm. Regardless of how much I adjust my model by reducing the regressors I'm still getting the following error.
    My dataset isn't large, which is why I'm using CUE

    Code:
    . xtdpdgmm FDI L.FDI GDPperCapita WUI, gmm(L.FDI, lag(2 4)) iv(GDPperCapita WUI) model(difference) cugmm
    
    Generalized method of moments estimation
    
    Fitting full model:
    
    Continously updating:
    initial values not feasible
    r(1400);
    
    .
    Thank you

  • #2
    This is not anywhere near my usual territory but it sounds as if you have a relatively small dataset with a time variable (year?) and also three variables, so something like

    Code:
    dataex Year FDI GDPperCapita WUI
    or at least the results of summarize, detail for all those variables. might help someone follow what is going on here. I'd expect at least some of these variables to be highly skewed in datasets that are at all heterogeneous.

    Comment


    • #3
      The continuously-updating estimator works better in larger samples. Is your panel data set balanced or unbalanced, possibly with gaps? A data example, as Nick suggested, or at least a more detailed description of your data set would be helpful. Nick's suspicion that the data might be highly skewed seems plausible as well. You could try taking the natural logarithm of FDI and GDP per capita (and possibly WUI, depending on whether this makes sense for this variable).
      Last edited by Sebastian Kripfganz; 22 Feb 2025, 06:28.
      https://www.kripfganz.de/stata/

      Comment


      • #4
        As a follow up:

        Your specification of the instruments implicitly assumes that GDP per capita is strictly exogenous. In an application such as yours, it might be more reasonable to assume that it is at least predetermined or even endogenous, in which case you might want to specify the respective instruments similar to those for FDI.

        When there is no serial correlation in the idiosyncratic error term, you can use lags 2 onwards for FDI as instruments. In your specification, you have effectively used lags 3 onwards - note that lag 2 of L.FDI is the same as lag 3 of FDI. However, your specification would be reasonable if you want to allow for first-order serial correlation in the idiosyncratic error term.

        Try to be explicit about your model assumptions and then specify the instruments accordingly; the Remarks section in the xtdpdgmm help file and my presentation slides linked below might be helpful.

        More on dynamic panel data GMM estimation in Stata:
        https://www.kripfganz.de/stata/

        Comment


        • #5
          Presumably you have multiple countries too.

          Comment


          • #6
            Originally posted by Sebastian Kripfganz View Post
            The continuously-updating estimator works better in larger samples. Is your panel data set balanced or unbalanced, possibly with gaps? A data example, as Nick suggested, or at least a more detailed description of your data set would be helpful. Nick's suspicion that the data might be highly skewed seems plausible as well. You could try taking the natural logarithm of FDI and GDP per capita (and possibly WUI, depending on whether this makes sense for this variable).
            Yes my dataset is unfortunately very limited. I was under the impression that CUE was an alternative to GMM for small samples

            Comment


            • #7
              Originally posted by Sebastian Kripfganz View Post
              The continuously-updating estimator works better in larger samples. Is your panel data set balanced or unbalanced, possibly with gaps? A data example, as Nick suggested, or at least a more detailed description of your data set would be helpful. Nick's suspicion that the data might be highly skewed seems plausible as well. You could try taking the natural logarithm of FDI and GDP per capita (and possibly WUI, depending on whether this makes sense for this variable).
              Yeah this isn't my full model.
              GDP per Capita is one of the controls I wanted to use among others include; trade openness, unemployment, inflation.
              I wanted to avoid taking logs of FDI because some values are negative and i'm trying to preserve my dataset as much as possible.

              Comment


              • #8
                Originally posted by Nick Cox View Post
                This is not anywhere near my usual territory but it sounds as if you have a relatively small dataset with a time variable (year?) and also three variables, so something like

                Code:
                dataex Year FDI GDPperCapita WUI
                or at least the results of summarize, detail for all those variables. might help someone follow what is going on here. I'd expect at least some of these variables to be highly skewed in datasets that are at all heterogeneous.
                I'd appreciate any advice. I'm willing to try any model that's a step above Fixed/Random effects. I wanted to use lagged FDI but it isn't ideal because of the nickel bias. The literature suggests GMM but from what I understand this isn't efficient for small sample data. As mentioned earlier, I was under the impression that CUE mitigates the issues present in small sample data. I


                Code:
                 summarize FDI GDP_Growth GDPperCapita asinhInflation Unemp TradeOpen stocks WUI VIX GPR, detail
                
                      Foreign direct investment, net inflows (% of GDP)
                                   [BX.KLT.DINV.WD.GD.ZS]
                -------------------------------------------------------------
                      Percentiles      Smallest
                 1%    -1.855686      -3.606928
                 5%     .0612933       -2.75744
                10%     .3813196      -1.855686       Obs                 275
                25%     .9557686      -1.332574       Sum of wgt.         275
                
                50%     2.302984                      Mean           4.531348
                                        Largest       Std. dev.      8.157018
                75%     4.056448       41.06495
                90%     8.253737       41.53184       Variance       66.53695
                95%     25.35682        44.5507       Skewness       3.674657
                99%     41.53184       58.51837       Kurtosis       17.53948
                
                          GDP growth (annual %) [NY.GDP.MKTP.KD.ZG]
                -------------------------------------------------------------
                      Percentiles      Smallest
                 1%    -7.634035      -13.12673
                 5%    -2.459136      -9.518294
                10%     .2962055      -7.634035       Obs                 275
                25%     2.687495      -7.359415       Sum of wgt.         275
                
                50%     4.920068                      Mean           4.349559
                                        Largest       Std. dev.      3.687989
                75%     6.783438       11.39459
                90%     7.922936       11.46694       Variance       13.60126
                95%      9.23678       12.72096       Skewness       -1.20564
                99%     11.46694       14.23086       Kurtosis       6.026944
                
                        GDP per capita (current US$) [NY.GDP.PCAP.CD]
                -------------------------------------------------------------
                      Percentiles      Smallest
                 1%     361.6439       337.0512
                 5%     454.8778       361.3509
                10%     807.7567       361.6439       Obs                 275
                25%     1753.414       375.9944       Sum of wgt.         275
                
                50%     4939.249                      Mean            14392.9
                                        Largest       Std. dev.      16822.08
                75%     25756.77       62544.09
                90%     40040.77        62605.6       Variance       2.83e+08
                95%     48760.08       68072.88       Skewness       1.160135
                99%      62605.6        68190.7       Kurtosis       3.225975
                
                                       asinhInflation
                -------------------------------------------------------------
                      Percentiles      Smallest
                 1%    -1.813101      -2.096998
                 5%    -.7115929      -2.015471
                10%    -.0249932      -1.813101       Obs                 275
                25%     1.126348      -1.709912       Sum of wgt.         275
                
                50%     1.751823                      Mean           1.564127
                                        Largest       Std. dev.      1.098482
                75%     2.275856       3.621195
                90%     2.714258       3.713086       Variance       1.206663
                95%     2.944997       3.834116       Skewness      -.8800983
                99%     3.713086        4.76141       Kurtosis       4.009728
                
                        Unemployment, total (% of total labor force)
                             (modeled ILO estimate) [SL.UEM.TOTL
                -------------------------------------------------------------
                      Percentiles      Smallest
                 1%          .58           .249
                 5%        1.071           .576
                10%        1.737            .58       Obs                 275
                25%        2.959           .597       Sum of wgt.         275
                
                50%        3.699                      Mean           4.142764
                                        Largest       Std. dev.      1.998188
                75%        5.159          8.534
                90%        7.551          8.551       Variance       3.992755
                95%        8.088          8.614       Skewness        .503005
                99%        8.551          8.697       Kurtosis       2.708024
                
                              Trade (% of GDP) [NE.TRD.GNFS.ZS]
                -------------------------------------------------------------
                      Percentiles      Smallest
                 1%     19.00319       18.12563
                 5%      24.8156       18.25387
                10%     32.97218       19.00319       Obs                 275
                25%     41.85113        19.5596       Sum of wgt.         275
                
                50%     66.09516                      Mean           101.1076
                                        Largest       Std. dev.      89.98181
                75%     129.8732       421.8547
                90%     210.3743       425.9759       Variance       8096.727
                95%     350.6797       430.5685       Skewness       1.980982
                99%     425.9759         442.62       Kurtosis       6.673748
                
                            Stocks traded, total value (% of GDP)
                                     [CM.MKT.TRAD.GD.ZS]
                -------------------------------------------------------------
                      Percentiles      Smallest
                 1%     3.403707       2.541356
                 5%      7.17461        2.80891
                10%     9.924817       3.403707       Obs                 257
                25%     22.62806       3.646085       Sum of wgt.         257
                
                50%     49.93649                      Mean           93.21331
                                        Largest       Std. dev.      142.7304
                75%     97.02464       668.6382
                90%     163.5564       715.1686       Variance       20371.96
                95%     421.0858       889.8158       Skewness       3.469087
                99%     715.1686       952.6694       Kurtosis       16.17541
                
                                         (mean) WUI
                -------------------------------------------------------------
                      Percentiles      Smallest
                 1%            0              0
                 5%     .0152383              0
                10%     .0347449              0       Obs                 275
                25%        .0685              0       Sum of wgt.         275
                
                50%     .1213891                      Mean           .1481505
                                        Largest       Std. dev.      .1085529
                75%     .2153653       .4925909
                90%     .3061873       .4954356       Variance       .0117837
                95%     .3364794       .5046896       Skewness        1.06437
                99%     .4954356        .548959       Kurtosis       4.026197
                
                                            CLOSE
                -------------------------------------------------------------
                      Percentiles      Smallest
                 1%        11.04          11.04
                 5%        11.56          11.04
                10%        12.07          11.04       Obs                 275
                25%        14.04          11.04       Sum of wgt.         275
                
                50%        20.92                      Mean            20.4048
                                        Largest       Std. dev.      6.452294
                75%        24.01             40
                90%        26.85             40       Variance        41.6321
                95%        28.62             40       Skewness       .8090107
                99%           40             40       Kurtosis       4.237748
                
                                         (mean) GPR
                -------------------------------------------------------------
                      Percentiles      Smallest
                 1%     .0124915       .0103904
                 5%     .0170451       .0107497
                10%     .0215702       .0124915       Obs                 275
                25%     .0316075       .0128876       Sum of wgt.         275
                
                50%     .0631818                      Mean           .1369706
                                        Largest       Std. dev.      .1613914
                75%     .1758416       .8143435
                90%     .3533746       .8645223       Variance       .0260472
                95%     .4341458       .8780549       Skewness       2.249893
                99%     .8645223       .9167054       Kurtosis       9.003226
                
                .

                Comment


                • #9
                  I wonder whether your variable WUI is constant over time. In this case, its coefficient is not identified in the first-differenced model. This would explain why the initial values are not feasible.

                  CUE indeed mitigates problems with the estimation of the optimal weighting matrix in finite samples, as the results are not dependent on the choice of the initial weighting matrix. If there are computational problems with the CUE, you can alternatively try the iterated GMM estimator, which addresses the same issue. However, the error you obtain seems to point to a more fundamental problem with your variables. The typical case would be perfect multicollinearity; time-invariant variables in a first-differenced model would be a special case of this general problem.
                  https://www.kripfganz.de/stata/

                  Comment


                  • #10
                    Originally posted by Sebastian Kripfganz View Post
                    I wonder whether your variable WUI is constant over time. In this case, its coefficient is not identified in the first-differenced model. This would explain why the initial values are not feasible.

                    CUE indeed mitigates problems with the estimation of the optimal weighting matrix in finite samples, as the results are not dependent on the choice of the initial weighting matrix. If there are computational problems with the CUE, you can alternatively try the iterated GMM estimator, which addresses the same issue. However, the error you obtain seems to point to a more fundamental problem with your variables. The typical case would be perfect multicollinearity; time-invariant variables in a first-differenced model would be a special case of this general problem.
                    Thank you Professor Sebastian for taking the time to respond.

                    No WUI isn't constant. It varies between the id/\countries and over time.

                    I will look into the iterated GMM estimator and see if I can implement it.

                    If I have perfect multicollinearity, should I change my model? I don't mind dropping either GDP growth or GDP per Capita for example because I think those 2 are very close to each other. How big of a problem is it, other than STATA not running the regression?

                    Comment


                    • #11
                      Code:
                      
                      
                      . quiet xtreg FDI  GDP_Growth GDPperCapita asinhInflation Unemp TradeOpen stocks WUI
                      
                      . vif, uncentered
                      
                          Variable |       VIF       1/VIF  
                      -------------+----------------------
                             Unemp |      4.31    0.231825
                         TradeOpen |      4.04    0.247269
                            stocks |      3.55    0.281312
                      asinhInfla~n |      3.32    0.301286
                      GDPperCapita |      2.55    0.392889
                               WUI |      2.54    0.393804
                        GDP_Growth |      2.28    0.438397
                      -------------+----------------------
                          Mean VIF |      3.23
                      
                      . quiet xtreg FDI  GDP_Growth GDPperCapita asinhInflation Unemp TradeOpen stocks GPR
                      
                      . vif, uncentered
                      
                          Variable |       VIF       1/VIF  
                      -------------+----------------------
                         TradeOpen |      4.54    0.220054
                             Unemp |      4.54    0.220144
                            stocks |      3.76    0.265967
                      asinhInfla~n |      3.03    0.329838
                        GDP_Growth |      2.59    0.386734
                      GDPperCapita |      2.42    0.412455
                               GPR |      2.19    0.456585
                      -------------+----------------------
                          Mean VIF |      3.30
                      
                      
                      
                      . quiet xtreg FDI  GDP_Growth GDPperCapita asinhInflation Unemp TradeOpen stocks VIX
                      
                      . vif, uncentered
                      
                          Variable |       VIF       1/VIF  
                      -------------+----------------------
                               VIX |      6.33    0.158005
                             Unemp |      5.31    0.188297
                         TradeOpen |      4.47    0.223628
                            stocks |      3.59    0.278326
                      asinhInfla~n |      3.40    0.294501
                      GDPperCapita |      2.57    0.388915
                        GDP_Growth |      2.30    0.433995
                      -------------+----------------------
                          Mean VIF |      4.00
                      Last edited by Nour Mohamed; 25 Feb 2025, 08:20.

                      Comment


                      • #12
                        Thanks for #8. I worked at the results and with this and that (most unusually myaxis from the Stata Journal) I got to here:

                        Code:
                        * Example generated by -dataex-. For more info, type help dataex
                        clear
                        input str14 varname float(kurtosis skewness) byte percent float(what order)
                        "FDI"            17.53948  3.674657  1 -1.855686 10
                        "FDI"            17.53948  3.674657  5  .0612933 10
                        "FDI"            17.53948  3.674657 10  .3813196 10
                        "FDI"            17.53948  3.674657 25  .9557686 10
                        "FDI"            17.53948  3.674657 50  2.302984 10
                        "FDI"            17.53948  3.674657 75  4.056448 10
                        "FDI"            17.53948  3.674657 90  8.253737 10
                        "FDI"            17.53948  3.674657 95  25.35682 10
                        "FDI"            17.53948  3.674657 99  41.53184 10
                        "GDP_Growth"     6.026944  -1.20564  1 -7.634035  6
                        "GDP_Growth"     6.026944  -1.20564  5 -2.459136  6
                        "GDP_Growth"     6.026944  -1.20564 10  .2962055  6
                        "GDP_Growth"     6.026944  -1.20564 25  2.687495  6
                        "GDP_Growth"     6.026944  -1.20564 50  4.920068  6
                        "GDP_Growth"     6.026944  -1.20564 75  6.783438  6
                        "GDP_Growth"     6.026944  -1.20564 90  7.922936  6
                        "GDP_Growth"     6.026944  -1.20564 95   9.23678  6
                        "GDP_Growth"     6.026944  -1.20564 99  11.46694  6
                        "GDPperCapita"   3.225975  1.160135  1  361.6439  2
                        "GDPperCapita"   3.225975  1.160135  5  454.8778  2
                        "GDPperCapita"   3.225975  1.160135 10  807.7567  2
                        "GDPperCapita"   3.225975  1.160135 25  1753.414  2
                        "GDPperCapita"   3.225975  1.160135 50  4939.249  2
                        "GDPperCapita"   3.225975  1.160135 75  25756.77  2
                        "GDPperCapita"   3.225975  1.160135 90  40040.77  2
                        "GDPperCapita"   3.225975  1.160135 95  48760.08  2
                        "GDPperCapita"   3.225975  1.160135 99   62605.6  2
                        "GPR"            9.003226  2.249893  1  .0124915  8
                        "GPR"            9.003226  2.249893  5  .0170451  8
                        "GPR"            9.003226  2.249893 10  .0215702  8
                        "GPR"            9.003226  2.249893 25  .0316075  8
                        "GPR"            9.003226  2.249893 50  .0631818  8
                        "GPR"            9.003226  2.249893 75  .1758416  8
                        "GPR"            9.003226  2.249893 90  .3533746  8
                        "GPR"            9.003226  2.249893 95  .4341458  8
                        "GPR"            9.003226  2.249893 99  .8645223  8
                        "TradeOpen"      6.673748  1.980982  1  19.00319  7
                        "TradeOpen"      6.673748  1.980982  5   24.8156  7
                        "TradeOpen"      6.673748  1.980982 10  32.97218  7
                        "TradeOpen"      6.673748  1.980982 25  41.85113  7
                        "TradeOpen"      6.673748  1.980982 50  66.09516  7
                        "TradeOpen"      6.673748  1.980982 75  129.8732  7
                        "TradeOpen"      6.673748  1.980982 90  210.3743  7
                        "TradeOpen"      6.673748  1.980982 95  350.6797  7
                        "TradeOpen"      6.673748  1.980982 99  425.9759  7
                        "Unemp"          2.708024   .503005  1       .58  1
                        "Unemp"          2.708024   .503005  5     1.071  1
                        "Unemp"          2.708024   .503005 10     1.737  1
                        "Unemp"          2.708024   .503005 25     2.959  1
                        "Unemp"          2.708024   .503005 50     3.699  1
                        "Unemp"          2.708024   .503005 75     5.159  1
                        "Unemp"          2.708024   .503005 90     7.551  1
                        "Unemp"          2.708024   .503005 95     8.088  1
                        "Unemp"          2.708024   .503005 99     8.551  1
                        "VIX"            4.237748  .8090107  1     11.04  5
                        "VIX"            4.237748  .8090107  5     11.56  5
                        "VIX"            4.237748  .8090107 10     12.07  5
                        "VIX"            4.237748  .8090107 25     14.04  5
                        "VIX"            4.237748  .8090107 50     20.92  5
                        "VIX"            4.237748  .8090107 75     24.01  5
                        "VIX"            4.237748  .8090107 90     26.85  5
                        "VIX"            4.237748  .8090107 95     28.62  5
                        "VIX"            4.237748  .8090107 99        40  5
                        "WUI"            4.026197   1.06437  1         0  4
                        "WUI"            4.026197   1.06437  5  .0152383  4
                        "WUI"            4.026197   1.06437 10  .0347449  4
                        "WUI"            4.026197   1.06437 25     .0685  4
                        "WUI"            4.026197   1.06437 50  .1213891  4
                        "WUI"            4.026197   1.06437 75  .2153653  4
                        "WUI"            4.026197   1.06437 90  .3061873  4
                        "WUI"            4.026197   1.06437 95  .3364794  4
                        "WUI"            4.026197   1.06437 99  .4954356  4
                        "asinhInflation" 4.009728 -.8800983  1 -1.813101  3
                        "asinhInflation" 4.009728 -.8800983  5 -.7115929  3
                        "asinhInflation" 4.009728 -.8800983 10 -.0249932  3
                        "asinhInflation" 4.009728 -.8800983 25  1.126348  3
                        "asinhInflation" 4.009728 -.8800983 50  1.751823  3
                        "asinhInflation" 4.009728 -.8800983 75  2.275856  3
                        "asinhInflation" 4.009728 -.8800983 90  2.714258  3
                        "asinhInflation" 4.009728 -.8800983 95  2.944997  3
                        "asinhInflation" 4.009728 -.8800983 99  3.713086  3
                        "stocks"         16.17541  3.469087  1  3.403707  9
                        "stocks"         16.17541  3.469087  5   7.17461  9
                        "stocks"         16.17541  3.469087 10  9.924817  9
                        "stocks"         16.17541  3.469087 25  22.62806  9
                        "stocks"         16.17541  3.469087 50  49.93649  9
                        "stocks"         16.17541  3.469087 75  97.02464  9
                        "stocks"         16.17541  3.469087 90  163.5564  9
                        "stocks"         16.17541  3.469087 95  421.0858  9
                        "stocks"         16.17541  3.469087 99  715.1686  9
                        end
                        label values order order
                        label def order 1 "Unemp", modify
                        label def order 2 "GDPperCapita", modify
                        label def order 3 "asinhInflation", modify
                        label def order 4 "WUI", modify
                        label def order 5 "VIX", modify
                        label def order 6 "GDP_Growth", modify
                        label def order 7 "TradeOpen", modify
                        label def order 8 "GPR", modify
                        label def order 9 "stocks", modify
                        label def order 10 "FDI", modify
                        
                        graph dot (asis) s k if mod(_n, 9) == 1, over(varname, sort(2)) marker(1, ms(Oh) msize(large)) ///
                        marker(2, ms(+) msize(large)) legend(row(1) pos(12)) linetype(line) lines(lp(solid) lc(gs8) lw(vthin)) yla(0(4)16) ysc(alt)
                        
                        twoway connect what percent, by(order, yrescale note("")) ytitle("") xla(0(25)100)
                        The order of variables is just by kurtosis. Skewness and kurtosis can be of some help in deciding on whether a transformation might help, but what happens to the relationships between variables is much more important.

                        On this evidence, FDI, Stocks and GPR might be suitable candidates for transformation. You're already aware through your use of asinh that zero or negative values can't be logged usefully (or in the case of zeros, at all).

                        To repeat, relationships between variables are the bigger deal, compared with looking at marginal distributions,
                        Click image for larger version

Name:	nour_1.png
Views:	1
Size:	37.9 KB
ID:	1773495

                        Click image for larger version

Name:	nour_2.png
Views:	1
Size:	70.6 KB
ID:	1773496

                        Comment


                        • #13
                          Originally posted by Nick Cox View Post
                          Thanks for #8. I worked at the results and with this and that (most unusually myaxis from the Stata Journal) I got to here:

                          Code:
                          * Example generated by -dataex-. For more info, type help dataex
                          clear
                          input str14 varname float(kurtosis skewness) byte percent float(what order)
                          "FDI" 17.53948 3.674657 1 -1.855686 10
                          "FDI" 17.53948 3.674657 5 .0612933 10
                          "FDI" 17.53948 3.674657 10 .3813196 10
                          "FDI" 17.53948 3.674657 25 .9557686 10
                          "FDI" 17.53948 3.674657 50 2.302984 10
                          "FDI" 17.53948 3.674657 75 4.056448 10
                          "FDI" 17.53948 3.674657 90 8.253737 10
                          "FDI" 17.53948 3.674657 95 25.35682 10
                          "FDI" 17.53948 3.674657 99 41.53184 10
                          "GDP_Growth" 6.026944 -1.20564 1 -7.634035 6
                          "GDP_Growth" 6.026944 -1.20564 5 -2.459136 6
                          "GDP_Growth" 6.026944 -1.20564 10 .2962055 6
                          "GDP_Growth" 6.026944 -1.20564 25 2.687495 6
                          "GDP_Growth" 6.026944 -1.20564 50 4.920068 6
                          "GDP_Growth" 6.026944 -1.20564 75 6.783438 6
                          "GDP_Growth" 6.026944 -1.20564 90 7.922936 6
                          "GDP_Growth" 6.026944 -1.20564 95 9.23678 6
                          "GDP_Growth" 6.026944 -1.20564 99 11.46694 6
                          "GDPperCapita" 3.225975 1.160135 1 361.6439 2
                          "GDPperCapita" 3.225975 1.160135 5 454.8778 2
                          "GDPperCapita" 3.225975 1.160135 10 807.7567 2
                          "GDPperCapita" 3.225975 1.160135 25 1753.414 2
                          "GDPperCapita" 3.225975 1.160135 50 4939.249 2
                          "GDPperCapita" 3.225975 1.160135 75 25756.77 2
                          "GDPperCapita" 3.225975 1.160135 90 40040.77 2
                          "GDPperCapita" 3.225975 1.160135 95 48760.08 2
                          "GDPperCapita" 3.225975 1.160135 99 62605.6 2
                          "GPR" 9.003226 2.249893 1 .0124915 8
                          "GPR" 9.003226 2.249893 5 .0170451 8
                          "GPR" 9.003226 2.249893 10 .0215702 8
                          "GPR" 9.003226 2.249893 25 .0316075 8
                          "GPR" 9.003226 2.249893 50 .0631818 8
                          "GPR" 9.003226 2.249893 75 .1758416 8
                          "GPR" 9.003226 2.249893 90 .3533746 8
                          "GPR" 9.003226 2.249893 95 .4341458 8
                          "GPR" 9.003226 2.249893 99 .8645223 8
                          "TradeOpen" 6.673748 1.980982 1 19.00319 7
                          "TradeOpen" 6.673748 1.980982 5 24.8156 7
                          "TradeOpen" 6.673748 1.980982 10 32.97218 7
                          "TradeOpen" 6.673748 1.980982 25 41.85113 7
                          "TradeOpen" 6.673748 1.980982 50 66.09516 7
                          "TradeOpen" 6.673748 1.980982 75 129.8732 7
                          "TradeOpen" 6.673748 1.980982 90 210.3743 7
                          "TradeOpen" 6.673748 1.980982 95 350.6797 7
                          "TradeOpen" 6.673748 1.980982 99 425.9759 7
                          "Unemp" 2.708024 .503005 1 .58 1
                          "Unemp" 2.708024 .503005 5 1.071 1
                          "Unemp" 2.708024 .503005 10 1.737 1
                          "Unemp" 2.708024 .503005 25 2.959 1
                          "Unemp" 2.708024 .503005 50 3.699 1
                          "Unemp" 2.708024 .503005 75 5.159 1
                          "Unemp" 2.708024 .503005 90 7.551 1
                          "Unemp" 2.708024 .503005 95 8.088 1
                          "Unemp" 2.708024 .503005 99 8.551 1
                          "VIX" 4.237748 .8090107 1 11.04 5
                          "VIX" 4.237748 .8090107 5 11.56 5
                          "VIX" 4.237748 .8090107 10 12.07 5
                          "VIX" 4.237748 .8090107 25 14.04 5
                          "VIX" 4.237748 .8090107 50 20.92 5
                          "VIX" 4.237748 .8090107 75 24.01 5
                          "VIX" 4.237748 .8090107 90 26.85 5
                          "VIX" 4.237748 .8090107 95 28.62 5
                          "VIX" 4.237748 .8090107 99 40 5
                          "WUI" 4.026197 1.06437 1 0 4
                          "WUI" 4.026197 1.06437 5 .0152383 4
                          "WUI" 4.026197 1.06437 10 .0347449 4
                          "WUI" 4.026197 1.06437 25 .0685 4
                          "WUI" 4.026197 1.06437 50 .1213891 4
                          "WUI" 4.026197 1.06437 75 .2153653 4
                          "WUI" 4.026197 1.06437 90 .3061873 4
                          "WUI" 4.026197 1.06437 95 .3364794 4
                          "WUI" 4.026197 1.06437 99 .4954356 4
                          "asinhInflation" 4.009728 -.8800983 1 -1.813101 3
                          "asinhInflation" 4.009728 -.8800983 5 -.7115929 3
                          "asinhInflation" 4.009728 -.8800983 10 -.0249932 3
                          "asinhInflation" 4.009728 -.8800983 25 1.126348 3
                          "asinhInflation" 4.009728 -.8800983 50 1.751823 3
                          "asinhInflation" 4.009728 -.8800983 75 2.275856 3
                          "asinhInflation" 4.009728 -.8800983 90 2.714258 3
                          "asinhInflation" 4.009728 -.8800983 95 2.944997 3
                          "asinhInflation" 4.009728 -.8800983 99 3.713086 3
                          "stocks" 16.17541 3.469087 1 3.403707 9
                          "stocks" 16.17541 3.469087 5 7.17461 9
                          "stocks" 16.17541 3.469087 10 9.924817 9
                          "stocks" 16.17541 3.469087 25 22.62806 9
                          "stocks" 16.17541 3.469087 50 49.93649 9
                          "stocks" 16.17541 3.469087 75 97.02464 9
                          "stocks" 16.17541 3.469087 90 163.5564 9
                          "stocks" 16.17541 3.469087 95 421.0858 9
                          "stocks" 16.17541 3.469087 99 715.1686 9
                          end
                          label values order order
                          label def order 1 "Unemp", modify
                          label def order 2 "GDPperCapita", modify
                          label def order 3 "asinhInflation", modify
                          label def order 4 "WUI", modify
                          label def order 5 "VIX", modify
                          label def order 6 "GDP_Growth", modify
                          label def order 7 "TradeOpen", modify
                          label def order 8 "GPR", modify
                          label def order 9 "stocks", modify
                          label def order 10 "FDI", modify
                          
                          graph dot (asis) s k if mod(_n, 9) == 1, over(varname, sort(2)) marker(1, ms(Oh) msize(large)) ///
                          marker(2, ms(+) msize(large)) legend(row(1) pos(12)) linetype(line) lines(lp(solid) lc(gs8) lw(vthin)) yla(0(4)16) ysc(alt)
                          
                          twoway connect what percent, by(order, yrescale note("")) ytitle("") xla(0(25)100)
                          The order of variables is just by kurtosis. Skewness and kurtosis can be of some help in deciding on whether a transformation might help, but what happens to the relationships between variables is much more important.

                          On this evidence, FDI, Stocks and GPR might be suitable candidates for transformation. You're already aware through your use of asinh that zero or negative values can't be logged usefully (or in the case of zeros, at all).

                          To repeat, relationships between variables are the bigger deal, compared with looking at marginal distributions,
                          [ATTACH=CONFIG]n1773495[/ATTACH]
                          [ATTACH=CONFIG]n1773496[/ATTACH]
                          Thank you so much for taking the time with your answer. I'm more interested with the relationships of my data so it's good to know I'm in the right direction.

                          The topic of transforming my data, especially, FDI was unexpectedly a source of great annoyance for me. From what I understand the IHS/asinh transformation isn't ideal for my data because I have outliers that I'm not willing to drop because of my data size (275 observations), I'll be dropping an entire economy.

                          I will look into transforming stocks and GPR though, thank you for the advice.

                          Comment


                          • #14
                            Indeed. It is easy to see that asinh pulled in a tail there. Here are your 4 highest and 4 lowest.

                            Code:
                             +-----------------------+
                              |     asinh        sinh |
                              |-----------------------|
                              | -2.096998   -4.009434 |
                              | -2.015471   -3.685502 |
                              | -1.813101   -2.983139 |
                              | -1.709912   -2.673797 |
                              |-----------------------|
                              |  3.621195    18.67773 |
                              |  3.713086    20.47784 |
                              |  3.834116    23.11545 |
                              |   4.76141    58.45105 |
                              +-----------------------+

                            Comment


                            • #15
                              Originally posted by Nick Cox View Post
                              Indeed. It is easy to see that asinh pulled in a tail there. Here are your 4 highest and 4 lowest.

                              Code:
                              +-----------------------+
                              | asinh sinh |
                              |-----------------------|
                              | -2.096998 -4.009434 |
                              | -2.015471 -3.685502 |
                              | -1.813101 -2.983139 |
                              | -1.709912 -2.673797 |
                              |-----------------------|
                              | 3.621195 18.67773 |
                              | 3.713086 20.47784 |
                              | 3.834116 23.11545 |
                              | 4.76141 58.45105 |
                              +-----------------------+
                              Thank you for all your help professor Cox I'm very grateful for it.

                              Sorry for the basic question but I'm unsure what I should do with this information. Should I drop these conservations and shrink my data? So far I decided to keep my data as is, with the exception of inflation, and go with a level-level regression. but since revising my data again I feel like I'm not handling it the best way that I could have.

                              Comment

                              Working...
                              X