plotROC                 package:puma                 R Documentation

_R_e_c_e_i_v_e_r _O_p_e_r_a_t_o_r _C_h_a_r_a_c_t_e_r_i_s_t_i_c (_R_O_C) _p_l_o_t

_D_e_s_c_r_i_p_t_i_o_n:

     Plots a Receiver Operator Characteristic (ROC) curve.

_U_s_a_g_e:

     plotROC(
             scoresList
     ,       truthValues
     ,       includedProbesets=1:length(truthValues)
     ,       legendTitles=1:length(scoresList)
     ,       main = "PUMA ROC plot"
     ,       lty = 1:length(scoresList)
     ,       col = rep(1,length(scoresList))
     ,       lwd = rep(1,length(scoresList))
     ,       yaxisStat = "tpr"
     ,       xaxisStat = "fpr"
     ,       downsampling = 100
     ,       showLegend = TRUE
     ,       showAUC = TRUE
     ,       ...
     )

_A_r_g_u_m_e_n_t_s:

scoresList: A list, each element of which is a numeric vector of
          scores. 

truthValues: A boolean vector indicating which scores are True
          Positives. 

includedProbesets: A vector of indices indicating which scores (and
          truthValues) are to be used in the calculation. The default
          is to use all, but a subset can be used if, for example, you
          only want a subset of the probesets which are not True
          Positives to be treated as False Positives. 

legendTitles: Vector of names to appear in legend. 

    main: Main plot title 

     lty: Line types. 

     col: Colours. 

     lwd: Line widths. 

yaxisStat: Character string identifying what is to be plotted on the
          y-axis. The default is "tpr" for True Positive Rate. See
          'performance' function from 'ROCR' package.

xaxisStat: Character string identifying what is to be plotted on the
          x-axis. The default is "fpr" for False Positive Rate. See
          'performance' function from 'ROCR' package.

downsampling: See details for 'plot.performance' from the 'ROCR'
          package. 

showLegend: Boolean. Should legend be displayed?

 showAUC: Boolean. Should AUC values be included in legend?

     ...: Other parameters to be passed to 'plot'. 

_V_a_l_u_e:

     This function has no return value. The output is the plot created.

_A_u_t_h_o_r(_s):

     Richard D. Pearson

_S_e_e _A_l_s_o:

     Related method 'calcAUC'

_E_x_a_m_p_l_e_s:

             class1a <- rnorm(1000,0.2,0.1)
             class2a <- rnorm(1000,0.6,0.2)
             class1b <- rnorm(1000,0.3,0.1)
             class2b <- rnorm(1000,0.5,0.2)
             scores_a <- c(class1a, class2a)
             scores_b <- c(class1b, class2b)
             scores <- list(scores_a, scores_b)
             classElts <- c(rep(FALSE,1000), rep(TRUE,1000))
             plotROC(scores, classElts)

