inequality {BasketballAnalyzeR} | R Documentation |

## Inequality analysis

### Description

Inequality analysis

### Usage

```
inequality(data, nplayers)
```

### Arguments

`data` |
numeric vector containing the achievements (e.g. scored points) of the players whose inequality has to be analyzed. |

`nplayers` |
integer, number of players to include in the analysis (ranked in nondecreasing order according to the values in data). |

### Value

A list with the following elements: `Lorenz`

(cumulative distributions used to plot the Lorenz curve) and `Gini`

(Gini coefficient).

### Author(s)

Marco Sandri, Paola Zuccolotto, Marica Manisera (basketballanalyzer.help@unibs.it)

### References

P. Zuccolotto and M. Manisera (2020) Basketball Data Science: With Applications in R. CRC Press.

### See Also

### Examples

```
Pbox.BN <- subset(Pbox, Team=="Brooklyn Nets")
out <- inequality(Pbox.BN$PTS, nplayers=8)
print(out)
plot(out)
```

[Package

*BasketballAnalyzeR*version 0.5.0 Index]