Announcement

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

  • #16
    Sa Sa: After you estimate your logit model, can you generate predicted probabilities
    Code:
    predict pc
    Then can you show us the results of
    Code:
    summarize pc cesarean physicians, d
    Last edited by John Mullahy; 20 Sep 2017, 17:06.

    Comment


    • #17
      Yes Clyde, i have the same error message with log_physicians as the predictor and margins, eydx(log_physicians)

      . Here the results John
      summarize physicians, d

      physicians
      -------------------------------------------------------------
      Percentiles Smallest
      1% .5154454 .4125226
      5% .60027 .4125226
      10% .6411128 .4125226 Obs 99728
      25% .7966681 .4125226 Sum of Wgt. 99728

      50% 1.13773 Mean 1.101283
      Largest Std. Dev. .3380353
      75% 1.324555 2.038605
      90% 1.4614 2.038605 Variance .1142679
      95% 1.505399 2.038605 Skewness .4005778
      99% 2.038605 2.038605 Kurtosis 3.235274

      Comment


      • #18
        . summarize pc cesarean physicians, d

        Linear prediction
        -------------------------------------------------------------
        Percentiles Smallest
        1% -2.388353 -2.388353
        5% -2.371035 -2.388353
        10% -2.336569 -2.388353 Obs 99728
        25% -2.264516 -2.388353 Sum of Wgt. 99728

        50% -2.215366 Mean -2.22541
        Largest Std. Dev. .0733672
        75% -2.174733 -2.080387
        90% -2.123587 -2.080387 Variance .0053828
        95% -2.116638 -2.080387 Skewness -.382055
        99% -2.105139 -2.080387 Kurtosis 2.608612

        cesarean
        -------------------------------------------------------------
        Percentiles Smallest
        1% 0 0
        5% 0 0
        10% 0 0 Obs 99728
        25% 0 0 Sum of Wgt. 99728

        50% 0 Mean .1027094
        Largest Std. Dev. .3035804
        75% 0 1
        90% 1 1 Variance .0921611
        95% 1 1 Skewness 2.61738
        99% 1 1 Kurtosis 7.850676

        physicians
        -------------------------------------------------------------
        Percentiles Smallest
        1% .5154454 .4125226
        5% .60027 .4125226
        10% .6411128 .4125226 Obs 99728
        25% .7966681 .4125226 Sum of Wgt. 99728

        50% 1.13773 Mean 1.101283
        Largest Std. Dev. .3380353
        75% 1.324555 2.038605
        90% 1.4614 2.038605 Variance .1142679
        95% 1.505399 2.038605 Skewness .4005778
        99% 2.038605 2.038605 Kurtosis 3.235274

        Comment


        • #19
          Sa Sa: What estimation method are you using? If you are using logit, then the predicted probabilities should be between 0 and 1, but the values you show here are all negative.

          If you used
          Code:
          logit cesarean physicians
          then did you use
          Code:
          predict pc
          or
          Code:
          predict pc, xb
          Your output shows a header of -Linear prediction- so my guess is that you did the later but I was hoping to see the former.

          Comment


          • #20
            I use xtlogit cesarean physicians, re vce (robust)
            and then predict pc

            Comment


            • #21
              Thanks Sa Sa. I'm running out of ideas. One more thought: If you estimate the model using -logit- instead of -xtlogit- does -margins- give you the same error with -eyex- ? If -margins- works with -logit- works not with -xtlogit- then my guess is that the culprit is related to the random effect. But this is just a guess.

              Comment


              • #22
                when i use predict pc, i get the following message : (option xb assumed; linear prediction)
                When i use logit, i can estimate margins, eyex(pysician) and i get the same result as the coef of physicians
                However, since i have panel data, i have to work with multilevel logit model....

                Comment


                • #23
                  Yes, I can understand why you want to use -xtlogit-.

                  I do find it strange why, with -logit-, your -margins, eyex(physicians)- gives the same result as the parameter estimate for physicians.

                  I'm sorry, but I've run out of ideas. Hopefully others who understand -xtlogit- better than I do will provide commentary.

                  Comment


                  • #24
                    Thanks John...

                    Comment


                    • #25
                      sa sa: Please re-register with given name and family name (or accept my apologies if those are really your given and family names).

                      More at https://www.statalist.org/forums/help#realnames

                      Comment

                      Working...
                      X