roc.regRSM {regRSM} | R Documentation |
ROC curve and AUC parameter.
Description
This function produces ROC curve and computes AUC parameter.
Usage
## S3 method for class 'regRSM'
roc(object, truemodel, plotit, ...)
Arguments
object |
Fitted 'regRSM' model object. |
truemodel |
User specified vector containing indexes of all significant variables. |
plotit |
Logical argument indicating whether a plot should be produced. If the value is |
... |
Other arguments to plot. |
Details
Let i_1,\ldots,i_p
be the ordering of variables (e.g. given by the RSM final scores), p
is the number of all variables.
ROC curve for ordering is defined as
\textrm{ROC}(s):=(FPR(s),TPR(s)),\quad s\in\{1,\ldots,p\},
where
FPR(s):=\frac{|SelectedModel(s)\setminus truemodel|}{|truemodel^{C}|},
TPR(s):=\frac{|SelectedModel(s)\cap truemodel|}{|truemodel|},
SelectedModel(s):=\{i_1,\ldots,i_s\},
|A|
denotes cardinality of A
and A^C
denotes a complement of A
.
This function is useful for the evaluation of the ranking produced by the RSM procedure,
when the set of significant variables is known (e.g. in the simulation experiments on artificial datasets). When AUC is equal one it means that all significant
variables, suplied by the user in argment truemodel
, are placed on the top of the ranking list.
Value
ROC curve is produced and the value of parameter AUC is returned.
Author(s)
Pawel Teisseyre, Robert A. Klopotek.
Examples
p=100
n=100
beta1 = numeric(p)
beta1[c(1,5,10)]=c(1,1,1)
x = matrix(0,ncol=p,nrow=n)
for(j in 1:p){
x[,j]=rnorm(n,0,1)
}
y = x %*% beta1 + rnorm(n)
p1 = regRSM(x,y,store_data=TRUE)
true = c(1,5,10)
roc(p1,true,plotit=TRUE)