Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: Re: Logit and percentage of correct classification


From   jean ries <[email protected]>
To   [email protected]
Subject   st: Re: Logit and percentage of correct classification
Date   Fri, 03 Sep 2004 11:41:45 +0200

The following lines should do the job

. logit y x
. predict phat, p
. g correct = (phat > 0.5) == y
. ta correct

By the way, if you are keen on logit (and related) models, you may find the -spost- package useful

. net from http://www.indiana.edu/~jslsoc/stata/
. net install spostado

jean


Is there an easy way to determine the percentage of correct
classification (predicted probabilities) after a logit (or logistic)
regression (equivalent to Predicted/Percentage correct in SPSS)?

Best regards

Herve Stolowy
*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index