Announcement

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

  • qreg vs. sqreg

    Hi,

    I need to estimate a specification for different quantiles. What is the theoretical difference between running different regressions for each quantile with qreg or one with sqreg?

    Thanks!

  • #2
    In short, the qreg performs quantile regression while sqreg performs simultaneous-quantile regression. The simultaneous-quantile regression "produces quantile regression estimates for several values of quantiles simultaneously, allowing for differences between coefficients for different quantiles to be tested"(1). Please see the following example (borrowed from here):
    Code:
    webuse auto
    qreg price weight length foreign, quantile(.25)
    qreg price weight length foreign, quantile(.50)
    qreg price weight length foreign, quantile(.75)
    sqreg price weight length foreign, q(.25 .5 .75)
    * You can now test whether the effect of weight is the same at the 25th and 75th percentiles:
    test[q25]weight = [q75]weight
    * You can obtain a confidence interval for the difference in the effect of weight at the 25th and 75th percentiles:
     lincom [q75]weight-[q25]weight
    

    Comment


    • #3
      So it allows to conduct tests for the coefficients, but, as it seems from the example, the coefficients wouldn't change using one or the other, right?

      Comment


      • #4
        Yes, Maria, exactly the same as illustrated by Amin's example.

        Best wishes,

        Joao

        Comment


        • #5
          Thanks both!!

          Comment


          • #6
            Originally posted by Amin Sofla View Post
            In short, the qreg performs quantile regression while sqreg performs simultaneous-quantile regression. The simultaneous-quantile regression "produces quantile regression estimates for several values of quantiles simultaneously, allowing for differences between coefficients for different quantiles to be tested"(1). Please see the following example (borrowed from here):
            Code:
            webuse auto
            qreg price weight length foreign, quantile(.25)
            qreg price weight length foreign, quantile(.50)
            qreg price weight length foreign, quantile(.75)
            sqreg price weight length foreign, q(.25 .5 .75)
            * You can now test whether the effect of weight is the same at the 25th and 75th percentiles:
            test[q25]weight = [q75]weight
            * You can obtain a confidence interval for the difference in the effect of weight at the 25th and 75th percentiles:
            lincom [q75]weight-[q25]weight
            Dear Amin,

            I have another query about the sqreg command. If I want to run a model with the following equation:

            sqreg price weight length foreign where quintile will be computed based on gear_ratio (this variable is mentioned in the data file "auto").

            Is it possible to run the model sqreg model?

            Recently, I have got a revision of one of my papers where the reviewer suggests me to run a simultaneous quintile model following the specification I have mentioned. I think sqreg computes the quintile based on the dependent variable.

            Your suggestion would be highly appreciated.

            Best wishes,

            Aryan
            Last edited by Aryan Bose; 03 Mar 2020, 18:27.

            Comment


            • #7
              As far as I understand quantile regression, it is not possible to base the quantiles on only one independent variable if you have also other independent variables. The best you can do probably is to generate the quintiles for your independent variable and then use an if-condition for quantile regression. In that way you would first condition on the independent variable and then run the quantile regression as usual.
              See some example code below.
              Code:
              sysuse auto
              xtile gear_ratio_quintiles = gear_ratio ,n(5)
              forvalues i=1/5{
               qreg price weight length foreign if gear_ratio_quintiles==`i'
              }
              I fear that I might misunderstand what exactly you mean with:
              ... where quintile will be computed based on gear_ratio...
              How exactly do you want to base the quintiles of dependent variable on one indepedent variable?

              Comment


              • #8
                Hi Aryan,
                I think you have a common misconception about (conditional) quantile regressions.
                It is not the case that quantile regressions constraints your data in any way. what it does is to search for the combination of coefficients (linear combination), such that q% of the data will have an observed outcome "y" below the linear prediction (xb(q)) and (1-q)% will have an outcome bellow that prediction.

                Perhaps what you have in mind is closer to what Sven is saying. Estimate the model such that you put more weight to observations with the gear ration close to some value (quantile) of the gear-ratio distribution.

                As Sven suggests, you can do a regression based on subsamples. But can also estimate the same model using local kernel regressions.

                Something like this:
                Code:
                sysuse auto, clear
                price weight length foreign [pw=normalden(gear_ratio,2.43,0.35)]
                est sto m1
                price weight length foreign [pw=normalden(gear_ratio,2.955,0.35)]
                est sto m2
                price weight length foreign [pw=normalden(gear_ratio,3.78 ,0.35)]
                est sto m3
                
                esttab m1 m2 m3
                
                
                ------------------------------------------------------------
                                      (1)             (2)             (3)   
                                    price           price           price   
                ------------------------------------------------------------
                weight              7.944***        3.932***        3.007   
                                  (1.430)         (1.093)         (1.807)   
                
                length             -149.6**        -52.27           16.54   
                                  (49.93)         (35.66)         (57.11)   
                
                foreign            4509.5*         3323.9***       3196.5** 
                                 (2093.7)         (712.8)         (886.7)   
                
                _cons              8841.7          2842.3         -6485.8   
                                 (5963.5)        (3914.9)        (6348.9)   
                ------------------------------------------------------------
                N                      33              49              23   
                ------------------------------------------------------------
                Standard errors in parentheses
                * p<0.05, ** p<0.01, *** p<0.001
                HTH


                Comment


                • #9
                  Originally posted by Sven-Kristjan Bormann View Post
                  As far as I understand quantile regression, it is not possible to base the quantiles on only one independent variable if you have also other independent variables. The best you can do probably is to generate the quintiles for your independent variable and then use an if-condition for quantile regression. In that way you would first condition on the independent variable and then run the quantile regression as usual.
                  See some example code below.
                  Code:
                  sysuse auto
                  xtile gear_ratio_quintiles = gear_ratio ,n(5)
                  forvalues i=1/5{
                  qreg price weight length foreign if gear_ratio_quintiles==`i'
                  }
                  I fear that I might misunderstand what exactly you mean with: How exactly do you want to base the quintiles of dependent variable on one indepedent variable?
                  Many thanks Sven-Kristjan. It works fine. The quintile will be computed based on gear_ratio whichever you have already computed. In this case, five regressions are running within a loop. Does it indicate simultaneous quintile regression? I have no idea. That's why I am looking for help.

                  Best wishes,

                  Aryan

                  Comment


                  • #10
                    Originally posted by FernandoRios View Post
                    Hi Aryan,
                    I think you have a common misconception about (conditional) quantile regressions.
                    It is not the case that quantile regressions constraints your data in any way. what it does is to search for the combination of coefficients (linear combination), such that q% of the data will have an observed outcome "y" below the linear prediction (xb(q)) and (1-q)% will have an outcome bellow that prediction.

                    Perhaps what you have in mind is closer to what Sven is saying. Estimate the model such that you put more weight to observations with the gear ration close to some value (quantile) of the gear-ratio distribution.

                    As Sven suggests, you can do a regression based on subsamples. But can also estimate the same model using local kernel regressions.

                    Something like this:
                    Code:
                    sysuse auto, clear
                    price weight length foreign [pw=normalden(gear_ratio,2.43,0.35)]
                    est sto m1
                    price weight length foreign [pw=normalden(gear_ratio,2.955,0.35)]
                    est sto m2
                    price weight length foreign [pw=normalden(gear_ratio,3.78 ,0.35)]
                    est sto m3
                    
                    esttab m1 m2 m3
                    
                    
                    ------------------------------------------------------------
                    (1) (2) (3)
                    price price price
                    ------------------------------------------------------------
                    weight 7.944*** 3.932*** 3.007
                    (1.430) (1.093) (1.807)
                    
                    length -149.6** -52.27 16.54
                    (49.93) (35.66) (57.11)
                    
                    foreign 4509.5* 3323.9*** 3196.5**
                    (2093.7) (712.8) (886.7)
                    
                    _cons 8841.7 2842.3 -6485.8
                    (5963.5) (3914.9) (6348.9)
                    ------------------------------------------------------------
                    N 33 49 23
                    ------------------------------------------------------------
                    Standard errors in parentheses
                    * p<0.05, ** p<0.01, *** p<0.001
                    HTH

                    Many thanks FernandoRios. In the regression, gear_ratio, 2.43, 0.35. I did not understand the 0.35 in each equation. I can assign the 5 quintiles of gear_ratio within the bracket like:

                    sysuse auto, clear
                    reg price weight length foreign [pw=normalden(gear_ratio, 0.20)]
                    est sto m1
                    reg price weight length foreign [pw=normalden(gear_ratio, 0.40)]
                    est sto m2
                    reg price weight length foreign [pw=normalden(gear_ratio, 0.60)]
                    est sto m3
                    reg price weight length foreign [pw=normalden(gear_ratio, 0.80)]
                    est sto m4
                    reg price weight length foreign [pw=normalden(gear_ratio, 100)]
                    est sto m5
                    esttab m1 m2 m3 m4 m5

                    Do you think I can argue that it is a simultaneous quintile regression. Reviewer of one of my research papers are asking this analysis. That's why I am desperately asking for help.

                    Best wishes,

                    Aryan

                    Comment


                    • #11
                      No. That's what simultaneous quantile regression does. You could look at the code for the sqreg-command by running
                      Code:
                      viewsource sqreg.ado
                      to understand what exactly the command does. In essence, sqreg runs qreg for each individual quintile in your case and calculates the bootstrapped standard errors.
                      My example loop estimates the qreg for the median of the conditional price (or any other dependent variable) distribution for each quintile of a specific indepedent variable (here gear_ratio).

                      You should probable post an example of your dataset by running
                      Code:
                      dataex <variables relevant for your estimation problem>
                      For more explanation about this command, run
                      Code:
                      help dataex
                      You should also post which code you want to run and what you have already done. Otherwise, it might difficult to give you the best advice for the request of your reviewer.

                      Comment


                      • #12
                        Dear Aryan
                        My apologies for not being clear where the numbers came from.
                        First, what I suggest is not quantile regression. It is a local weighted regressions around the 10th , 50th and 90th quantile of gear ratio. It is local weighted because it uses a gaussian kernel (the ndensity function) do determine how much weight an observation has in the regression.
                        Thus, when I say, normalden(gear_ratio, 2.43, 0.35), I am requesting to estimate the model using observations with "gear_ratio" close to 2.43 (the 10th quantile), with a bandwidth of 0.35. (see some of the details of non-parametric kernel regressions).

                        Now, I agree with Sven. we are both giving you suggestions based on what you describe as a problem. But there may be more details on your paper and the referee's comment that is still unclear, and we will be "shooting" blindly since we do not know either.
                        HTH
                        Fernando

                        Comment


                        • #13
                          Originally posted by FernandoRios View Post
                          Dear Aryan
                          My apologies for not being clear where the numbers came from.
                          First, what I suggest is not quantile regression. It is a local weighted regressions around the 10th , 50th and 90th quantile of gear ratio. It is local weighted because it uses a gaussian kernel (the ndensity function) do determine how much weight an observation has in the regression.
                          Thus, when I say, normalden(gear_ratio, 2.43, 0.35), I am requesting to estimate the model using observations with "gear_ratio" close to 2.43 (the 10th quantile), with a bandwidth of 0.35. (see some of the details of non-parametric kernel regressions).

                          Now, I agree with Sven. we are both giving you suggestions based on what you describe as a problem. But there may be more details on your paper and the referee's comment that is still unclear, and we will be "shooting" blindly since we do not know either.
                          HTH
                          Fernando
                          Many thanks

                          FernandoRios and Sven-Kristjan for your great help. Please see the data:

                          Code:
                          * Example generated by -dataex-. To install: ssc install dataex
                          clear
                          input float(Y X1) double(X2 X3 X4 X5 X6 X7 X8 X9 X10) float Z
                          .08455712  1.609438  .126  1.26  .491 4.329  .475612868 3.269 2.055 .007 1.028 13.442
                          .16251928 2.3025851  .015  .922   .59 4.616  .787092793 2.208 -.145 .01 1.142 23.665
                          .16251928 2.6390574  .053 1.657  .817 5.537  .941958479   3.9  .501 .01 1.816 22.067
                          .16251928  2.397895  .019 1.173   .64 4.698  .834212621 2.618 -.144 .01 1.392 20.196
                          .16251928  2.564949   .01 1.564   .83 5.559   .91027266 4.411 -.003 .009 1.423 28.102
                          0 2.1972246  .078 1.028  .482  5.77  .731887009 2.317  .685 .004 1.667 249.4
                          .05715886 3.2580965  .186 1.189  .536  3.14 1.142629174 3.336  .492 .034 2.379 6.939
                          .05715886  3.135494  .149 1.188  .352 2.714 1.097278066  2.92  .083 .089 2.942 2.714
                          .11122558 3.4011974  .109 4.857   .49 3.429 1.203572724 6.145  .138 .03 1.836 .549
                          .13720126 2.0794415  .014 1.383  .525  4.43  .665775984 2.761  .026 .013 1.04 30.793
                          .11122558  3.367296  .131 1.977  .435 3.249 1.192709612 6.339 -.149 .214 1.971 1.349
                          .16251928  2.484907  .016 1.396  .812 5.422  .874635057 4.377  .749 .005 1.67 21.529
                          .08455712 1.7917595  .112  1.49  .514 4.464  .475612868 3.378   .08 .019 1.359 19.999
                          .11122558 3.2580965  .194 1.066  .511 3.165 1.156252068 3.255  .224 .023 2.261 6.664
                          .25782937  2.484907  .213  .884  .527 5.906  .874635057 2.703  .103 .076 1.486 3.473
                          .211309   2.70805  .057  .712  .312 6.632  .970400058 -.257 -.136 .012 1.133 .546
                          .05715886  3.135494  .159  1.15  .279  2.63 1.113500901  2.82  .107 .064 4.197 4.673
                          .11122558  3.433987  .062 3.382  .563 3.613  1.21402214 6.629 -.008 .047 1.648 1.058
                          .16251928   2.70805  .046 1.368  .811 5.606  .970400058 4.726 -.085 .006 .866 21.607
                          .11122558  3.295837  .172 1.143  .486 3.171 1.169070752  3.08 -.045 .044 2.076 5.411
                          .08455712 1.3862944  .211 1.199  .172 8.602 1.169070752 2.441  .135 .039 5.476 254.839
                          .18721125 1.0986123  .084 1.314  .505 8.844 1.203572724 2.722  .073 .054 1.025 809.416
                          .2348397 3.3322046  .097 1.018  .628 6.724 1.169070752 4.896  .463 .098 1.467 2414.669
                          .13720126 2.3025851  .121 1.113  .681 6.876  .731887009 4.682   .03 .024 1.237 123.913
                          .08455712 1.0986123  .282 1.555  .524 8.351 1.156252068 1.993  .226 .002 .924 223.984
                          .16251928  2.772589  .144 1.824  .635 7.017  .970400058 4.974  .089 .027 1.342 446.934
                          .13720126  2.397895  .121 1.086  .669 6.903  .787092793 3.586  .029 .034 1.322 205.108
                          .2348397  3.433987  .072 1.157  .647 7.036 1.203572724 4.809  .209 .363 1.685 2205.55
                          .05715886  3.178054  .119 1.201 1.067 5.774 1.128494663 4.104 -.032 .022 3.37 1438.753
                          .211309  1.609438  .375 3.408  .551 9.484 1.260164084 3.687  .092 .068 1.234 2655.46
                          .05715886 3.0445225  .086 1.301 1.133 5.317 1.061256502 3.322  .394 .01 3.571 737.907
                          .16251928 2.6390574  .141 1.598  .609 6.828   .91027266  5.42  .065 .018 1.434 456.43
                          .05715886 3.0910425  .096 1.498 1.124 5.334 1.079769201 4.456  .312 .013 3.248 968.093
                          .05715886  2.944439 -.017 1.555 1.366 4.753 1.019929767 3.249  .094 .011 2.462 831.071
                          .05715886  3.218876  .073 1.193 1.036 5.851 1.142629174 4.334 -.104 .019 7.393 1288.489
                          .211309  1.609438  .162   1.7  .591 8.992 1.224069506  3.17  .082 .129 1.08 1052.248
                          .13720126 3.0910425  .054  .801  .524 6.629 1.079769201 3.669  .307 .03 1.252 837.143
                          .16251928  2.564949  .126  .958  .638 6.864  .874635057 4.701  .067 .035 1.363 518.3
                          .05715886 3.2580965  .094 1.771 1.044 5.546 1.156252068 6.126 -.108 .028 8.294 1148.877
                          .05715886  3.295837  .084 1.656  .883 5.368 1.169070752  5.55  -.55 .056 13.239 516.633
                          .2348397  3.367296  .094 1.191  .578 6.909  1.18111351  5.57 -.051 .243 1.47 2291.194
                          .05715886  2.995732  .057 1.517 1.258 5.055 1.041336221 3.828 -.363 .007 2.627 529.357
                          .13720126  3.135494  .058  .739  .572  6.75 1.097278066 3.779  .153 .049 1.654 965.22
                          .2348397 3.4011974  .059 1.171  .603  6.92 1.192709612 5.312 -.204 .158 1.417 1824.824
                          .05715886  3.135494  .069 1.142  .957 5.697 1.097278066 4.094  .104 .012 4.77 1069.018
                          .18721125 1.7917595  .173 1.835  .821 7.425  1.18111351 2.528  .099 .005 1.874 .892
                          .30228075  2.564949  .299 3.094  .289 7.858 1.260164084 4.262  .098 .76 3.862 26.395
                          .2348397 2.1972246  .134 1.767  .815 7.466  1.21402214 2.062  .269 .051 1.878 .317
                          .30228075  2.484907  .212 2.517  .305 7.684 1.243001191 3.418  .249 .25 3.465 29.168
                          .30228075 2.6390574  .322 3.899  .288 7.938 1.268355063 4.795  .166 .622 3.8 35.789
                          .3448407 1.0986123  .315 3.384  .278 8.006 1.268355063 3.849  .025 .351 2.573 29.373
                          .30228075 2.3025851  .184 1.304  .326 7.525 1.224069506  2.23  .519 .141 2.652 15.829
                          .18721125   1.94591  .154 2.236  .836 7.473 1.192709612 2.512  .001 .02 1.845 1.323
                          .30228075  2.397895  .176 1.279  .305 7.604 1.233725763  4.03 -.152 .254 3.582 12.253
                          .18721125  1.609438  .157  1.77  .938 7.414 1.169070752  1.96   .12 .018 .742 .787
                          .08455712  2.484907  .011  .574  .499 5.121  .834212621 -.428  .039 .003 .847 85.81
                          .11122558  3.178054  .083 1.135  1.02 6.232 1.113500901 4.654  .416 .004 .801 426.593
                          .11122558 3.3322046  .112 1.586  .958 5.798  1.18111351 5.717  .237 .073 1.084 656.837
                          .08455712  2.995732  .039 1.085  .944 5.892 1.041336221 2.001  .368 .001 .802 193.239
                          .11122558  3.295837    .1 1.346  .969 5.799 1.169070752 6.144  .102 .041 1.098 530.839
                          .11122558  3.367296  .047  .893  .512 7.112  1.18111351 6.352  .122 .004 .937 667.749
                          .08455712  3.135494  .054  .779  .629 5.603 1.113500901 3.982  .732 .087 2.212 330.379
                          .08455712 3.0910425  .051 1.115  .898 5.613 1.097278066 4.207 -.015 .058 1.006 187.429
                          .11122558 3.3322046  .048  .794  .497 7.059 1.169070752  6.69  .243 .001 .909 611.108
                          .08455712 3.0445225  .076  .403   .25   5.5 1.079769201  2.96 -.113 .01 5.441 192.424
                          .08455712  2.944439  .067  .291  .177 5.663 1.041336221 2.145  .063 .004 10.379 196.59
                          .11122558  3.295837  .045   .79  .477 7.004 1.156252068 6.416 -.046 .003 .88 487.73
                          .11122558 3.2580965   .12 1.593  .953 5.432 1.156252068 5.483  .236 .067 1.168 481.704
                          .08455712 2.6390574  .016  .695  .595 5.194   .91027266 1.321 -.293 .004 .933 78.796
                          .08455712 2.3025851  .106  .553  .466 5.072  .731887009  .502  .292 .003 .446 66.012
                          .08455712 3.0445225  .057  1.15  .998 5.908 1.061256502 2.228   .12 .005 .792 229.905
                          .08455712  2.564949  .043  .692  .519 5.174  .874635057 1.053  .298 .004 .974 111.212
                          .11122558  3.218876  .087  .893  .719 5.704 1.142629174 3.746  .166 .041 1.265 383.733
                          .11122558  3.367296  .098 1.019  .959 6.039 1.192709612   6.2  .335 .052 1.078 876.726
                          .08455712 3.0910425  .022 1.179 1.044 6.108 1.079769201 3.312 -.042 .015 .807 226.048
                          .16251928 2.1972246  .015 1.548  .445 6.348  .731887009 1.608 -.388 .001 1.223 143.543
                          .13720126  2.564949  .067  .945  .598 7.023   .91027266 2.568  .192 .198 1.4 744.504
                          .16251928  2.397895  .052 1.407  .518 6.557  .834212621 1.749  .012 .002 1.224 174.99
                          .16251928   1.94591  .164  .931  .447 6.362  .583332315 1.127  .291 0 1.263 308.19
                          .16251928 2.3025851  .085 1.549  .491 6.459  .787092793 1.811  .062 .001 1.237 122.831
                          .3237871  2.833213  .156  2.26   .45 5.672 1.019929767 4.013  .194 .075 .86 1.152
                          .11122558  1.609438  .117  1.13  .695 6.847  .094400675  .733  .864 .002 1.37 42.931
                          .13720126 3.2580965   .07 2.285  .836 5.666 1.142629174 3.838  .054 .022 .999 2.956
                          .05715886  2.833213  .043 1.237  .346  5.15  .970400058 4.422 -.071 .012 .484 111.405
                          .3237871  3.178054  .057 2.222 1.035 7.174 1.128494663 6.317 -.031 .037 .953 .899
                          .211309 2.1972246  .224 1.611  .219 8.679  .787092793 5.353  .161 .008 1.612 59.954
                          .2348397 2.6390574  .187 1.692  .301 9.258   .91027266 5.951   .43 .014 1.441 192.948
                          .05715886  2.772589  .084 1.094  .431 5.064  .941958479 3.211  .047 .016 .304 119.958
                          .2348397  2.484907  .207 2.354  .296 8.976  .834212621 4.208  .127 .051 1.663 85.809
                          .05715886  2.890372  .032 1.342  .407 5.154  .996210355 4.945 -.114 .016 .546 98.712
                          .13720126  3.135494  .079  1.13  .799 5.617 1.097278066  .692   .28 .011 .987 3.806
                          .3654594 1.7917595  .115 1.352  .731 8.462 1.224069506 3.505  .399 .012 .996 50.751
                          .211309 3.4011974   .13  1.28  .698 7.345  1.18111351  .739  .254 .082 1.203 21.188
                          .11122558 1.3862944  .082   .93    .6 6.534  .094400675  -.85  .011 .002 1.678 4.3
                          .28030166   1.94591  .085 1.579  .253  9.97 1.156252068 1.826  .333 .074 2.464 330.541
                          .3237871 3.0445225  .044 1.397 1.103 6.861 1.079769201 3.964  .246 .136 .934 .667
                          .13720126  3.295837  .072 4.302   .83 5.657 1.156252068 5.271  .058 .007 1.002 .527
                          .05715886   2.70805  .115  .691  .432 4.965   .91027266 2.921  .019 .009 .465 114.616
                          .28030166  2.772589  .219 2.923  .249 9.492  .970400058 5.246  .189 .023 1.455 336.337
                          .3448407  3.135494  .083 2.164  .373 6.886 1.113500901 6.002  .094 .115 1.031 13.004
                          end
                          I have run the following code for simultaneous quintile regression:

                          reg Y X1 X2 X3 X4 X5 X6 X7 X8 X9 X10[pw=normalden(Z, 0.20)]
                          est sto m1
                          reg Y X1 X2 X3 X4 X5 X6 X7 X8 X9 X10[pw=normalden(Z, 0.40)]
                          est sto m2
                          reg Y X1 X2 X3 X4 X5 X6 X7 X8 X9 X10[pw=normalden(Z, 0.60)]
                          est sto m3
                          reg Y X1 X2 X3 X4 X5 X6 X7 X8 X9 X10[pw=normalden(Z, 0.80)]
                          est sto m4
                          reg Y X1 X2 X3 X4 X5 X6 X7 X8 X9 X10[pw=normalden(Z, 100)]
                          est sto m5
                          esttab m1 m2 m3 m4 m5

                          Also I have tried with the following code:

                          xtile Z_quintiles = Z,n(5)
                          forvalues i=1/5{
                          qreg Y X1 X2 X3 X4 X5 X6 X7 X8 X9 X10 if Z_quintiles==`i'
                          }

                          I need to run simultaneous quintile regression of
                          Y X1 X2 X3 X4 X5 X6 X7 X8 X9 X10 based on quintiles of Z.

                          Regards,

                          Aryan

                          Comment


                          • #14
                            Hi Aryan
                            I think there is still some confusion regarding what you are trying to accomplish here.
                            When you say you are interested in doing simultaneous quantile regression, the quantiles are based on the dependent variable (here Y)
                            Fitting models based on the values of Z is not quantile regression, but rather regressions by quantiles of Z. Those can be modeled as OLS or qreg.
                            Also, the code you use for my suggestion is incorrect. you need to use "normalden( your variable, the point of reference, bandwidth)"
                            So something like:
                            Code:
                            reg y x1 x2 [pw=normalden(Z,1.2375,53]
                            where 1.2375 is the 10th percentile based on the sample data you provided, and 128 is a bandwidth you can obtain by using "lpoly Y Z". (this may not be the best bandwidth, but it's a good start as any)

                            In neither case of your examples you are doing a simultaneous regression.
                            HTH
                            Fernando

                            Comment


                            • #15
                              FernandoRios The last round bracket is missing in your code and the variable names are in the wrong case
                              Code:
                              reg Y X1 X2 [pw=normalden(Z,1.2375,53)]
                              Aryan Bose I still think that you should show us exactly what the reviewer has recommended to you. Demanding a simultaneous quintile regression based on the quintiles of an independent variable seems strange for me. I have never heard of something like this before. Therefore, I suspect that the reviewer might want to see something different than you believe and currently present here.

                              Comment

                              Working...
                              X