Announcement

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

  • #16
    Yes, I'll be happy to do that next timeI update the command.

    Best wishes,

    Joao

    Comment


    • #17
      Dear Joao, Thanks in advance.

      Ho-Chuan (River) Huang
      Stata 19.0, MP(4)

      Comment


      • #18
        Dear Joao Santos Silva
        I have ran xtqreg command for running quantile regression analysis and I found that Bootsrap standerd errors are always good while using it.But i am getting below kind of results.Can you please help me on this


        Code:
        bootstrap ,cl( bankname) r(100) id(id) seed(123):xtqreg Zscore MP_callmoneyrate Boone_Ind TotalAsset Liquidi
        > tyRatio CBT FinFreedom NIM RI AssetcompositionRatiooffixe GDP INF Ratioofnonintrestoperating MP##C.MP_callmo
        > neyrate owmpmr ,quantile (.9)
        (running xtqreg on estimation sample)
        
        Bootstrap replications (100)
        ----+--- 1 ---+--- 2 ---+--- 3 ---+--- 4 ---+--- 5 
        ..................................................    50
        ..................................................   100
        
        Bootstrap results                               Number of obs     =        703
                                                        Replications      =        100
        
                                                      (Replications based on 83 clusters in bankname)
        ---------------------------------------------------------------------------------------------
                                    |   Observed   Bootstrap                         Normal-based
                             Zscore |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
        ----------------------------+----------------------------------------------------------------
                   MP_callmoneyrate |   .2275783          .        .       .            .           .
                          Boone_Ind |  -28.36535          .        .       .            .           .
                         TotalAsset |   6.06e-07          .        .       .            .           .
                     LiquidityRatio |   .9405847          .        .       .            .           .
                                CBT |  -.2851305          .        .       .            .           .
                         FinFreedom |   .0513436          .        .       .            .           .
                                NIM |   .0446368          .        .       .            .           .
                                 RI |   .0006666          .        .       .            .           .
        AssetcompositionRatiooffixe |  -11.17763          .        .       .            .           .
                                GDP |   .0327408          .        .       .            .           .
                                INF |  -.0023909          .        .       .            .           .
         Ratioofnonintrestoperating |   .0028424          .        .       .            .           .
                                    |
                                 MP |
                               TMP  |   .5958753          .        .       .            .           .
                   MP_callmoneyrate |          0  (omitted)
                                    |
              MP#c.MP_callmoneyrate |
                               TMP  |  -.1334673          .        .       .            .           .
                                    |
                             owmpmr |   .0095196          .        .       .            .           .
        ---------------------------------------------------------------------------------------------
        Thanks in advance

        Comment


        • #19
          Try again adding the fixed effect as follows:
          Code:
          bootstrap ,cl( bankname) r(100) id(id) seed(123):xtqreg Zscore MP_callmoneyrate Boone_Ind TotalAsset Liquidi
          > tyRatio CBT FinFreedom NIM RI AssetcompositionRatiooffixe GDP INF Ratioofnonintrestoperating MP##C.MP_callmo
          > neyrate owmpmr ,quantile (.9) i(id)

          Comment


          • #20
            Thankyou so much it works for me FernandoRios .but when I am adding i.year or ownership to the model ,I am getting following results
            Code:
            Bootstrap replications (100)
            ----+--- 1 ---+--- 2 ---+--- 3 ---+--- 4 ---+--- 5 
            xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx    50
            xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx   100
            insufficient observations to compute bootstrap standard errors
            no results will be saved
            r(2000);
            Can you please guide me on this

            Comment


            • #21
              I think its because i didnt understand your data structure.
              Probably what you should be doing is the following

              bootstrap , cl( bankname) r(100) seed(123):xtqreg Zscore MP_callmoneyrate Boone_Ind TotalAsset Liquidi
              > tyRatio CBT FinFreedom NIM RI AssetcompositionRatiooffixe GDP INF Ratioofnonintrestoperating MP##C.MP_callmo
              > neyrate owmpmr ,quantile (.9) i(bankname)

              But you will have to adapt this based on your data structure.


              Comment


              • #22
                Thankyou so much @FernandoRios
                My panel id is bankname and having observations around 730 .my N is greater than T .This is the equation I tried,I tried to incorporate year effects and ownership effects in to the model and got the above results
                Code:
                 
                 bootstrap ,cl( bankname) r(100) id(id) seed(123):xtqreg Zscore MP_callmoneyrate Boone_Ind TotalAsset Liquidi > tyRatio CBT FinFreedom NIM RI AssetcompositionRatiooffixe GDP INF Ratioofnonintrestoperating MP##C.MP_callmo > neyrate owmpmr i.year i.ownership,quantile (.9) i(id)

                Comment


                • #23
                  Dear All,

                  I have a panel (n = 24 and T = 700) and I would like to use xtqreg with bootstrap and clustered standard errors.

                  I applied the code as in #13 ( (1) in my code hereafter) and I get nice location, scale and quantile results. However, when I run (2) with bootstrap, I get only results for the quantile even including the option “ls”. I would like to get point estimates and robust (clustered and bootstrapped) statistics for both - the location and scale parameters.

                  Could you please suggest how to get location and scale point estimate and bootstrapped and clustered se out of “bootstrap […] : xtqreg […]” ?

                  Based on Prof. Joao Santos Silva's suggestion in https://jmcss.som.surrey.ac.uk/MM-QR-JK.do, in (2) I tried to extract scale and location point estimates and statistics using e(V_scale) and e(V_location), unfortunately the latter are clustered but not bootstrapped, given they are the same as in the output from (1).

                  Am I on the right path? Do you have a different strategy? Thanks a lot!

                  Code:
                  xtset hour (Yes, this is my cross-section dimension)

                  * (1)
                  xtqreg price solar wind load cable, ls

                  * (2)
                  bootstrap, cluster(hour) rep(20) seed(123): xtqreg price solar wind load cable, ls

                  matrix list e(b_location)
                  matrix list e(b_scale)
                  matrix list e(V)
                  matrix list e(V_location) // same se as in (1)
                  matrix list e(V_scale) // same se as in (1)

                  Comment


                  • #24
                    Dear Elia Scapini,

                    I believe you would have to have to write a small program to be able to do that (the Stata's help file for bootstrap), but you really do not need that because the scale and location parameters are reported with clustered standard errors and there is no gain in replacing them with bootstrap standard errors (they are asymptotically equivalent).

                    Best wishes,

                    Joao

                    Comment


                    • #25
                      Dear Joao Santos Silva,

                      Many thanks for the quick and helpful reply !

                      If you allow, I have a brief question related to your paper : Machado and Santos Silva 2019 - Quantiles via moments.
                      There you mention : "This setup assumes that the covariates affect conditional distribution of Y only through scale and location functions". You also mention that this is testable.

                      I was thinking about plotting the fitted values distribution and check if a change in higher moments occurs to have an initial hint of the validity of this assumption.
                      Could you give me a hint ? What would be your approach to this ?

                      Thank you in advance !

                      Elia

                      Comment


                      • #26
                        Dear Elia Scapini,

                        The U hat standardised residuals mentioned on page 148 should be independent of the regressors. So, we can do a M-type test to check that powers of those residuals are not correlated with the regressors. So, a firsts step could be to plot powers of those residuals against regressors and see what that looks like.

                        Best wishes,

                        Joao

                        Comment


                        • #27
                          Dear Joao Santos Silva,

                          Your help is much appreciated !

                          Sincerely,

                          Elia

                          Comment

                          Working...
                          X