Announcement

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

  • Add confidence intervals to median

    Dear Stata users,

    I would like to add 95% confidence intervals to q50. But it does not appear to be an option of logistic quantile regression.


    Codes look as below:

    PHP Code:

    mkspline uacr_ 
    uacrnknots(3cubic

    lqreg re_slope1 uacr_1 uacr_2
    quantiles(50nodots seed(123)

    lqregpred adjs, for(uacr_1 uacr_2plotvs(uacrci 

    Could anyone help me.

    Thanks a lot.

    Oyun

  • #2
    since you don't supply any data, I can't see what is happening in your case; however, using the example given in the help file, I do see 95% CI's; I suspect we are not talking about the same thing; please read the FAQ on how to ask questions and how to post results and point out what is missing

    Comment


    • #3
      If I understood right, you need to use the - centile - command, like in the toy example below:

      Code:
      . sysuse auto
      (1978 Automobile Data)
      
      . sum mpg, detail
      
                              Mileage (mpg)
      -------------------------------------------------------------
            Percentiles      Smallest
       1%           12             12
       5%           14             12
      10%           14             14       Obs                  74
      25%           18             14       Sum of Wgt.          74
      
      50%           20                      Mean            21.2973
                              Largest       Std. Dev.      5.785503
      75%           25             34
      90%           29             35       Variance       33.47205
      95%           34             35       Skewness       .9487176
      99%           41             41       Kurtosis       3.975005
      
      . centile mpg
      
                                                             -- Binom. Interp. --
          Variable |       Obs  Percentile    Centile        [95% Conf. Interval]
      -------------+-------------------------------------------------------------
               mpg |        74         50          20              19          22
      Hopefully that helps.
      Best regards,

      Marcos

      Comment


      • #4
        I fear that the question is about a community-contributed command


        SJ-12-3 st0231_1 . . . . Software update for lqreg, lqregpred, and lqregplot
        . . . . . . . . . . . . . . . . . . . . . . . N. Orsini and M. Bottai
        (lqreg, lqreg_postestimation, lqregpred, lqregplot if installed)
        Q3/12 SJ 12(3):570
        cluster() option has been fixed

        SJ-11-3 st0231 . . . . . . . . . . . . Logistic quantile regression in Stata
        . . . . . . . . . . . . . . . . . . . . . . . N. Orsini and M. Bottai
        (lqreg, lqreg_postestimation, lqregpred, lqregplot if installed)
        Q3/11 SJ 11(3):327--344
        estimation, prediction, and graphical representation of
        logistic quantile regression

        -- which Buyadaa really is expected to explain more fully, rather than assume we all recognise the code.

        Comment


        • #5
          Dear all, thank you so much for your reply and sorry about unclear post.




          Originally posted by Nick Cox View Post
          I fear that the question is about a community-contributed command


          SJ-12-3 st0231_1 . . . . Software update for lqreg, lqregpred, and lqregplot
          . . . . . . . . . . . . . . . . . . . . . . . N. Orsini and M. Bottai
          (lqreg, lqreg_postestimation, lqregpred, lqregplot if installed)
          Q3/12 SJ 12(3):570
          cluster() option has been fixed

          SJ-11-3 st0231 . . . . . . . . . . . . Logistic quantile regression in Stata
          . . . . . . . . . . . . . . . . . . . . . . . N. Orsini and M. Bottai
          (lqreg, lqreg_postestimation, lqregpred, lqregplot if installed)
          Q3/11 SJ 11(3):327--344
          estimation, prediction, and graphical representation of
          logistic quantile regression
          Mr.Cox you are right. I have used lqreg and lqregpred commands for my analyses. I am wondering, is it possible to plot median and mean using lqpred command (instead of 95% CI)?

          Thank you again.

          Comment


          • #6
            Sorry, I have never used any of these excellent commands. But my guess has to be that quantile regression is not in any sense focused on predicting the mean.

            Comment


            • #7
              Dear Mr.Cox,

              Thank you so much for your prompt reply.
              If so is there anyway to plot both median mean after cubic splines and quantile regression (lqreg re_slope1 uacr_1 uacr_2, quantiles(50) nodots seed(123)) (not using lqpred)?

              Thank you

              Comment


              • #8
                Again, I haven't used any of these programs and I really don't know. Unless no-one else answers your best chance is to contact the program authors directly.

                Comment

                Working...
                X