Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
re: RE: st: Area under the curve and C-statistics
From
"Ariel Linden, DrPH" <[email protected]>
To
<[email protected]>
Subject
re: RE: st: Area under the curve and C-statistics
Date
Sat, 27 Oct 2012 11:22:47 -0400
Apparently the code did not come across the last email very well. Here it is
again:
// run mlogit on insure with 3 levels of the outcome
webuse sysdsn1
mlogit insure age male nonwhite i.site
// save predictions of each level of outcome
predict p1 if e(sample), outcome(1)
predict p2 if e(sample), outcome(2)
predict p3 if e(sample), outcome(3)
// generate dummy variables for each level
tab insure, gen(type)
// compare ROC curves for each predicted level of outcome to actual level 1
roccomp type1 p1 p2 p3, graph summary
Ariel
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/faqs/resources/statalist-faq/
* http://www.ats.ucla.edu/stat/stata/