Announcement

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

  • #31
    Dear FernandoRios
    I've been suggested to do a quantilic regression in panel data and I've found 'mmqreg' command very useful. But I have some doubts. First, is there any postestimation measure about the quality of the model fitted with 'mmqreg'? How can I evaluate the heteroskedasticity and autocorrelation? Second, how can I plot the results?

    I am trying to create a model which can predict the influence of a kind of tax renounce directed to small firms on the aggregated of the labor force. The unit in my panel is not the firm but the economic sectors (that amount 17) in 27 states. I thank you if you could help me with a insight.

    Comment


    • #32
      Hi Tony,
      Not sure about post-estimation tests. I think the only one that Santos-Silva suggested at some point was a pseudo R2. But such measure is not very useful for qregressions in general
      Regarding heteroskedasticity, ALL qregressions show heteroskedasticity. In fact, its that heteroscedasticity that provides the heterogeneity needed to identify effects that vary across quantiles.
      So, if any of the scale coefficients its significant, you have heteroskedasticity.

      For plotting, you can install my command "qregplot". It can handle most quantile regression kind of results to create plots. Look into the helpfile for examples, or check my blog https://friosavila.github.io/playing..._qregplot.html

      Not sure about your last point. May need more information to say anything relevant on that point.
      F

      Comment


      • #33
        Thanks, FernandoRios

        Two additional questions if you can help me:
        1. What are the main differences between the mmqreg estimator for quantile regression and the one created by Koenker?

        2. Is it possible to estimate a hierarchical model for quantile regression with mmqreg?



        Comment


        • #34
          Hi Tony
          Q1. You will find all the details of the estimator in Machado and Santos Silva 2019 paper. It is part of my references in the help file.
          However, the main difference with Koenker's qreg is that quantiles are identified based on a heteroskedastic model. Thus rather than estimating all coefficients for all quantiles (different regression everytime) mmqreg and xtqreg identify the effects by estimating a location effect (mean) and scale effect (variance) where the quantile effect is just location + Q * scale

          Q2. Not sure what you have in mind as hierarchical model , but I think the answer will be no

          HTH
          F

          Comment


          • #35
            Dear Tony Ricardi,

            In addition to the helpful explanation provided by Fernando, note that mmqreg allows the use of fixed effects (that is the default in xtqreg which implements the same estimator), whereas you should not use fixed effects with qreg.

            Best wishes,

            Joao

            Comment


            • #36
              Dear FernandoRios e Joao Santos Silva

              Thank you very much for the clarification.
              One more question if you permit me: how about endogenous variables? Can I use IV with mmqreg or xtreg?

              Fernando, as for hierarchical model, I refer to the models that contain two estimators of fixed effects, one for each level of the hierarchy, e.g., a school and its classes or a country and its states.

              Comment


              • #37
                Hi Tony
                I think i would call that just multiple fixed effects!.
                And yes, you can do that. something like
                mmqreg y x1 x2 x3, abs(f1 f2 f3 f4)
                etc
                Of course the more fixed effects you add, the slower it will be. You also need "enough" observations per fixed effect. For Panel data, I think it is recommended to have 15 or 20 periods. So, you may want to have something similar for each subgroup in your fixed effects.

                Regarding IV, Joao Santos Silva has his other command ivqreg2, which deals with endogeneity but not fixed effects. That being said, I think it may be possible to adapt the logic behind quantile regressions via moments to use fixed effects and endogenous variables, but has yet to be implemented. (as far as I know)
                HTH

                Comment


                • #38
                  Thank you very much, FernandoRios.

                  My panel has 16 industries and 27 states, with an 8 year timescale (2011-2018). I thus have 3456 observations.
                  The id of the panel is the industry+state interaction. But I intend to put two fixed effects: one for industries (economic dimension) and one for states (geographical dimension), instead of a single fixed effect for the industry+state interaction. Do you think it is possible?

                  Comment


                  • #39
                    Mechanically yes,
                    mmqreg allows you to absorb fixed effects similar to what -reghdfe- does.
                    (see my example, I was adding 4 fixed effects)
                    Now, whether or not the results will make sense is a different question. You probably want to explore this, and see if the estimates you may obtain are reasonable or not.

                    Comment


                    • #40
                      Yes. My question is precisely the small time scale (8 years). Do you have any suggestions on what I can do to get a consistent estimate?

                      Comment


                      • #41
                        Two options
                        1) Joao Santossilva has a small code on his personal page that implements a jackknife correction. That may help
                        2) you could apply a correlated random effects approach
                        in both casa you may need extra steps
                        f

                        Comment


                        • #42
                          FernandoRios , how can I apply a correlated random effects approach in this case? What is the command in stata in the case of quantile regression?

                          Comment


                          • #43
                            There is no command "yet"
                            but here a simple example:

                            Code:
                            use c:\data\oaxaca, clear
                            ssc install qregplot
                            ssc install qreg2
                            
                            keep if lnwage!=.
                            foreach i in educ exper tenure female {
                                bysort isco:egen m_`i'=mean(`i')
                            }
                            
                            qreg2 lnwage educ exper tenure female  , cluster(isco)
                            qregplot educ, estore(m1)
                            qreg2 lnwage educ exper tenure female  m_* , cluster(isco)
                            qregplot educ, estore(m2)
                            qreg2 lnwage educ exper tenure female  i.isco , cluster(isco)
                            qregplot educ, estore(m3)
                            
                            qregplot educ, from(m1) name(m1, replace)
                            qregplot educ, from(m2) name(m2, replace)
                            qregplot educ, from(m3) name(m3, replace)
                            
                            graph combine m1 m2 m3, ycommon nocopies
                            The first one is qreg without fixed effects, the second one has the correlated random effects, and the third one has dummy variables.

                            HTH

                            Comment


                            • #44
                              Thanks FernandoRios. It will be very useful.

                              Comment


                              • #45
                                Dear Fernando, a last question if you could help me: in the correlated random effects model, which variables should I use the mean? the time invariant ones?

                                Comment

                                Working...
                                X