cpa | R Documentation |
This function computes the coefficient of predictive ability which is equalivalent to the area under the UROC curve. Two syntaxes are possible: one object of class "uroc" or two vectors, the response and the predictor.
cpa(...) ## Default S3 method: cpa(response, predictor, ...) ## S3 method for class 'uroc' cpa(uroc, ...)
... |
ignored |
response |
a numeric vector of real valued responses. |
predictor |
a numeric vector of the same length as |
uroc |
an object of class "uroc" contaning the values of the false alarm rate (1-specificity) and the hitrate (sensitivity) of the UROC curve. |
The CPA is an asymmetric measure that is linearly related to the correlation between the classes of the response variable and the ranks of the predictor.
The numeric CPA value.
data(longley) response = longley$Employed predictor = longley$GNP cpa(response, predictor)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.