strat: Fit Statistical Strategic Models

Description Usage Arguments Details Value Author(s) References See Also Examples

Description

strat estimates statistical strategic models using maximum likelihood estimation.

Usage

1
strat(formulae, tree, tNodes, alpha = list(), data = parent.frame(), subset = NULL, weights = NULL, na.action = "na.omit", model = FALSE, start = NULL, method = "BFGS", ...)

Arguments

formulae

Nested List. Formulas for utilities and private information variances for each outcome and player player. This list has a specific structure. Each element of the top-level list is an outcome; these do not need to be named as the name of the outcome variable can be determined from the formulas. Each outcome is a list with elements named for each players; these elements must be named. Each player is a list with two elements. The first is the formula describing the utility function of the player for that outcome; the second is the variance of the private information error term for that (player, outcome). The private information element is optional, and is assumed to be 0 (meaning, no private information error term) if not present. If an outcome, player element is missing, the utility of that player for that outcome is assumed to be 0.

tree

Character. Name of model to be estimated.

tNodes

Character. Name of dependent variable associated with each terminal node.

alpha

Named list. Variance of agent error for each action. Each element must have the same name as its action.

data

An optional data frame, list or environment (or object coercible by as.data.frame to a data frame) containing the variables in the model. If not found in data, the variables are taken from environment(formula), typically the environment from which strat is called

subset

an optional vector specifying a subset of observations to be used in the fitting process.

weights

an optional vector of weights to be used in the fitting process.

na.action

Character or function. A function which indicates what should happen when the data contain NAs. na.omit is the default.

model

Logical. If TRUE returns a list of model frames used in the estimation.

start

Numeric. Initial values for optimizer.

method

Character. Optimization method to use. Default is "BFGS". See optim

...

Further arguments to pass to optim

Details

strat is a general function to estimate statistical strategic models with binary choices. Each extensive game form must be implemented by adding a class that extends "StratModel" and adding a prAction method to calculate the probabilities of each action for that particular game form. Future plans are to allow for arbitrary extensive form games. For a simpler front-end to strat, written for the 1-2 extensive form game, see strat_1_2.

The details of the estimation procedure is taken primarily from Signorino (2003). See the other references for more details on statistical strategic models.

The optim optimizer is used to find the minimum of the negative log-likelihood. Since optim is called by the mle function, strat returns an S4 object that extends "mle".

Currently strat has the following restrictions

Value

An object of class StratMLE.

Author(s)

Jeffrey Arnold, jarnold7 AT mail DOT rochester DOT edu

References

~put references to the literature/web site here ~

See Also

See Also as strat_1_2, mle, optim

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
data(war1800)

## Estimate a Strategic 1-2 Model

## Define the utility functions for each player at each outcome
utils <- list(
            list("1" = list(sq ~ - 1 + peaceyrs + s.wt.re1, 1)),
            list("1" = list(capit ~ 1, 1),
                 "2" = list(capit ~ 0, 1)),
            list("1" = list(war ~ -1 + balanc, 1),
                 "2" = list(war ~ balanc, 1))
            )

## Define the structure of the Tree
nodes <- list(a0 = StratActionNode("1", 0),
              a1 = StratTerminalNode("sq", 0),
              a2 = StratActionNode("1", 0),
              a3 = StratTerminalNode("capit", 0),
              a4 = StratTerminalNode("war", 0))

gameTree <- StratTree(nodes,
                      c(NA, "a0", "a0", "a1", "a2", "a2"))

quux <- strat(utils, tree="1-2", data=war1800,
              tNodes = c("sq", "capit", "war"),
              model=TRUE)

## Summary of the model
summary(quux)

## Other methods inherited from 'mle'
print(quux)
vcov(quux)
ll <- logLik(quux)
AIC(ll)
BIC(ll)

## Note confint() and profile() are very slow for any non-trivial
## strategic model

jrnold/r-strat documentation built on May 20, 2019, 1:05 a.m.