Learn R Programming

TUvalues (version 1.1.1)

banzhaf_owen: Banzhaf-Owen value

Description

Calculate the Banzhaf-Owen value

Usage

banzhaf_owen(
  characteristic_func,
  union,
  n_players = 0,
  method = "exact",
  n_rep = 10000,
  replace = TRUE,
  echo = TRUE
)

Value

The Banzhaf-Owen value for each player

Arguments

characteristic_func

The valued function defined on the subsets of the number of players

union

List of vectors indicating the a priori unions between the players

n_players

Only used if characteristic_func is a function. The number of players in the game.

method

Method used to calculate the Owen value. Valid methods are: exact for the exact calculation or appro for approximated polynomial calculation based on sampling proposed by Saavedra-Nieves & Fiestras-Janeiro (2021).

n_rep

Only used if method is appro. The number of iterations to perform in the approximated calculation

replace

Should sampling be with replacement?

echo

Only used if method is appro. Show progress of the approximated calculation.

References

Saavedra-Nieves, A., & Fiestras-Janeiro, M. G. (2021). Sampling methods to estimate the Banzhaf–Owen value. Annals of Operations Research, 301(1), 199-223.

Examples

Run this code
characteristic_func <- c(0,0,0,0,30,30,40,40,50,50,60,70,80,90,100)
union <- list(c(1,3),c(2),c(4))
banzhaf_owen(characteristic_func, union)
banzhaf_owen(characteristic_func, union, method = "appro", n_rep = 4000)

Run the code above in your browser using DataLab