R/Gmax.R

Defines functions Gmax

Gmax <- function(x)
{
    c <- sum(x)
    n <- length(x)
    g <- 1 - c/n

    if(g <= 0)
    {
        G <- 0
    }
    else
    {
        G <- g
    }
    return(G)
}
prestevez/crimeineq documentation built on May 29, 2019, 7:39 a.m.