Announcement

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

  • Unconditional Quantile Regression

    Dear all,
    Hope you all are doing well. I am using UQR and attempted to install xtrifreg using the below-given commands. However, both commands are resulting in errors in STATA 17 -

    "ssc install xtrifreg
    ssc install: "xtrifreg" not found at SSC, type search xtrifreg
    (To find all packages at SSC that start with x, type ssc describe x)
    r(601);

    ssc install oaxaca_rif
    ssc install: "oaxaca_rif" not found at SSC, type search oaxaca_rif
    (To find all packages at SSC that start with o, type ssc describe o)
    r(601)"

    Could you please provide guidance on how to run unconditional quantile regression in STATA 17? Which commands should I use?
    Thank you in advance for your help.
    Last edited by Tas nim; 25 Mar 2024, 07:35. Reason: unconditional quantile regression, quantile regression, STATA17

  • #2
    Hi Tas
    my commands oaxaca_rif and rifhdreg (an improvement over xtrifreg) can be installed using
    ssc install rif
    type help rif afterwards
    F

    Comment


    • #3
      You can also use the code:
      Code:
      findit xtrifreg
      it is located under the link that starts with: "st0438..."

      Comment


      • #4
        Thank you so much for your prompt support, Fernando and Frode. Yes, it worked!! I need another help of yours. So, I am working with cross-sectional data and want to perform UQR for the 25th, 50th and 75th quantiles. For this, is it the correct command? -
        “foreach q in 25 50 75 {
        local tau = `q'/100
        rifhdreg hhgender hhhage edu1, edu2, edu3, rif(q(`tau')) abs(hhexp)
        }”
        Also, how can I visually present them? I aim to depict the relationship between the primary independent variable and the dependent variable among rural and urban households across the 25th, 50th, and 75th quantiles.

        Comment


        • #5
          you need to install `qregplot` from ssc
          Then:

          rifhdreg hhgender hhhage edu1 edu2 edu3, rif(q(50)) abs(hhexp)
          qregplot hhhage

          and done. Look into helpfile for other options
          Last edited by FernandoRios; 25 Mar 2024, 10:01.

          Comment


          • #6
            Thank you once again. Previously, I attempted to use 'rifhdreg' for UQR, but it didn't work. Then, I used 'uqreg hhexp hhgender hhage edu1, edu2, edu3, q(75) method(reg)' and it worked for all three quantiles. Following your advice, I installed 'ssc install rif' and now 'ssc install qregplot'. However, 'righreg' is not working. Did I miss something in between? Could you please guide me on what to use for plots?

            Comment


            • #7
              what did not work?
              can you type your trying exactly?
              did you try looking into the helpfiles from qregplot?

              Comment


              • #8
                Yeah, I am giving the commands I used below:
                (i) My command: ssc install rif
                installation complete.
                (iii) Then
                My command: rifhdreg hhgender hhhage edu1 edu2 edu3, rif(q(50)) abs(hhexp)
                Error: command reghdfe is unrecognized

                (iv) Then, I found the command, "uqreg" from STATA Help for Unconditional quantile regression and it worked perfectly for the three quantiles

                My command: uqreg hhexp hhgender hhhage edu1 edu2 edu3, q(75) method(reg)

                (v) ssc install qregplot
                installation complete.

                Now, I want to present the relationship between the primary independent variable and the dependent variable across the 25th, 50th, and 75th quantiles. And yes, I looked into the help files of qreg. But it suggested to run rifhdreg for UQR but mine isn’t working as I mentioned in step (iii).
                Last edited by Tas nim; 25 Mar 2024, 11:17.

                Comment


                • #9
                  you need to install reghdfe as well. (its a dependency)
                  UQREG will also estimate unconditional quantiles, but under slightly different approach. See the paper in the helpfile for references.
                  qregplot does not work with uqreg
                  F

                  Comment


                  • #10
                    I am really grateful for your time and suggestions. Now, reghfe and qregplot worked perfectly.

                    Comment

                    Working...
                    X