Announcement

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

  • qregplot A module for plotting quantile regression Coefficients

    Dear all,
    Thanks to Prof. Baum, a new command "qregplot" is available from SSC.

    This new command is similar to -grqreg- (by Joao Pedro Azevedo), and will plot coefficients from after the official -qreg-, -bsqreg- and -sqreg- commands.
    This command, however, can be thought of as an upgrade on -grqreg- as it can do the following:
    - In contrast with -grqreg-, it will work well when using factor notation.
    - It provides more flexibility on deciding how the graph works, as one can add options to each component of the figure: the CI (rarea); point estimates (line); the combination of CI and point estimates (two way); and the combination of all coefficients graphs (graph combine)
    - Because the hardest part is often the "graph design" (takes time to make it look just right), -qregplot- can store all the quantile regression coefficients in memory (as you would store a regression output), and create graphs directly from those stored results. No need to "redo" the model estimation.
    - Lastly, -qregplot- can also be used after other community-contributed commands. On this version, you could use it after:
    xtqreg2, qreg2 and ivqreg2 (Machado - Santos Silva)
    qrprocess ( Chernozhukov, Fernández-Val, and B. Melly)
    mmqreg, rifhdreg, rif(q()) (Rios-Avila)

    One last comment.
    You will need to update the following commands if you want to use it: xtqreg2, qreg2, ivqreg2, mmqreg

    Hope you find it useful
    Fernando



  • #2
    thanks

    Comment


    • #3
      However, when I run “ xtqreg wage age education i.married children , i(county) ” and “qregplot age education i.married children, q(5(5)95) ” with Stata Mac 16.1., there is the problem!
      "something required
      If the above message is not useful, please contact me at [email protected]"
      Could you kindly update it , thanks!

      Comment


      • #4
        I cannot reproduce the problem
        did you update xtqreg? and just incase, update qregplot too?

        Comment


        • #5
          FernandoRios I tried to use the qregplot after estimating mmqreg but I kept getting the error variable not found in the varlist. I can't understand why even when my variables are well specified..

          Comment


          • #6
            Do you have the latest versions of qregplot and mmqreg?
            please check with versions you have and let me know

            Comment


            • #7
              I am using stata 17 and I just replace the previous version of both mmqreg and qregplot using SSC install qregplot, replace and SSC install mmqreg, replace and still the same issue

              Comment


              • #8
                Mmqreg version 2.3 while qregplot version1.1 (APR, 2022)

                Comment


                • #9
                  Can you send me an email with your data and a replicable example?
                  the email is in the help file

                  Comment


                  • #10
                    Ok so checking back your previous question
                    the way to implement qregplot is as follows:

                    1. you estimate your qreg model
                    mmqreg y x1 x2 x3

                    2. you call on qregplot to plot the coefficients
                    qregplot
                    or
                    qregplot x1 x2

                    In other words you only add the independent variables NOT the dependent ones

                    HTH

                    Comment


                    • #11
                      Hello FernandoRios, I wonder if you can help.

                      For some reason, qregplot is not accepting interactions anymore.
                      I've used it many times before, could there be any bug?
                      I've updated the qregplot version, still not working.
                      I am using after rifhdreg.

                      Code:
                      qregplot 1.treat#1.post , q(5(5)95)
                      interactions not allowed

                      Thank you so much!!
                      Last edited by Sandra Macedo; 30 Sep 2022, 13:16.

                      Comment


                      • #12
                        Hi Sandra
                        Perhaps its because of your "rifhdreg" line
                        You should be typing
                        rifhdreg y i.treat#i.post
                        instead of
                        rifhdreg y treat#post

                        I think that is what is creating the problem

                        Comment


                        • #13
                          oh yes you're right!! it's working! thanks!

                          Comment


                          • #14
                            Hi Rios,
                            I run:
                            Code:
                            bootstrap, cluster(state_fips) reps(200): rifhdreg y treat $statecontrols,abs(ID event_year) rif(q(50))
                            Code:
                            qregplot treat,  q(5(5)95) seed(101) label
                            and I got:
                            invalid 'abs'
                            If the above message is not useful, please contact me at [email protected].
                            Thanks a lot!

                            Comment


                            • #15
                              Reinstall Rif from ssc and use the command bsrifhdreg

                              Comment

                              Working...
                              X