Announcement

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

  • #76
    Hi, dear @FernandoRios

    my code is
    mmqreg y x ,q(0.25) absorb(v1) nols

    then send me error code like this
    last estimates not found
    r(301);

    I do not understand why should have last estimates
    Is there a problem with the source code?

    if not add abs(v1)
    just like
    mmqreg y x ,q(0.25) nols
    it can send me results

    but I really need add abs(v1) to get what I need
    hope you can help me

    Best wishes,
    Can Jin

    Comment


    • #77
      Try q(25) instead of q(.25)

      Comment


      • #78
        Originally posted by FernandoRios View Post
        Try q(25) instead of q(.25)
        thank you so much, Fernando
        but it can not work

        and I already solve this problem
        just use stata15 SE
        this code
        mmqreg y x ,q(0.25) absorb(v1) nols
        with abs(v1)
        it can work in stata 15 SE
        but can not work in stata 17 MP
        I use stata 17 MP before

        I do not know why
        but it works

        best wishes,
        Can




        Comment


        • #79
          Originally posted by FernandoRios View Post
          Try q(25) instead of q(.25)
          Dear FernandoRios

          According to what I've read in Prof. Santos Silva's research, the coefficient value of the scale cannot be negative, however, in reality, I'm still finding research papers with results where the location is a negative value, or a result right in the post also encounters this problem.

          Code:
          . use http://fmwww.bc.edu/RePEc/bocode/o/oaxaca.dta, clear (Excerpt from the Swiss Labor Market Survey 1998) . mmqreg lnwage female educ exper tenure , q(85 90) MM-qreg Estimator Number of obs = 1434 Quantile: . ------------------------------------------------------------------------------ lnwage | Coefficient Std. err. z P>|z| [95% conf. interval] -------------+---------------------------------------------------------------- location | female | -.0841137 .0255318 -3.29 0.001 -.1341552 -.0340722 educ | .0847507 .0049257 17.21 0.000 .0750964 .094405 exper | .0110983 .0014531 7.64 0.000 .0082504 .0139463 tenure | .0077084 .0018578 4.15 0.000 .0040672 .0113496 _cons | 2.213327 .0682166 32.45 0.000 2.079625 2.347029 -------------+---------------------------------------------------------------- scale | female | .0579893 .0192994 3.00 0.003 .020163 .0958155 educ | -.0125849 .0037233 -3.38 0.001 -.0198826 -.0052873 exper | -.0054269 .0010984 -4.94 0.000 -.0075796 -.0032741 tenure | .0031301 .0014043 2.23 0.026 .0003778 .0058825 _cons | .4823967 .0515647 9.36 0.000 .3813318 .5834617 -------------+---------------------------------------------------------------- qtile_85 | female | -.0176419 .0253919 -0.69 0.487 -.0674091 .0321253 educ | .0703249 .0048994 14.35 0.000 .0607222 .0799275 exper | .0048776 .0014463 3.37 0.001 .0020429 .0077124 tenure | .0112964 .0018473 6.12 0.000 .0076759 .014917 _cons | 2.766287 .0683739 40.46 0.000 2.632277 2.900298 -------------+---------------------------------------------------------------- qtile_90 | female | -.0014663 .0283704 -0.05 0.959 -.0570713 .0541388 educ | .0668144 .005486 12.18 0.000 .056062 .0775668 exper | .0033638 .0016384 2.05 0.040 .0001525 .0065751 tenure | .0121696 .0020559 5.92 0.000 .0081401 .016199 _cons | 2.900848 .0805478 36.01 0.000 2.742977 3.058719 ------------------------------------------------------------------------------ . test [qtile_85]female = [qtile_90]female ( 1) [qtile_85]female - [qtile_90]female = 0 chi2( 1) = 7.29 Prob > chi2 = 0.0069 . lincom [qtile_85]female - [qtile_90]female ( 1) [qtile_85]female - [qtile_90]female = 0 ------------------------------------------------------------------------------ lnwage | Coefficient Std. err. z P>|z| [95% conf. interval] -------------+---------------------------------------------------------------- (1) | -.0161756 .0059899 -2.70 0.007 -.0279157 -.0044356 ------------------------------------------------------------------------------ . . sqreg lnwage female educ exper tenure , q(85 90) (fitting base model) Bootstrap replications (20): .........10.........20 done Simultaneous quantile regression Number of obs = 1,434 bootstrap(20) SEs .85 Pseudo R2 = 0.1235 .90 Pseudo R2 = 0.1002 ------------------------------------------------------------------------------ | Bootstrap lnwage | Coefficient std. err. t P>|t| [95% conf. interval] -------------+---------------------------------------------------------------- q85 | female | -.048664 .0302942 -1.61 0.108 -.1080899 .0107618 educ | .0689975 .0040432 17.07 0.000 .0610663 .0769287 exper | .0050717 .0014436 3.51 0.000 .0022398 .0079035 tenure | .0099555 .0021046 4.73 0.000 .0058271 .0140838 _cons | 2.807041 .0780006 35.99 0.000 2.654033 2.960049 -------------+---------------------------------------------------------------- q90 | female | -.0542809 .038456 -1.41 0.158 -.1297171 .0211553 educ | .0639304 .0072212 8.85 0.000 .0497652 .0780957 exper | .0040191 .002412 1.67 0.096 -.0007124 .0087505 tenure | .0077403 .0026316 2.94 0.003 .002578 .0129027 _cons | 2.983513 .1189851 25.07 0.000 2.750109 3.216917 ------------------------------------------------------------------------------ . test [q85]female = [q90]female ( 1) [q85]female - [q90]female = 0 F( 1, 1429) = 0.06 Prob > F = 0.8084 . lincom [q85]female - [q90]female ( 1) [q85]female - [q90]female = 0 ------------------------------------------------------------------------------ lnwage | Coefficient Std. err. t P>|t| [95% conf. interval] -------------+---------------------------------------------------------------- (1) | .0056169 .0231544 0.24 0.808 -.0398034 .0510371 ------------------------------------------------------------------------------ .
          Am I misunderstanding something regarding the explanation of Santos Silva and Machado?

          I'll wait for your response.

          Best wishes,

          Kha

          Comment


          • #80
            Dear Minh Kha,

            What cannot be negative is the fitted value of the scale function; there are no other restrictions on the coefficients.

            Best wishes,

            Joao

            Comment


            • #81
              Dear Joao Santos Silva,

              Thanks so much for your response, it really help with our team's workflow.

              Best wishes,

              Kha

              Comment

              Working...
              X