Description Usage Arguments Value Author(s) Examples
Calculates the Shapley Value for a N-agent cooperative game.
1 | shapleyValue(game, show.data = FALSE)
|
game |
a vector that represents the cooperative game. |
show.data |
logical value indicating if the function displays the
console output ( |
shapleyValue
returns and prints the Shapley Value
of associated cooperative game.
D. Prieto
1 2 3 4 5 6 7 8 9 10 | # Cooperative game
game <- c(68, 102, 0, 170, 710, 762, 992)
# Shapley Value
shapleyValue(game, show.data = TRUE)
# -----------------------------
# Shapley Value Solution:
# -----------------------------
# [1] "(229, 272, 491)"
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.