Announcement

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

  • qregpd

    Dear stata users, I use the commad qregpd to deal with my data, but the result is different every time. Sometimes the independent variable is significantly positive with the dependent variable, but sometimes the relationship is negative. why and what should I do next step?

  • #2
    Dear Zhuomin Liu,

    This happens because the command uses random numbers, so if you want to replicate the results you need to set the seed.

    On a different note, are you sure that is the command you want to use? That command estimates a mode that is very different from what most researchers have in mind, so you should be careful when using it. If what you want to do is to estimate quantile regression with fixed effects, have a look at the xtqreg command (or mmqreg, which implements the same estimator).

    Best wishes,

    Joao

    Comment


    • #3
      Originally posted by Joao Santos Silva View Post
      Dear Zhuomin Liu,

      This happens because the command uses random numbers, so if you want to replicate the results you need to set the seed.

      On a different note, are you sure that is the command you want to use? That command estimates a mode that is very different from what most researchers have in mind, so you should be careful when using it. If what you want to do is to estimate quantile regression with fixed effects, have a look at the xtqreg command (or mmqreg, which implements the same estimator).

      Best wishes,

      Joao
      Dear @Joao,

      It's inspiring! Thank you for your information.

      Best regards,
      Zhuomin

      Comment


      • #4
        Originally posted by Joao Santos Silva View Post
        Dear Zhuomin Liu,

        This happens because the command uses random numbers, so if you want to replicate the results you need to set the seed.

        On a different note, are you sure that is the command you want to use? That command estimates a mode that is very different from what most researchers have in mind, so you should be careful when using it. If what you want to do is to estimate quantile regression with fixed effects, have a look at the xtqreg command (or mmqreg, which implements the same estimator).

        Best wishes,

        Joao
        Dear Joao Santos Silva ,

        Actually I want to use panel data to estimate quantile regression without fixed effect. what command should I use?

        Thank you,
        Zhuomin

        Comment


        • #5
          Dear Zhuomin Liu,

          You can use qreg2 and cluster the standard errors.

          Best wishes,

          Joao

          Comment


          • #6
            Dear Joao Santos Silva ,

            Thank you so much, I'll try it!

            Best regards,
            Zhuomin

            Comment


            • #7
              Dear Joao Santos, is it possible to apply a correlated random effects approach with mmqreg?

              Comment


              • #8
                Hi Tony
                you do not need to combine correlated random effects with mmqreg.
                If you do want to use correlated random effects, try using the files I'm attaching here
                Attached Files

                Comment


                • #9
                  Thank you FernandoRios. I'll use the files. These commands allow to estimate CRE for different quantiles?

                  Comment


                  • #10
                    Hi Tony,
                    you will see the CRE command works more as a prefix
                    when you apply it, it will create on the background all the "means" and add them to your model specification.
                    So, you could start, for example, going for the examples in the helpfile
                    you could technically use this for ANY command, but haven't tried all possible cases.
                    HTH
                    F

                    Comment


                    • #11
                      Dear Tony Ricardi,

                      Just to add to Fernando's helpful comments, I do not think it makes sense to use CRE with mmqreg or xtqreg because these commands implement a fixed effects estimator. If your T is large enough, I would say that a FE estimator is better than CRE.

                      Best wishes,

                      Joao

                      Comment


                      • #12
                        FernandoRios , I've run the files with the examples. Very useful. Thank you very much.

                        Joao Santos Silva, you are absolutely right. In fact, it can't make sense to use CRE with mmqreg. I have a little problem, my T is not too large (only 8 periods). Could you suggest a command to run with the CRE prefix (as in the files sent by Fernando) in order to get results comparable to those obtained with mmqreg?

                        Comment


                        • #13
                          Hi Tony
                          just change whatever command I have there with qreg
                          if you really want the simultaneous qregression try qrprocess (ssc)
                          Sqreg, or even mmqreg but without fixed effects (drop the abs() option)
                          Fernando
                          for example

                          Code:
                          use http://fmwww.bc.edu/RePEc/bocode/o/oaxaca.dta
                          ** CRE using mmqreg
                          cre, abs(isco) : mmqreg lnwage educ exper tenure, q(10 90)
                          est sto m1
                          ** FE approach
                          mmqreg lnwage educ exper tenure, abs(isco) q(10 90)
                          est sto m2
                          esttab m1 m2
                          Last edited by FernandoRios; 21 Sep 2022, 18:11.

                          Comment


                          • #14
                            Perfect, FernandoRios. I will do it with my dataset. One last doubt: does the option abs() remain after cre?
                            cre, abs(isco)

                            Comment


                            • #15
                              Yes, basically if you do not do that, CRE is meaningless
                              you either have to absorb the fixed effects in the regression, or using cre.
                              I would suggest to look into the correlated random effect model. Intro to econometrics by Wooldrige explains it well, for the linear panel model.
                              I would also suggest to do this by hand (not CRE) first so you understand the mechanics of meaning of what is happening before you apply cre. Otherwise, it will just be a black box you wont be able to explain when asked.
                              HTH

                              Comment

                              Working...
                              X