Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, statalist.org is already up and running.


[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" <ariel.linden@gmail.com>
To   <statalist@hsphsun2.harvard.edu>
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/


© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index