Announcement

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

  • Using Predict after suest in logit regression

    Hi,

    I have used 3 logit equation and used "suest" command to combine parameter estimate and covariance matrices. Now, I want to use "Predict" command to estimate predicted probability.
    When I code:

    predict probab if e(sample) == 1

    The values I am getting are greater than one. Hence, they are not predicted probability. I need the predicted probability to calculate concordance Index.
    Please help me to calculate the predicted probability or concordance index directly.

    Very Thanks in advance.

  • #2
    Sorry, I forgot to mention. The three equations have different depvar but same indepvar as:
    logit Y1 X1 X2 X3
    logit Y2 X1 X2 X3
    logit Y3 X1 X2 X3
    suest Y1 Y2 Y3, vce(clustercode)

    Please share the solution if you have to calculate the predicted probability or concordance index from here.

    Comment


    • #3
      What you are getting with suest are the linear predictions. The -pr- option of predict is not supported. Depending on whether it makes sense to do what you want (I can only vouch in the case of one estimated model as predictions will relate to that model), the logit and probit transformations are straightforward and only need the use of the functions -invlogit()- and -normal()- respectively.

      Code:
      webuse lbw
      qui logit  low age i.race smoke
      estimates store logit
      predict lowhat1, pr
      suest logit
      predict xb1
      gen lowhat2= invlogit(xb1)
      qui probit  low age i.race smoke
      estimates store probit
      predict lowhat3, pr
      suest probit
      predict xb2
      gen lowhat4= normal(xb2)
      *ASSERTIONS ADJUSTING FOR ROUNDING
      assert round(lowhat1, 4)==round(lowhat2, 4)
      assert round(lowhat3, 4)==round(lowhat4, 4)
      Res.:

      Code:
      . *ASSERTIONS ADJUSTING FOR ROUNDING
      
      .
      . assert round(lowhat1, 4)==round(lowhat2, 4)
      
      .
      . assert round(lowhat3, 4)==round(lowhat4, 4)
      
      .

      Comment


      • #4
        Thank you so much for responding. I have removed "suest" and instead used simple logit in all 3 regression with vce (cluster). So, I ran 3 different regression with vce and then used predict command for estimated probability.
        logit Y1 X1 X2 X3, vce(clustercode)
        predict probability
        logit Y2 X1 X2 X3, vce(clustercode)
        predict proability2
        logit Y3 X1 X2 X3, vce(clustercode)
        predict proability3
        I think this also will give correct result.

        Comment


        • #5
          Yes, prediction for each model is fine. You typically do not want to use the robust variance estimator in logit unless either you believe that your model is misspecified or you have clustered data. See https://www.stata.com/support/faqs/s...nce-estimator/

          Comment


          • #6
            Okay. Thank you.

            Comment

            Working...
            X