shapleyValue: Shapley Value Solution

Description Usage Arguments Value Author(s) Examples

View source: R/shapleyValue.R

Description

Calculates the Shapley Value for a N-agent cooperative game.

Usage

1
shapleyValue(game, show.data = FALSE)

Arguments

game

a vector that represents the cooperative game.

show.data

logical value indicating if the function displays the console output (TRUE) or not (FALSE). By default the value is FALSE.

Value

shapleyValue returns and prints the Shapley Value of associated cooperative game.

Author(s)

D. Prieto

Examples

 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)"
  

coopProductGame documentation built on Aug. 25, 2018, 5:04 p.m.