abSan-eqm: Compute the set of equilibrium values

Description Usage Arguments Value See Also Examples

Description

Calculates the set of values of all subgame-perfect equilibria for a repeated game.

Usage

1
2
abSan.eqm(modelName, model, set, pun, tol=1e-12, charts=FALSE, maxIt=150, detail=FALSE,
    print.output=TRUE, save.solution=FALSE, par=FALSE, cluster, modelOpts)

Arguments

modelName

the model definition function.

model

a post-processed model list. Usually created as the output of model.initiate(modelName) for some model. Useful when re-computing the same model with different solution options, as prevents re-defining the model each time.

set

an (m,2) matrix of vertices of the initial set of continuation values. Must wholly contain the equilibrium set. If missing or NULL, the set of stage payoffs is used.

pun

a length-2 vector of initial punishments. Must be less than the equilibrium punishment. If missing or NULL, the minmax payoff for the stage game is used.

tol

numeric convergence tolerance. The threshold Hausdorff difference between successive sets at which the algorithm terminates.

charts

Boolean flag for saving charts. Currently only equilibrium set and the sequence of convergent sets are created. These are saved as equilibrium.pdf, and convergence.pdf in the current working directory.

maxIt

The maximum number of iterations.

detail

Boolean flag for retaining information about the iterations

par

Boolean flag for using multicore execution.

print.output

Boolean flag for output display.

save.solution

Currently inactive.

cluster

number of nodes to use in cluster execution. Currently inactive.

modelOpt

options to pass to the model.

Value

Returns a list of solution components:

status

is 1 if solution converges to required tolerance. Otherwise 0.

vStar

a list containing a description of the equilibrium set. vStar$mZ is a 2-column matrix of vertices of the equilibrium set. vStar$mG is a 2-column matrix of unit-magnitude normals to the boundary of the equilibrium set, and vStar$vC is a vector of intercepts to those normals, such that for every row g of vStar$mG and each entry c of vStar$vC the conditions g.z≤ c are a necessary and sufficient condition for z to be in the equilibrium set.

vBar

the equilibrium punishment

iterations

The number of iterations to solution

lSet

returned only if details=TRUE. The list of sets at each iteration of the algorithm.

lPun

returned only if details=TRUE. The list of punishments at each iteration of the algorithm.

time

time to compute the equilibrium set.

See Also

model.initiate

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
## Compute the Cournot duopoly game
sol <- abSan.eqm( modelName=examples.cournot, modelOpts=list( 'iActs' = 15 ) )
  # Benchmark solution
sol$time
  # Time taken
sol <- abSan.eqm( modelName=examples.cournot, modelOpts=list( 'iActs' = 15 ), print.output=FALSE )
  # Turn off output
sol$time
  # Time taken
sol <- abSan.eqm( modelName=examples.cournot, modelOpts=list( 'iActs' = 40 ) )
  # Using model options to compute a finer discretization
sol$time
  # Time taken
sol <- abSan.eqm( modelName=examples.cournot, modelOpts=list( 'iActs' = 40 ), par=TRUE )
  # Using multicore execution to speed up larger example
sol$time
  # Time taken

squipbar/abSan documentation built on May 30, 2019, 8 a.m.