Announcement

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

  • Referring to Z Stats in Multi-Equation Models

    I must refer to the z-statistics in a multi-equation model.
    Code:
    webuse sysdsn1, clear
    cls
    mlogit insure i.site
    di 2*(1-normal(abs(_z[2:2.site])))
    My goal is to refer to the z stat of -0.13 in the table so that I may transform it into a p-value, but Stata indicates "_z not found". And of course, if I just use -0.13 in the display equation, it'll have rounding error.

    When I get into the guts of the output by doing
    Code:
    qui mlogit
    mat l r(table)
    I see that z is in fact there, indicating that I'm referring to it improperly in my syntax. How might I extract -.12840134 here without needing to write that specific number?

  • #2
    Code:
    webuse sysdsn1, clear
    mlogit insure i.site
    mat l r(table)
    di r(table)["z", "Prepaid: 2.site"]
    Res.:

    Code:
    . mat l r(table)
    
    r(table)[9,12]
             Indemnity:  Indemnity:  Indemnity:  Indemnity:    Prepaid:    Prepaid:    Prepaid:    Prepaid:   Uninsure:   Uninsure:   Uninsure:   Uninsure:
                    1b.         2o.         3o.          o.         1b.          2.          3.                     1b.          2.          3.            
                  site        site        site       _cons        site        site        site       _cons        site        site        site       _cons
         b           0           0           0           0           0  -.02597549   -.4283494   .08004271           0  -1.2498432  -.19415601  -1.4863778
        se           .           .           .           .           .   .20229919   .21583925   .15130688           .   .46545971   .35633108   .25404004
         z           .           .           .           .           .  -.12840134   -1.984576   .52900903           .  -2.6851803  -.54487532  -5.8509589
    pvalue           .           .           .           .           .   .89783137   .04719166   .59679918           .   .00724907   .58583927   4.887e-09
        ll           .           .           .           .           .  -.42247461  -.85138657  -.21651333           .  -2.1621275  -.89255211  -1.9842871
        ul           .           .           .           .           .   .37052364  -.00531224   .37659875           .  -.33755898   .50424008  -.98846849
        df           .           .           .           .           .           .           .           .           .           .           .           .
      crit    1.959964    1.959964    1.959964    1.959964    1.959964    1.959964    1.959964    1.959964    1.959964    1.959964    1.959964    1.959964
     eform           0           0           0           0           0           0           0           0           0           0           0           0
    
    .
    . di r(table)["z", "Prepaid: 2.site"]
    -.12840134

    Comment


    • #3
      Thank you. This is interesting. Apparently my syntax is only legal for coefficients and standard errors then... either way, this is what I need. Thanks a lot! Andrew Musau

      Comment

      Working...
      X