Learn R Programming

TUvalues (version 0.1.0)

owen: Owen value

Description

Calculate the Owen value

Usage

owen(
  characteristic_func,
  union,
  method = "exact",
  n_rep = 10000,
  n_players = 0
)

Value

The 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.

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.

n_rep

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

n_players

The number of players in the game.

Examples

Run this code
n <- 10
v <- function(coalition) {
  if (length(coalition) > n/2) {
    return(1)
  } else {
    return(0)
  }
}
u <- lapply(1:(n/2), function(i) c(2*i - 1, 2*i))
owen(v, union = u, method = "appro", n_rep = 4000, n_players = n)

characteristic_func <- c(1,1,2,1,2,2,2)
union <- list(c(1,2),c(3))
owen(characteristic_func, union)
owen(characteristic_func, union, method = "appro", n_rep = 4000)

Run the code above in your browser using DataLab