Description Usage Arguments Value See Also Examples
Calculates the set of values of all subgame-perfect equilibria for a repeated game.
1 2 |
modelName |
the model definition function. |
model |
a post-processed model list. Usually created as the output of |
set |
an (m,2) matrix of vertices of the initial set of continuation values. Must wholly contain the equilibrium set. If missing or |
pun |
a length-2 vector of initial punishments. Must be less than the equilibrium punishment. If missing or |
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. |
Returns a list of solution components:
status |
is |
vStar |
a list containing a description of the equilibrium set. |
vBar |
the equilibrium punishment |
iterations |
The number of iterations to solution |
lSet |
returned only if |
lPun |
returned only if |
time |
time to compute the equilibrium set. |
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
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.