Learn R Programming

InventorymodelPackage (version 1.0.2)

vShapley: vShapley

Description

Shapley value for a TU game.

Usage

vShapley(n, game)

Arguments

n
Number of players
game
Matrix of two columns. The first column contains the coalitions. The second one, the values for each coalition.

Value

A vector that contains, in each component i, the allocation proposed by Shapley value.

References

L.S. Shapley (1953) A value por n-person, en H.Khun y A. Tucker (eds), Contributions to the theory of games II, Vol. 28 of Annals of Mathematics Studies, Princeton University Press, Princeton.

Examples

Run this code
vShapley(3,cbind(c(1,2,3,12,13,23,123),c(1,1,1,1,2,1,2)))

#[1] 0.8333333 0.3333333 0.8333333

Run the code above in your browser using DataLab