Announcement

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

  • Q - A problem with qregpd: a Quantile Regression in an Unbalanced Panel Data set

    Hi everyone,

    I am trying to perform a Quantile Regression with an unbalanced panel data set, to find out whether the effect of IDV on Gini differs in the .25th and the .75th quantile.
    Therefore, I downloaded the following package:
    Code:
    qregpd
    I entered the following command:
    Code:
    qregpd Gini_DispSWIID IDV GLPIntensity InflationGDPdeflatorannual Ruralpopulation LevelofdemocracyPolityV Populationgrowthannual TradeofGDP Schoolenrollmentsecondary GDPgrowthannual Wageandsalariedworkerstotal Currenthealthexpenditureof Arablelandoftotal, id(Country_ID) fix(Year) quantile(.75)
    However, I obtain the following output:
    Code:
    . qregpd Gini_DispSWIID IDV GLPIntensity InflationGDPdeflatorannual Ruralpopulation Levelofdemocr
    > acyPolityV Populationgrowthannual TradeofGDP Schoolenrollmentsecondary GDPgrowthannual Wageands
    > alariedworkerstotal Currenthealthexpenditureof Arablelandoftotal, id(Country_ID) fix(Year) quan
    > tile(.75)
    Nelder-Mead optimization
    initial:       f(p) = -87.285174
    rescale:       f(p) = -87.285174
    Iteration 0:   f(p) = -87.285174  
    Iteration 1:   f(p) = -5.0307519  
    Iteration 2:   f(p) = -.78734938  
    Iteration 3:   f(p) = -.78734938  
    Iteration 4:   f(p) = -.78734938  
    Iteration 5:   f(p) = -.78734938  
    Iteration 6:   f(p) = -.78734938  
    Iteration 7:   f(p) = -.78734938  
    Iteration 8:   f(p) = -.78734938  
    Iteration 9:   f(p) = -.78734938  
    Iteration 10:  f(p) = -.78734938  
    Iteration 11:  f(p) = -.78734938  
    Iteration 12:  f(p) = -.78734938  
    Iteration 13:  f(p) = -.78734938  
    Iteration 14:  f(p) = -.78734938  
    Iteration 15:  f(p) = -.78734938  
    Iteration 16:  f(p) = -.78734938  
    Iteration 17:  f(p) =  -.6038165  
    Iteration 18:  f(p) =  -.6038165  
    Iteration 19:  f(p) =  -.6038165  
    Iteration 20:  f(p) =  -.6038165  
    Iteration 21:  f(p) =  -.6038165  
    Iteration 22:  f(p) =  -.6038165  
    Iteration 23:  f(p) =  -.6038165  
    Iteration 24:  f(p) =  -.6038165  
    Iteration 25:  f(p) =  -.6038165  
    Iteration 26:  f(p) =  -.6038165  
    Iteration 27:  f(p) =  -.6038165  
    Iteration 28:  f(p) =  -.6038165  
    Iteration 29:  f(p) =  -.6038165  
    Iteration 30:  f(p) =  -.6038165  
    Iteration 31:  f(p) =  -.6038165  
    Iteration 32:  f(p) =  -.6038165  
    Iteration 33:  f(p) =  -.6038165  
    Iteration 34:  f(p) =  -.6038165  
    Iteration 35:  f(p) =  -.6038165  
    Iteration 36:  f(p) =  -.6038165  
    Iteration 37:  f(p) =  -.6038165  
    Iteration 38:  f(p) =  -.6038165  
    Iteration 39:  f(p) =  -.6038165  
    Iteration 40:  f(p) =  -.6038165  
    Iteration 41:  f(p) =  -.6038165  
    Iteration 42:  f(p) =  -.6038165  
    Iteration 43:  f(p) =  -.6038165  
    Iteration 44:  f(p) =  -.6038165  
    Iteration 45:  f(p) =  -.6038165  
    Iteration 46:  f(p) =  -.6038165  
    Iteration 47:  f(p) =  -.6038165  
    Iteration 48:  f(p) =  -.6038165  
    
    
    Quantile Regression for Panel Data (QRPD)
         Number of obs:               301
         Number of groups:             19
         Min obs per group:            11
         Max obs per group:            19
    ---------------------------------------------------------------------------------------------
                 Gini_DispSWIID | Coefficient  Std. err.      z    P>|z|     [95% conf. interval]
    ----------------------------+----------------------------------------------------------------
                            IDV |  -.0515317          .        .       .            .           .
                   GLPIntensity |  -118.5223          .        .       .            .           .
     InflationGDPdeflatorannual |  -.2093337          .        .       .            .           .
       Ruralpopulationasaoftota |  -23.02208          .        .       .            .           .
        LevelofdemocracyPolityV |   .8931058          .        .       .            .           .
         Populationgrowthannual |   1.354606          .        .       .            .           .
                     TradeofGDP |   .0269068    .235968     0.11   0.909     -.435582    .4893956
      Schoolenrollmentsecondary |   -.021503   .0731588    -0.29   0.769    -.1648916    .1218855
                GDPgrowthannual |   .1055383          .        .       .            .           .
    Wageandsalariedworkerstotal |  -.3813951          .        .       .            .           .
     Currenthealthexpenditureof |   .8699441          .        .       .            .           .
              Arablelandoftotal |   4.889251          .        .       .            .           .
    ---------------------------------------------------------------------------------------------
    No excluded instruments - standard QRPD estimation.
    As you can see a lot of output is missing. Could you help me to solve this problem?

    Thank you so much.

    Kind regards,
    Matthew

  • #2
    Hi Matthew,
    I dont think that is something that can be "solved".
    qregpd (which uses a kind of unconditional quantile regression and that uses fixed effects for the moment conditions, but do not explicitly accounts for them) has a few limitations, as you can see.
    If you think this is your best approach, you could
    a) try to do a few other runs. It may be that other "solution" may come up.
    b) look for and try rqreg. (residual quantile regression). While the method is different than qregpd, at its core they aim to identify the same kind effects

    Otherwise, you may want to
    c) using some methods like xtqreg , which introduces fixed effects explicitly (kind of adding dummies)
    d) use correlated random effect model for QREG
    e) use Canay (2011) (https://onlinelibrary.wiley.com/doi/...X.2011.00349.x), which also has a relatively easy to implement approach for panel qreg.
    HTH

    Comment


    • #3
      Dear Fernando,

      Thank you for your quick response! I will try several of your recommendations, and I will come back to you.

      Could you maybe explain to me why it is something that cannot be solved? I fail to understand why all those outputs are missing.

      Thanks in advance,
      Matthew

      Comment


      • #4
        It may be that you have
        a) too many controls + fixed effects on your model
        b) some of your covariates are time-invariant (or are near time-invariant). So there is not enough residual variation to find a solution
        There is also the problem (to me) that the way this model is estimated remains behind a black-box. So I cant say much about other alternative solutions.

        Comment


        • #5
          Regarding b), my independent variable of interest, IDV (a cultural dimension, namely Individualism vs Collectivism), is indeed fixed. With this knowledge, would you know a possible alternative solution?

          Comment


          • #6
            Moreover, I already ran sqreg:
            Code:
            sqreg Gini_DispSWIID IDV GLPIntensity InflationGDPdeflatorannual Ruralpopulation LevelofdemocracyPolityV Populationgrowthannual TradeofGDP Schoolenrollmentsecondary GDPgrowthannual Wageandsalariedworkerstotal Currenthealthexpenditureof Arablelandoftotal, q(.25 .5 .75) reps(1000)
            
            test [q25]IDV = [q75]IDV
            This provided me with the following results:
            Code:
            Simultaneous quantile regression                    Number of obs =
            >         309
              bootstrap(1000) SEs                               .25 Pseudo R2 =
            >      0.6098
                                                                .50 Pseudo R2 =
            >      0.5766
                                                                .75 Pseudo R2 =
            >      0.5114
            
            -------------------------------------------------------------------
            > -----------
                         |              Bootstrap
            Gini_DispS~D | Coefficient  std. err.      t    P>|t|     [95% conf
            > . interval]
            -------------+-----------------------------------------------------
            > -----------
            q25          |
                     IDV |   .0621627   .0402077     1.55   0.123    -.0169665 
            >     .141292
            GLPIntensity |  -15.09564   57.04752    -0.26   0.791    -127.3658 
            >    97.17449
            InflationG~l |  -.1796746   .0427945    -4.20   0.000    -.2638946 
            >   -.0954546
            Ruralpopul~a |  -22.46318   3.892317    -5.77   0.000     -30.1233 
            >   -14.80306
            Levelofdem~V |   .9068833   .1173834     7.73   0.000     .6758715 
            >    1.137895
            Populati~ual |   1.201762   .4077418     2.95   0.003     .3993217 
            >    2.004202
              TradeofGDP |    .022163   .0161614     1.37   0.171    -.0096428 
            >    .0539688
            Schoolenro~y |   -.021961   .0274474    -0.80   0.424    -.0759778 
            >    .0320558
            GDPgrowtha~l |   .0438488   .0628339     0.70   0.486    -.0798089 
            >    .1675065
            Wageandsal~l |  -.2915845   .0434977    -6.70   0.000    -.3771883 
            >   -.2059806
            Currenthea~f |  -.1595835   .3418894    -0.47   0.641    -.8324255 
            >    .5132585
            Arableland~l |  -.1507407   .0292173    -5.16   0.000    -.2082405 
            >   -.0932408
                   _cons |    61.6235   3.318998    18.57   0.000     55.09168 
            >    68.15532
            -------------+-----------------------------------------------------
            > -----------
            q50          |
                     IDV |   -.027398   .0239206    -1.15   0.253     -.074474 
            >     .019678
            GLPIntensity |  -109.2457   28.78524    -3.80   0.000    -165.8953 
            >   -52.59604
            InflationG~l |  -.2199388   .0270142    -8.14   0.000    -.2731031 
            >   -.1667746
            Ruralpopul~a |   -19.6259   3.039259    -6.46   0.000     -25.6072 
            >   -13.64461
            Levelofdem~V |   .9521651   .1020938     9.33   0.000     .7512434 
            >    1.153087
            Populati~ual |   1.304531   .3384198     3.85   0.000     .6385173 
            >    1.970545
              TradeofGDP |   .0206275   .0104486     1.97   0.049     .0000645 
            >    .0411905
            Schoolenro~y |  -.0092621   .0164646    -0.56   0.574    -.0416646 
            >    .0231404
            GDPgrowtha~l |   .1653781   .0721563     2.29   0.023     .0233737 
            >    .3073826
            Wageandsal~l |  -.3453577   .0274608   -12.58   0.000    -.3994008 
            >   -.2913147
            Currenthea~f |   .5299716    .267185     1.98   0.048     .0041486 
            >    1.055795
            Arableland~l |  -.1622347   .0271923    -5.97   0.000    -.2157495 
            >   -.1087199
                   _cons |   63.35494   3.176216    19.95   0.000     57.10411 
            >    69.60577
            -------------+-----------------------------------------------------
            > -----------
            q75          |
                     IDV |  -.0552767   .0276158    -2.00   0.046     -.109625 
            >   -.0009285
            GLPIntensity |  -114.7688   34.25533    -3.35   0.001    -182.1837 
            >   -47.35399
            InflationG~l |  -.2141787   .0541846    -3.95   0.000    -.3208145 
            >   -.1075429
            Ruralpopul~a |  -22.88303   3.294227    -6.95   0.000    -29.36611 
            >   -16.39996
            Levelofdem~V |   .8683934   .1968631     4.41   0.000     .4809647 
            >    1.255822
            Populati~ual |   1.342222   .4025617     3.33   0.001     .5499759 
            >    2.134467
              TradeofGDP |   .0237979   .0116377     2.04   0.042     .0008947 
            >    .0467011
            Schoolenro~y |  -.0211156   .0141656    -1.49   0.137    -.0489937 
            >    .0067626
            GDPgrowtha~l |    .104547    .079948     1.31   0.192    -.0527914 
            >    .2618854
            Wageandsal~l |  -.3751846   .0342158   -10.97   0.000    -.4425217 
            >   -.3078475
            Currenthea~f |   .8020906   .1569203     5.11   0.000     .4932698 
            >    1.110911
            Arableland~l |  -.1092221   .0395091    -2.76   0.006    -.1869764 
            >   -.0314678
                   _cons |   67.55661   3.133162    21.56   0.000     61.39051 
            >     73.7227
            -------------------------------------------------------------------
            > -----------
            
            . 
            . test [q25]IDV = [q75]IDV
            
             ( 1)  [q25]IDV - [q75]IDV = 0
            
                   F(  1,   296) =    7.58
                        Prob > F =    0.0063
            This gives me all the output required. However, do you know if I can use sqreg with panel data?

            Comment

            Working...
            X