rocdemo.sca package:ROC R Documentation _f_u_n_c_t_i_o_n _t_o _b_u_i_l_d _o_b_j_e_c_t_s _o_f _c_l_a_s_s '_r_o_c_c' _D_e_s_c_r_i_p_t_i_o_n: rocdemo.sca - demonstrate 'rocc' class construction using a scalar marker and simple functional rule _U_s_a_g_e: rocdemo.sca(truth, data, rule=NULL, cutpts=NA, markerLabel="unnamed marker", caseLabel="unnamed diagnosis") _A_r_g_u_m_e_n_t_s: truth: true classification of objects. Must take values 0 or 1. data: quantitative markers used to classify rule: rule: a function with arguments (x, thresh) returning 0 or 1. If no rule is provided the standard rule 'dxrule.sca' is assumed and a faster implementation utilized. cutpts: values of thresholds markerLabel: textual label describing marker caseLabel: textual label describing classification _D_e_t_a_i_l_s: dxrule.sca is function (x, thresh) ifelse(x > thresh, 1, 0) The default value of argument cutpts is a point less than min(data), points separating the unique values of data and a point greater than max(data). _V_a_l_u_e: an object of S4 class rocc _N_o_t_e: _A_u_t_h_o_r(_s): Vince Carey (stvjc@channing.harvard.edu) _R_e_f_e_r_e_n_c_e_s: _S_e_e _A_l_s_o: AUC _E_x_a_m_p_l_e_s: set.seed(123) R1 <- rocdemo.sca( rbinom(40,1,.3), rnorm(40), caseLabel="new case", markerLabel="demo Marker" ) plot(R1, line=TRUE, show.thresh=TRUE) truth <- c(0, 1, 0, 1, 1, 0, 1, 1) data <- c(2, 3, 4, 4, 5, 6, 7, 8) R2 <- rocdemo.sca(truth, data, dxrule.sca) plot(R2, line=TRUE, show.thresh=TRUE) R3 <- rocdemo.sca(truth, data, function(x, thresh) 1 - dxrule.sca(x, thresh)) if (AUC(R2) + AUC(R3) != 1) stop('Sum of AUCs should be 1.')