games (version 0.6-0)

egame122: Strategic model with 4 terminal nodes

Description

Fits a strategic model with four terminal nodes, as in the game illustrated below in Details.

Usage

egame122(formulas, data, subset, na.action, link=c("probit", "logit"),
    type=c("agent", "private"), startvals=c("sbi", "unif", "zero"),
    fixedUtils, sdformula, sdByPlayer=FALSE, boot=0, bootreport=TRUE,
    profile, ...)

Arguments

formulas
a list of six formulas, or a Formula object with six right-hand sides. See Details and Examples.
data
a data frame.
subset
an optional logical vector specifying which observations from data to use in fitting.
na.action
how to deal with NAs in data. Defaults to the na.action setting of options. See na.omit
link
whether to use a probit (default) or logit link structure,
type
whether to use an agent-error (agent, default) or private-information (private) stochastic structure.
startvals
whether to calculate starting values for the optimization from statistical backwards induction (sbi, default), draw them from a uniform distribution (unif), or to set them all to 0 (zero)
fixedUtils
numeric vector of values to fix for u11, u12, u13, u14, u22, and u24. NULL (the default) indicates that these should be estimated with regressors, not fixed.
sdformula
an optional list of formulas or a Formula containing a regression equation for the scale parameter. See egame12 for details. This option is ignored unless
sdByPlayer
logical: if scale parameters are being estimated (i.e., sdformula or fixedUtils is non-NULL), should a separate one be estimated for each player?
boot
integer: number of bootstrap iterations to perform (if any).
bootreport
logical: whether to print status bar during bootstrapping.
profile
output from running profile.game on a previous fit of the model, used to generate starting values for refitting when an earlier fit converged to a non-global maximum.
...
other arguments to pass to the fitting function (see maxBFGS)

Value

  • An object of class c("game", "egame122"). See egame12 for a description of the game class.

Details

The model corresponds to the following extensive-form game: . ___ 1 ___ . / \ . / \ . 2 / \ 2 . / \ / \ . / \ / \ . / \ / \ . u11 u12 u13 u14 . 0 u22 0 u24

For additional details on any of the function arguments or options, see egame12. The only difference is that the right-hand side of formulas must have six components (rather than four) in this case.

Examples

Run this code
data(data_122)

## the formula:
fr1 <- y ~ x1 + x2 | x3 + f1 | 0 | x4 + x5 | z1 + z2 | z3 + f2
##     ^   ^^^^^^^   ^^^^^^^   ^   ^^^^^^^   ^^^^^^^   ^^^^^^^
##     y     u11       u12    u13    u14       u22       u24

m1 <- egame122(fr1, data = data_122)
summary(m1)

## dummy specification of the dependent variable
fr2 <- update(Formula(fr1), a1 + a2 ~ .)
m2 <- egame122(fr2, data = data_122)
summary(m2)

## estimation of scale parameters
fr3 <- y ~ x1 | x2 | 0 | x3 | z1 | z2
m3 <- egame122(fr3, data = data_122, sdformula = ~ x4 + z3 - 1)
summary(m3)

m4 <- egame122(fr3, data = data_122, sdformula = ~ x4 - 1 | z3 - 1, sdByPlayer = TRUE)
summary(m4)

## fixed utilities
utils <- c(0.25, -0.25, 0, 0.25, 0.5, -0.5)
m5 <- egame122(y ~ 1, data = data_122, fixedUtils = utils)
summary(m5)

m6 <- egame122(y ~ 1, data = data_122, fixedUtils = utils, sdByPlayer = TRUE)
summary(m6)

Run the code above in your browser using DataCamp Workspace