------------------------------------------------------------------------------- help forrocss-------------------------------------------------------------------------------

ROC curve and other statistics for any classification method

rocssdep_var prob_var[ifexp] [inrange] [,ncut(#)savedata(filename)graphreplace]

Description

rocsscalculates sensitivity, specificity, cumulative area under the ROC cur > ve and percentage of subjects correctly classified at user-specified probability cutoffs > .

dep_varis the binary outcome variable coded 0, 1.

prob_varcontains the estimated probabilities thatdep_var==1.An example with four observations:

iddep_varprob_var1 0 0.2 2 1 0.8 3 1 0.9 4 0 0.3

RemarksUnlike lsens,

rocssis not a post-estimation command and allows the user > to set arbitrary probability cutoffs. However, if used on predicted probabilities derived by logistic, logit or > probit,rocssrepresents a flexible alternative to lsens.

Options

ncut(#)specifies the number equally spaced probability intervals in the ra > nge 0, 1. The number of corresponding probability cutoffs will be (#+ 1), at values 0, 1/#, 2/#, ..., 1. > The default is 10 equally spaced intervals.savedata(filename)specifies the name of a new dataset created to contain t > he probability cutoffs and corresponding sensitivity, specificity, cumulative area under t > he ROC curve and the percentage of subjects correctly classified. The dataset is saved in the current > directory.

graphgraphs sensitivity versus 1-specificity (help for lroc) calculated at > each probability cutoff.replacerequests that if the dataset specified insavedata(filename)alread > y exists, it should be overwritten.

Examples

. webuse lbw, clear. logistic low age lwt smoke ptl ht ui. lstat. lroc, nograph. lstat, cutoff(0.30). predict p

. rocss low p // compare the results. rocss low p, ncut(20) gr. rocss low p, saved(allsens). rocss low p, ncut(80) gr saved(allsens) repAuthorsNicola Orsini, Institute of Environmental Medicine, Karolinska Institutet, Stockholm, Sweden and Institute of Information Science and Technology, National Research Council of Italy, Pisa, Italy.

Matteo Bottai, Arnold School of Public Health, University of South Carolina, Columbia, USA and Institute of Information Science and Technology, National Research Council of Italy, Pisa, Italy.

SupportNicola Orsini, http://nicolaorsini.altervista.org, Karolinska Institutet, Sweden nicola.orsini@imm.ki.se

Also see

[R] logisticOn-line: help for lroc, lstat, lsens, roc