Strategic model with 2 players, 3 terminal nodes

Fits a strategic model with two players and three terminal nodes, as in the game illustrated below in "Details".

egame12(formulas, data, subset, na.action, link = c("probit", "logit"), type = c("agent", "private"), startvals = c("sbi", "unif", "zero"), fixedUtils = NULL, sdformula = NULL, sdByPlayer = FALSE, boot = 0, bootreport = TRUE, profile, method = "BFGS", ...)
a list of four formulas, or a Formula object with four right-hand sides. See "Details" and the examples below.
a data frame containing the variables in the model.
optional logical expression specifying which observations from data to use in fitting.
how to deal with NAs in data. Defaults to the na.action setting of options. See na.omit.
whether to use a probit (default) or logit link structure,
whether to use an agent-error ("agent", default) or private-information ("private") stochastic structure.
whether to calculate starting values for the optimization using statistical backwards induction ("sbi", default), draw them from a uniform distribution ("unif"), or to set them all to 0 ("zero")
numeric vector of values to fix for u11, u13, u14, and u24 respectively. NULL (the default) indicates that these should be estimated with regressors rather than fixed.
an optional list of formulas or a Formula containing a regression equation for the scale parameter. The formula(s) should have nothing on the left-hand side; the right-hand side should have one equation if sdByPlayer is FALSE and two equations if sdByPlayer is TRUE. See the examples below for how to specify sdformula.
logical: if scale parameters are being estimated (i.e., sdformula or fixedUtils is non-NULL), should a separate one be estimated for each player? This option is ignored unless fixedUtils or sdformula is specified.
integer: number of bootstrap iterations to perform (if any).
logical: whether to print status bar when performing bootstrap iterations.
output from running on a previous fit of the model, used to generate starting values for refitting when an earlier fit converged to a non-global maximum.
character string specifying which optimization routine to use (see maxLik)
other arguments to pass to the fitting function (see maxLik).

The model corresponds to the following extensive-form game, described in Signorino (2003):

.     1
.     /\
.    /  \
.   /    \ 2
.  u11   /\
.       /  \
.      /    \
.    u13    u14
.    0      u24

If Player 1 chooses L, the game ends and Player 1 receives payoffs of u11. (Player 2's utilities in this case cannot be identified in a statistical model.) If Player 1 chooses L, then Player 2 can choose L, resulting in payoffs of u13 for Player 1 and 0 for Player 2, or R, with payoffs of u14 for 1 and u24 for 2.

The four equations specified in the function's formulas argument correspond to the regressors to be placed in u11, u13, u14, and u24 respectively. If there is any regressor (including the constant) placed in all of u11, u13, and u14, egame12 will stop and issue an error message, because the model is then unidentified (see Lewis and Schultz 2003). There are two equivalent ways to express the formulas passed to this argument. One is to use a list of four formulas, where the first contains the response variable(s) (discussed below) on the left-hand side and the other three are one-sided. For instance, suppose:

  • u11 is a function of x1, x2, and a constant
  • u13 is set to 0
  • u14 is a function of x3 and a constant
  • u24 is a function of z and a constant.

The list notation would be formulas = list(y ~ x1 + x2, ~ 0, ~ x3, ~ z). The other method is to use the Formula syntax, with one left-hand side and four right-hand sides (separated by vertical bars). This notation would be formulas = y ~ x1 + x2 | 0 | x3 | z.

To fix a utility at 0, just use 0 as its equation, as in the example just given. To estimate only a constant for a particular utility, use 1 as its equation.

There are three equivalent ways to specify the outcome in formulas. One is to use a numeric vector with three unique values, with their values (from lowest to highest) corresponding with the terminal nodes of the game tree illustrated above (from left to right). The second is to use a factor, with the levels (in order as given by levels(y)) corresponding to the terminal nodes. The final way is to use two indicator variables, with the first standing for whether Player 1 moves L (0) or R (1), the second standing for Player 2's choice if Player 1 moves R. (The values of the second when Player 1 moves L should be set to 0 or 1, not NA, in order to ensure that observations are not dropped from the data when na.action = na.omit.) The way to specify formulas when using indicator variables is, for example, y1 + y2 ~ x1 + x2 | 0 | x3 | z.

If fixedUtils or sdformula is specified, the estimated parameters will include terms labeled log(sigma) (for probit links) or log(lambda). These are the scale parameters of the stochastic components of the players' utility. If sdByPlayer is FALSE, then the variance of error terms (or the equation describing it, if sdformula contains non-constant regressors) is assumed to be common across all players. If sdByPlayer is TRUE, then two variances (or equations) are estimated: one for each player. For more on the interpretation of the scale parameters in these models and how it differs between the agent error and private information models, see Signorino (2003).

The model is fit using maxLik, using the BFGS optimization method by default (see maxBFGS). Use the method argument to specify an alternative from among those supplied by maxLik.


An object of class c("game", "egame12"). A game object is a list containing:
estimated parameters of the model.
estimated variance-covariance matrix. Cells referring to a fixed parameter (e.g., a utility when fixedUtils is specified) will contain NAs.
vector of individual log likelihoods (left unsummed for use with non-nested model tests).
the call used to produce the model.
a list containing the optimization method used (see argument method), the number of iterations to convergence, the convergence code and message returned by maxLik, and an indicator for whether the (analytic) gradient was used in fitting.
the final Formula object passed to model.frame (including anything specified for the scale parameters).
the specified link function.
the specified stochastic structure (i.e., agent error or private information).
the model frame containing all variables used in fitting.
a record of the levels of any factor regressors.
the dependent variable, represented as a factor.
names of each separate equation (e.g., "u1(sq)", "u1(cap)", etc.).
logical vector specifying which parameter values, if any, were fixed in the estimation procedure.
if boot was non-zero, a matrix of bootstrap parameter estimates (otherwise NULL).
an indicator for whether the Hessian matrix is negative definite, a sufficient condition for local identification of the model parameters.
The second class of the returned object, egame12, is for use in generation of predicted probabilities.


Jeffrey B. Lewis and Kenneth A Schultz. 2003. "Revealing Preferences: Empirical Estimation of a Crisis Bargaining Game with Incomplete Information." Political Analysis 11:345--367.

Curtis S. Signorino. 2003. "Structure and Uncertainty in Discrete Choice Models." Political Analysis 11:316--344.

See Also and predProbs for postestimation analysis; makeFormulas for formula specification.

  • egame12

## Model formula:
f1 <- esc + war ~ s_wt_re1 + revis1 | 0 | regime1 | balanc + regime2
##    ^^^^^^^^^   ^^^^^^^^^^^^^^^^^   ^   ^^^^^^^   ^^^^^^^^^^^^^^^^
##        y              u11         u13    u14           u24

m1 <- egame12(f1, data = war1800)

m2 <- egame12(f1, data = war1800, link = "logit")

m3 <- egame12(f1, data = war1800, subset = year >= 1850)

m4 <- egame12(f1, data = war1800, boot = 10)
summary(m4, useboot = FALSE)

## Estimating scale parameters under fixed utilities
utils <- c(-1, 0, -1.4, 0.1)
m5 <- egame12(esc + war ~ 1, data = war1800, fixedUtils = utils)

m6 <- egame12(esc + war ~ 1, data = war1800, fixedUtils = utils, sdByPlayer = TRUE)

## Estimating scale parameters with regressors
m7 <- egame12(f1, data = war1800, sdformula = ~ balanc - 1)

## Using a factor outcome
y <- ifelse(war1800$esc == 1, ifelse(war1800$war == 1, "war", "cap"), "sq")
war1800$y <- factor(y, levels = c("sq", "cap", "war"))
f2 <- update(Formula(f1), y ~ .)

m8 <- egame12(f2, data = war1800)
Documentation reproduced from package games, version 1.1.2, License: GPL (>= 2)

Community examples

Looks like there are no examples yet.