| gainstable.rocit | R Documentation |
S3 method to create gains table from object of
class "rocit".
## S3 method for class 'rocit'
gainstable(x, ngroup = 10, breaks = NULL, ... = NULL)
x |
A |
ngroup |
Number of desired groups in gains table. See
|
breaks |
Percentiles (in percentage) at which observations
should be separated to
form groups. See |
... |
|
gainstable.rocit calls gainstable.default.
It creates the score and class variables from the
supplied "rocit" object internally. See
gainstable.default for details.
A list of class "gainstable", same as returned by
gainstable.default.
gainstable.default, plot.gainstable,
rocit
data("Loan")
class <- Loan$Status
score <- Loan$Score
rocit_emp <- rocit(score = score, class = class, negref = "FP")
# ----------------------------------------------------------------
gtable15 <- gainstable(rocit_emp, ngroup = 15)
gtable_custom <- gainstable(rocit_emp, breaks = seq(1,100,15))
print(gtable15)
print(gtable_custom)
# ----------------------------------------------------------------
plot(gtable15)
plot(gtable_custom)
plot(gtable_custom, type = 2)
plot(gtable_custom, type = 3)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.