gt_nbs: Nash bargaining solution

Description Usage Arguments Examples

View source: R/gt_nbs.R

Description

Calculates and plots the Nash bargaining solution for a two player game. Provide either a payoff matrix for underlying game or a function that defines a frontier.

Usage

1
2
3
4
5
6
7
gt_nbs(u1 = function(x) x^0.5, u2 = function(x) (1 - x), matrix = FALSE,
  X = matrix(c(3, 4, 2, 1), 2, 2), Y = t(X), SQ = c(0, 0),
  solution_only = FALSE, setcol = "red", flatcol = "grey",
  hullcolor = grey(0.5), pointsize = 1, length = 1000, xtop = 1,
  xlim = NULL, ylim = NULL, alt = NULL, altlab = FALSE,
  paretoset_border = NA, NBScol = "black", diagonal = TRUE, at = c(0,
  1), origin = TRUE)

Arguments

u1

a function, increasing in x

u2

a function, decreasing in x

matrix

if TRUE payof matrix expected rather than function, SQ may be set manullay or minimax assumed

X

a payoff matrix with utilities for player 1

Y

a payoff matrix with utilities for player 2

SQ

2 a dimensional vector with status quo utilities

solution_only

Just show solution

origin

Mark the origin if TRUE

Examples

1
2
 gt_nbs(u1 = function(x) x^.5, u2 = function (x) 1 - x)
 gt_nbs(matrix  = TRUE, solution_only = TRUE)

macartan/hop documentation built on Jan. 4, 2022, 9:21 p.m.