.- help for ^roctab^ [STB-52: sg120; STB-53: sg120.1] .- Receiver Operating Characteristic (ROC) analysis ------------------------------------------------ ^roctab^ refvar classvar [weight] [^if^ exp] [^in^ range] [^,^ ^bam^ber ^han^ley ^bino^mial ^d^etail ^lor^enz ^tab^le ^l^evel^(^#^)^ ^noref^line ^nog^raph graph_options ] ^rocfit^ refvar classvar [weight] [^if^ exp] [^in^ range] [^,^ ^cont(^#^)^ ^g^enerate^(^newvar^)^ ^l^evel^(^#^)^ ^nolog^ maximize_options ] ^rocplot^ [^,^ ^conf^band ^l^evel^(^#^)^ ^noref^line graph_options ] ^roccomp^ refvar classvar [classvars] [weight] [^if^ exp] [^in^ range] [^,^ ^by(^varname^)^ ^bin^ormal ^l^evel(^#^) ^nog^raph ^test(^matname^)^ ^sep^arate ^noref^line graph_options ] ^fweight^s are allowed; see help @weights@. Description ----------- The above commands are used to perform Receiver Operating Characteristic (ROC) analyses on rating and discrete classification data. The two variables refvar and classvar must be numeric. The reference variable indicates the true state of the observation such as diseased and non-diseased or normal and abnormal, and must be coded 0 and 1. The rating or outcome of the diagnostic test is recorder in classvar, which must be at least ordinal with higher values indicating higher risk. ^roctab^ is used to perform non-parametric ROC analyses. By default, ^roctab^ graphs and calculates the area under the ROC curve. Optionally, ^roctab^ can display the data in tabular form and can also produce Lorenz-like plots. ^rocfit^ estimates maximum-likelihood ROC models assuming a binormal distribution of the latent variable. ^rocplot^ may be used after ^rocfit^ to plot the fitted ROC curve and simultaneous confidence bands. ^roccomp^ tests the equality of two or more ROC areas obtained from applying two or more test modalities to the same sample or to independent samples. ^roccomp^ expects the data to be in wide form when comparing areas estimated from the same sample, and in long form for areas estimated from independent samples. Options ------- ^bamber^ specifies that the standard error for the area under the ROC curve be calculated using the method suggested by Bamber (1975). Otherwise, standard errors are obtained as suggested by DeLong, DeLong and Clarke-Pearson (1988). ^hanley^ specifies that the standard error for the area under the ROC curve be calculated using the method suggested by Hanley and McNeil (1982). Otherwise, standard errors are obtained as suggested by DeLong, DeLong and Clarke-Pearson (1988). ^binomial^ specifies that exact binomial confidence intervals be calculated. ^detail^ outputs a table displaying the sensitivity, specificity, percent of subjects correctly classified, and two likelihood-ratios for each possible cut-point of classvar. ^lorenz^ specifies that a Lorenz-like curve be produced and, Gini and Pietra indices reported. ^table^ outputs a 2 x k contingency table displaying the raw data. ^level(^#^)^ specifies the confidence level, in percent, for calculation of confidence intervals of the area under the curve; see help @level@. ^norefline^ suppresses the plotting of the 45 degree reference line from the graphical output of the ROC curve. ^nograph^ suppresses graphical output of the ROC curve. graph_options are any of the options allowed with ^graph, twoway^; see help @grtwoway@. ^cont(^#^)^ specifies that the continuous classvar be divided into # groups approximately of equal length. The option is required when classvar takes more than 20 distinct values. ^cont(.)^ may be specified to indicate that classvar is to be used as it is, even though it could take more than 20 distinct values. ^generate(^newvar^)^ specifies the name of the new variable to contain values indicating the groups produced by ^cont(^#^)^. ^generate(^newvar^)^ is not valid without specifying ^cont(^#^)^ or with ^cont(.)^. ^nolog^ prevents ^rocfit^ from showing the iteration log. maximize_options control the maximization process; see help @maximize@. You should never have to specify them. ^confband^ specifies that simultaneaus confidence bands be plotted arround the ROC curve when using ^rocplot^. ^by(^varname^)^ is required when comparing independent ROC areas. The ^by()^ variable identifies the groups to be compared. ^binormal^ specifies that the areas under the ROC curves to be compared should be estimated using the binormal distribution assumption. By default, areas to be compared are computed using the trapezoidal rule. ^test(^matname^)^ specifies the contrast matrix to be used when comparing ROC areas. By default, the null hypothesis that all areas are equal is tested. ^separate^ is meaningful only with ^by()^; it says that each ROC curve should be placed on its own graph rather than one on top of the other. Examples -------- . ^roctab disease rating^ . ^roctab disease rating [fw=pop]^ . ^roctab disease rating, table detail^ . ^roctab disease rating, lorenz^ . ^rocfit disease rating, bamber^ . ^rocplot^ . ^roccomp disease rating, by (mod)^ . ^roccomp disease mod1 mod2 mod3 [fw=pop], test(comp)^ . ^roccomp disease mod1 mod2 [fw=pop], binormal^ . ^rocfit disease rating, cont(10)^ . ^rocfit disease rating, cont(.)^ . ^rocfit disease rating, cont(10) generate(group)^ Author ------ Mario Cleves Stata Corporation mcleves@@stata.com Also see -------- Manual: ^[R] logistic^ On-line: help for @logistic@; @logit@; @lroc@