Announcement

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

  • Quantile Regression

    i need help in Quantile regression. How to change mu value μ = 0.1 or μ = 0.9 or μ = 0.2 in quantile regression for robustness analysis? what is stata command for it? any help would be appreciated.

  • #2
    Welcome to Statalist.

    If your question is that you are using the qreg command, and you want to change the quantile from the default of 0.5 (median regression) to some other value, then the output of help qreg tells us that adding the quantile() option to your command is what you need.

    Code:
    Options for qreg
    
        quantile(#) specifies the quantile to be estimated and should be a number between 0 and 1,
            exclusive.  Numbers larger than 1 are interpreted as percentages.  The default value of 0.5
            corresponds to the median.
    The examples at the bottom of the output of help qreg show several versions of the quantile() option.

    If I have misunderstood what you want, then please take a few moments to review the Statalist FAQ linked to from the top of the page, as well as from the Advice on Posting link on the page you used to create your post. Note especially sections 9-12 on how to best pose your question.

    In this case, it would be helpful to know the command you are using, what it does, and precisely how you want that to differ.

    Comment


    • #3
      Thanks @william for your valuable help. please see the attached image.
      Attached Files

      Comment


      • #4
        I have found online a similar table to the one you show in post #3, in the paper at https://doi.org/10.3390/su10114067 for which full text was available.

        From the text and its references, it appears that the quantile regression reported in the table is actually from a method for panel quantile regression on longitudinal data. The method is described in
        Koenker, R. Quantile regression for longitudinal data. J. Multivar. Anal. 2004, 91, 74–89 (https://doi.org/10.1016/j.jmva.2004.05.006).
        The parameter mu is a apparently tuning parameter that controls that regression technique. I have no access to Koenker's paper to learn more about the technique or how it was implemented.

        The qreg command in Stata is not designed for longitudinal data and does not implement Koenker's technique. If your data are panel data, then qreg is not appropriate, and it does not seem that you will be able to replicate ini Stata the technique in the paper you have shown.

        For Stata, there is apparently the user-written qregpd command available from SSC (see the output of ssc describe qregpd for details). It does not implement Koenker's technique, but rather that of
        David Powell. "Quantile Regression with Nonadditive Fixed Effects" Quantile Treatment Effects (2016) http://works.bepress.com/david_powell/1/
        You would have to review the papers to see how the two techniques differ.

        Comment


        • #5
          Thanks @william for your valuable suggestions. i will follow.


          Regards,

          Comment


          • #6
            Dear rabiya gill,

            William Lisowski is correct in saying that mu is a tuning parameter; it is a penalty to impose some shrinking just like in LASSO. I am not aware of any way of implementing Koenker's (2004) method in Stata and I note that qregpd estimates a very different model that does not include the fixed effects. An alternative is to use xtqreg, which estimates a model similar to the one consider in Koenker (2008) but does not impose the restriction that the fixed effects are constant across quantiles and it does not require the choice of a tuning parameter. Please read the help file for the command and the references therein.

            Best wishes,

            Joao

            Comment


            • #7
              Originally posted by Joao Santos Silva View Post
              Dear rabiya gill,

              William Lisowski is correct in saying that mu is a tuning parameter; it is a penalty to impose some shrinking just like in LASSO. I am not aware of any way of implementing Koenker's (2004) method in Stata and I note that qregpd estimates a very different model that does not include the fixed effects. An alternative is to use xtqreg, which estimates a model similar to the one consider in Koenker (2008) but does not impose the restriction that the fixed effects are constant across quantiles and it does not require the choice of a tuning parameter. Please read the help file for the command and the references therein.

              Best wishes,

              Joao
              thanks professor for your valuable suggestions. yes i am following XTQREG command on stata. but i am facing another difficulty now. how to plot the coefficients if we use XTQREG command. i need stata command for it. Kindly help me in this regard.


              Regards,

              Comment


              • #8
                Hi Rabiya
                There is no command for plotting xtqreg coefficients. You simply have to collect them all, and go from there.
                You can potentially use the user written command coefplot.
                BEst

                Comment


                • #9
                  Originally posted by FernandoRios View Post
                  Hi Rabiya
                  There is no command for plotting xtqreg coefficients. You simply have to collect them all, and go from there.
                  You can potentially use the user written command coefplot.
                  BEst
                  Many many thanks professor. you solved my problem.


                  Regards,

                  Comment


                  • #10
                    Dear professor joao,
                    can you please explain me all steps to plot quantiles graphs with OLS coefficients and also with shaded confidence interval after XTQREG command. as i am stuck and my project deadline is also coming near.. i want to draw such graphs which are attached here. your help will be appreciated.



                    Regards,
                    Rabia
                    Attached Files

                    Comment


                    • #11
                      Sorry, rabiya gill, I am not an expert on plots using Stata. I am sure other users will be able to help you.

                      Comment

                      Working...
                      X