Announcement

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

  • Dear valeria santa maria,

    I am not sure if I understand your question. The results will be valid if the assumptions of the estimator are valid. If your T is relatively small, you may want to use the jackknife correction, and I suggest you bootstrap the standard errors.

    Best wishes,

    Joao

    Comment


    • Originally posted by Joao Santos Silva View Post
      the new xtqreg module estimates a standard linear model with additive fixed effects, which is the model most practitioners have in mind when considering regression with fixed effects.
      Dear @Joao Santos Silva, when you said the above quote, did you mean the fixed effects, as in, for example, industry fixed effects, stats fixed effects and so on? If not, could you please further explain more about what you said in the above quote? Thank you

      Comment


      • Dear Duy To,

        Yes, that is what I mean: the model estimated by xtqreg is exactly like the model estimated by xtreg, fe. This contrasts with other quantile regression estimators "with fixed effects" that actually estimate models that do not include fixed effects.

        Best wishes,

        Joao

        Comment


        • Thank you @Joao Santos Silva. I have patiently read this whole 18-page thread, and I have learned a lot from it.

          From what I understand, if T is too small, it is not recommended to use the -xtqreg- command. I have T=8, which I think is worth the try in my case. You also have suggested using jackknife correction as well; therefore, I will try that as well.

          Through my reading, I also see that you recommend us to use the "correlated random effects" model in the case T is too small. My question is do you mean just the "correlated random effects" itself or "correlated random effects" with the association of quantile regression? I think it is the latter; however, I am not really sure how to combine them; and I am not sure if you meant to incorporate the "correlated random effects" with the -xtqreg- command (I highly doubt this is the case, though).

          I have read the reference regarding the use of "correlated random effects" that you have mentioned a couple of times throughout this thread; however, I do not know how to implement them since my coding skills are limited. Therefore, it would be great if you could provide some ideas on where to start, and I will work from there.

          Thank you so so much for your help.

          Comment


          • Dear Duy To,

            You are right is saying that mean CRE with QR (not using xtqreg). The implementation should be as in the reference I provided. If I am not mistaken, this just entails estimating by QR a standard CRE model, but I have never implemented that estimator.

            Best wishes,

            Joao
            Last edited by Joao Santos Silva; 30 Aug 2023, 04:56.

            Comment


            • Dear @Joao Santos Silva, thank you for your clarification.

              And yes, I have read that paper but still I could not get quite a good grasp of it. I know how to implement CRE but not really sure how to incorporate with QR in the panel data. Because to my knowledge, -qreg- package does not applicable for panel data, and your package (as well as -qregpd-) does not work with CRE; therefore, I am not really sure how to do it.

              I have asked the paper's authors already, hopefully they will get back to me soon (and hopefully they use STATA as well).

              Thank you again, Joao.

              Comment


              • Dear Duy To

                Hopefully the authors will help, but I believe you can use qreg2 with clustered standard errors.

                Best wishes,

                Joao

                Comment


                • Dear @Joao Santos Silva, I though -qreg- and -qreg2- are not applicable in panel data? I read through the help file for -qreg2-, even it does not mention whether it is suitable for panel, I remember you have mention somewhere in this thread that -qreg2- is not for panel data.

                  Comment


                  • Dear Duy To,

                    The command qreg2 does not allow for fixed effects, but you can use it with panel data and you can cluster the standard errors.

                    Best wishes,

                    Joao

                    Comment


                    • Dear Joao Santos Silva,

                      I am trying to estimate your fixed effect quantile regression with MM-QR-JK code.

                      After the code:

                      Code:
                      by idcode: egen c=count(idcode)
                      I get a "not sorted" warning.

                      Despite this when i continue to estimate *** Simple MM-QR estimation with fixed effects**:

                      Code:
                      xtqreg y x1 x2 x3 x4 if c>=10, ls q(0.10(0.40)0.90)
                      I get the warning "c ambiguous abbreviation"

                      I use Stata 17. I get the same results when I estimate data sets with different time dimension and observation. What could be the problem?

                      Comment


                      • Dear merve kaya,

                        You either need to sort the data by idcode, or you can skip the command that generated c and not include the if condition in the regression.

                        Best wishes,

                        Joao

                        Comment


                        • Thank you for your quick reply Joao Santos Silva,

                          The model worked when I removed the "if c" condition from the code.
                          Code gave the results of "Simple MM-QR estimation with fixed effects" according to different quantile levels. But after the "ereturn display" code in the last line of the file, it gave a single "MM-QR results with JK correction and clustered standard error" result. How to get "MM-QR results with JK correction and clustered standard error" results for different quantile levels?

                          Comment


                          • You have to run the command quantile by quantile.

                            Comment


                            • Dear Joao,

                              I am using modeling hierarchical data using xtqreg and I'm unsure if it fits a random or fixed coefficient model. I want to add random effects for the different levels of cluster (j = 1, 2, 3). I have attempted to do this using the following code:

                              Code:
                              xtqreg outcome age i.sex i.treatment, id(cluster)
                              I'm interested in how treatment effect can vary across cluster.

                              I would appreciate any advise.

                              Warmly,
                              Simone

                              Comment


                              • Dear Simone Alim,

                                The command fits a fixed effects model (so, a different intercept for each cluster); random effects are not generally used with quantile regression. If you want to see how treatment varies by cluster, you would need to interact the treatment with and cluster indicators (assuming you have enough observations in each cluster)

                                Best wishes,

                                Joao

                                Comment

                                Working...
                                X