egame122(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", ...)
Formula
object with six
right-hand sides. See "Details" and "Examples".data
to use in fitting.NULL
(the default) indicates that these should be
estimated with regressors, not fixed.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.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.maxLik
)maxLik
).c("game", "egame122")
. See
egame12
for a description of the game
class.
. ___ 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.
Ways to specify the dependent variable in egame122
:
y
, numbered 1 through 4, corresponding to the
outcomes as labeled in the game tree above.
y
, where y
has four levels, corresponding in
order to the outcomes as labeled above.
y1 + y2
, where y1
indicates whether
Player 1 moves left or right, and y2
indicates whether Player 2 moves
left or right.
y1 + y2 + y3
, where y1
indicates
whether Player 1 moves left or right, y2
indicates Player 2's move in
case Player 1 moved left, and y3
indicates Player 2's move in case
Player 1 moved right. Non-observed values of y2
and y3
should
be set to 0
, not NA
, to ensure that observations are
not dropped when na.action = na.omit
.data("data_122")
## Model 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)
Run the code above in your browser using DataLab