giniCoef: Produce a gini coefficient

View source: R/giniCoef.R

giniCoefR Documentation

Produce a gini coefficient

Description

This function calculates a Gini coefficient based on a Receiver Operator Curve.

Usage

giniCoef(pred, act)

Arguments

pred

Logit/scores/probabilities to be compared against actuals

act

This should be a column containing outcomes in a boolean form either as a factor or number

Value

gini The coefficient

See Also

AUC roc giniChart

Other creditrisk: giniChart(), logit.odd(), logit.prob(), odd.logit(), odd.prob(), prob.logit(), prob.odd(), scaledScore()

Examples

  sampledata<- data.frame(val= rnorm(100) , outcome=rbinom(100,1,.8))
  giniCoef(sampledata$val,sampledata$outcome)
  

optiRum documentation built on May 5, 2022, 1:05 a.m.