CSE problems

We have implemented the following forms for the CSE.

Symmetric problems

ConstrainedStrategicEquilibrium.SymmetricJaePoly1CSEProblemType
struct SymmetricJaePoly1CSEProblem <: ConstrainedStrategicEquilibrium.SymmetricCSEProblem

The jae_poly_1 symmetric CSE problem from Computer_Code_CSE based on the paper by Armantier et al., "Approximation of Nash equilibria in Bayesian games" [1].

Parameters can be passed in as keyword arguments or can be omitted to accept the default values.

  • rng::Random.AbstractRNG: Random number generator to use during data generation (default rng is seeded with 642867)

  • mc::Int64: Number of Monte Carlo steps (default is 10000)

  • np::Int64: Number of players (default is 4)

  • distribution::Distributions.UnivariateDistribution: Distribution to use (default is Kumaraswamy(2.5, 3.5))

  • inin::Int64: Initial value for n (default is 1)

  • maxn::Int64: Maximum value for n (default is 12)

  • legacy_output::Bool: Write txt and csv files with solution info (default is false)

  • solver::Union{Nothing, SciMLBase.AbstractNonlinearAlgorithm}: The solver to use (default is to use the default set by NonlinearSolve.jl)

  • solver_kwargs::NamedTuple: Keyword arguments to pass to the solve command, such as abstol, reltol, maxiters, etc.

  • solver_initial_guess::Union{Nothing, Vector{Float64}}: Initial guess to pass to the solver, if not provided use a default initial guess (must be length inin)

Examples

julia> prob = SymmetricJaePoly1CSEProblem()
SymmetricJaePoly1CSEProblem(np=4, mc=10000, n=1..12, Distributions.Kumaraswamy{Float64}(a=2.5, b=3.5))

julia> prob = SymmetricJaePoly1CSEProblem(np=2, mc=1000, maxn=8, distribution=Beta(3, 4))
SymmetricJaePoly1CSEProblem(np=2, mc=1000, n=1..8, Distributions.Beta{Float64}(α=3.0, β=4.0))

References

  • [1] Armantier et al. Journal of Applied Econometrics, 23 (2008)
source
ConstrainedStrategicEquilibrium.SymmetricAfrprogsCSEProblemType
struct SymmetricAfrprogsCSEProblem <: ConstrainedStrategicEquilibrium.SymmetricCSEProblem

The symmetric CSE problem adapted from the Fortran code released by Armantier et al. alongside their paper, "Approximation of Nash equilibria in Bayesian games" [1].

Parameters can be passed in as keyword arguments or can be omitted to accept the default values.

  • rng::Random.AbstractRNG: Random number generator to use during data generation (default rng is seeded with 642867)

  • mc::Int64: Number of Monte Carlo steps (default is 10000)

  • np::Int64: Number of players (default is 2)

  • distribution::Distributions.UnivariateDistribution: Distribution to use (default is Beta(3, 3))

  • inin::Int64: Initial value for n (default is 2)

  • maxn::Int64: Maximum value for n (default is 16)

  • knot_refinement_strategy::Symbol: Knot refinement strategy. Can be :highest_curvature or :even_spacing. (default is :highest_curvature)

  • legacy_output::Bool: Write txt and csv files with solution info

  • solver::Union{Nothing, SciMLBase.AbstractNonlinearAlgorithm}: The solver to use (default is to use the default solver from NonlinearSolve.jl)

  • solver_kwargs::NamedTuple: Keyword arguments to pass to the solve command, such as abstol, reltol, maxiters, etc.

  • solver_initial_guess::Union{Nothing, Vector{Float64}}: Initial guess to pass to the solver, if not provided use a default initial guess (must be length inin)

  • initial_knots::Union{Nothing, Vector{Float64}}: Initial knot positions to use (must be length inin + 1, start with 0.0, and end with 1.0)

Examples

julia> prob = SymmetricAfrprogsCSEProblem()
SymmetricAfrprogsCSEProblem(np=4, mc=10000, n=2..16, Distributions.Beta{Float64}(α=3.0, β=3.0))

julia> prob = SymmetricAfrprogsCSEProblem(mc = 1000, maxn = 12, distribution = Beta(3, 4))
SymmetricAfrprogsCSEProblem(np=4, mc=1000, n=2..12, Distributions.Beta{Float64}(α=3.0, β=4.0))

References

  • [1] Armantier et al. Journal of Applied Econometrics, 23 (2008)
source

Asymmetric problems

ConstrainedStrategicEquilibrium.AsymmetricAfrprogsCSEProblemType
struct AsymmetricAfrprogsCSEProblem <: ConstrainedStrategicEquilibrium.AsymmetricCSEProblem

The asymmetric CSE problem adapted from the Fortran code released by Armantier et al. alongside their paper, "Approximation of Nash equilibria in Bayesian games" [1].

This problem can have either 2 or 4 players. In the case of 4 players, players 1 and 2 must have the same distribution and players 3 and 4 must have the same distribution.

Important: the two player version may not be working correctly and a warning will be printed if you try to run with two players.

Note regarding the solver: cdf does not seem to support dual numbers so you may need to specify a different option for autodiff, e.g. autodiff=AutoFiniteDiff(), instead of the default ForwardDiff().

Parameters can be passed in as keyword arguments or can be omitted to accept the default values.

  • rng::Random.AbstractRNG: Random number generator to use during data generation (default rng is seeded with 642867)

  • mc::Int64: Number of Monte Carlo steps (default is 10000)

  • np::Int64: Number of players, which must be 2 or 4 currently (default is 4)

  • distributions::Vector{Distributions.UnivariateDistribution}: Distributions to use, which should be a Vector of length 2 or 4. With 4 players, the first 2 players and second 2 players must have the same distributions respectively.

  • inin::Int64: Initial value for n (default is 16)

  • maxn::Int64: Maximum value for n (default is 17)

  • knot_refinement_strategy::Symbol: Knot refinement strategy. Can be :steepest_slope, :highest_curvature, :even_spacing, or :double_knot. (default is :steepest_slope)

  • legacy_output::Bool: Write txt and csv files with solution info (default is False, most of this info is included in the solution objects that get return from compute_cse)

  • solver::Union{Nothing, SciMLBase.AbstractNonlinearAlgorithm}: The solver to use (default is to use Broyden(; init_jacobian=Val(:true_jacobian), autodiff=AutoFiniteDiff()))

  • solver_kwargs::NamedTuple: Keyword arguments to pass to the solve command, such as abstol, reltol, maxiters, etc. Add show_trace=Val(true) to output extra info from the solver.

  • solver_initial_guess::Union{Nothing, Vector{Float64}}: Initial guess to pass to the solver, if not provided use a default initial guess (must be length 2 * inin - 1)

  • initial_knots::Union{Nothing, Vector{Float64}}: Initial knot positions to use, if not provided use a default initial guess (must be length inin + 1)

References

  • [1] Armantier et al. Journal of Applied Econometrics, 23 (2008)
source