shapleyvalue {TUGLab} | R Documentation |
Shapley value
Description
Given a game, this function computes its Shapley value.
Usage
shapleyvalue(v, binary = FALSE)
Arguments
v |
A characteristic function, as a vector. |
binary |
A logical value. By default, |
Details
Given v\in G^N
, the Shapley value of each player i \in N
can be defined as
Sh_{i}(v) = \sum_{S \subset N \setminus \{i\}} \frac{s!(n-s-1)!}{n!} (v(S \cup \{i\})-v(S)).
It is also possible to compute it as
Sh_{i}(v) = \sum_{\emptyset \neq S \subset N} M_{i,S} v(S),
where M_{i,S} = \frac{(s-1)!(n-s)!}{n!}
if i \in S
and M_{i,S} = -\frac{s!(n-s-1)!}{n!}
if i \notin S
.
Value
The Shapley value of the game, as a vector.
References
Le Creurer, I. J., Mirás Calvo, M. A., Núñez Lugilde, I., Quinteiro Sandomingo, C., & Sánchez Rodríguez, E. (2024). On the computation of the Shapley value and the random arrival rule. Available at https://papers.ssrn.com/sol3/papers.cfm?abstract_id=4293746.
Shapley, L. S. (1953). A value for n-person games. Contribution to the Theory of Games, 2.
See Also
Examples
shapleyvalue(c(0,0,3,0,3,8,6,0,6,9,15,8,16,17,20), binary=TRUE)
shapleyvalue(claimsgame(E=69.420,d=runif(10,5,10)))