Learn R Programming

⚠️There's a newer version (1.1.8) of this package.Take me there.

stratEst

stratEst is a statistical software package for strategy estimation (Dal Bo and Frechette, 2011). The goal of strategy estimation is to explain choices of a sample of individuals by a finite mixture of discrete choice strategies. The discrete choice strategies are deterministic finite state automata that can be customized by the user to fit the structure of the data. The parameters of the strategy estimation model are the relative frequencies and the choice parameters of the strategies. The model can be extended by adding individual level covariates to explain the selection of strategies by individuals. The estimation function of the package uses expectation maximization (Dempster, Laird, and Rubin, 1977) and Newton-Raphson methods to find the maximum likelihood estimates of the model parameters. To speed up the estimation, the package integrates C++ and R with the help of the R packages Rcpp (Eddelbuettel and Francois 2011) and the open source linear algebra library for the C++ language RppArmadillo (Sanderson and Curtin 2016). The package contains additional functions for data processing and simulation, strategy generation, parameter tests, model checking, and model selection.

Installation

The most recent CRAN version of stratEst is installed by executing the following command in the R console:

install.packages("stratEst")

The development version of the package can be installed from GitHub with the help of the package devtools (Wickham, Hester, and Chang 2020):

install.packages("devtools")
devtools::install_github("fdvorak/stratEst")

Example

Fit a strategy estimation model with two strategies to the rock-paper-scissors data of Wang, Xu, and Zhou (2014). The model is a mixture of the Nash strategy and a strategy that imitates the last choice.

library(stratEst)
strategies.mixture = list("nash" = strategies.RPS$nash, "imitate" = strategies.RPS$imitate)
model.mixture <- stratEst.model(data.WXZ2014,strategies.mixture)

References

  • Dal Bo P, Frechette GR (2011). “The Evolution of Cooperation in Infinitely Repeated Games: Experimental Evidence.” American Economic Review, 101(1), 411-429.
  • Dempster A, Laird N, Rubin DB (1977). “Maximum Likelihood from Incomplete Data via the EM Algorithm.” Journal of the Royal Statistical Society Series B, 39(1), 1-38.
  • Eddelbuettel D, Francois R (2011). “Rcpp: Seamless R and C++ Integration.” Journal of Statistical Software, 40(8), 1-18.
  • Sanderson C, Curtin R (2016). “Armadillo: A Template-Based C++ Library for Linear Algebra.”
  • Wang Z, Xu B, Zhou HJ (2014). “Social Cycling and Conditional Responses in the Rock-Paper-Scissors Game.” Scientific Reports, 4(1), 2045-2322.
  • Wickham H, Hester J, Chang W (2020). “devtools: Tools to Make Developing R Packages Easier.” R package version 2.3.0.

Copy Link

Version

Install

install.packages('stratEst')

Monthly Downloads

247

Version

1.1.6

License

GPL-3

Issues

Pull Requests

Stars

Forks

Maintainer

Fabian Dvorak

Last Published

November 29th, 2022

Functions in stratEst (1.1.6)

is.stratEst.data

Class stratEst.data
is.stratEst.check

Class stratEst.check
plot.stratEst.strategy

Plot Method for stratEst.strategy
print.stratEst.check

Print Method for stratEst.check
print.stratEst.strategy

Print Method for stratEst.strategy
round.stratEst.strategy

Round Method for stratEst.strategy
stratEst

Strategy Estimation Function
is.stratEst.model

Class stratEst.model
is.stratEst.strategy

Class stratEst.strategy
stratEst.check

Check model assumptions
print.stratEst.data

Print Method for stratEst.data
print.stratEst.model

Print Method for stratEst.model
stratEst.strategy

Creates a stratEst.strategy object.
stratEst.simulate

Simulation function for strategy estimation.
strategies.DFS2020

strategies.DFS2020
stratEst.data

Creates a stratEst.data object.
stratEst.model

Strategy Estimation Function
stratEst.test

Runs t-tests if model parameters differ from user defined values
summary.stratEst.model

Method dispatch for Generic Function Summary
strategies.PD

strategies.PD
strategies.DF2011

strategies.DF2011
summary.stratEst.data

Method dispatch for Generic Function summary
strategies.RPS

strategies.RPS
summary.stratEst.check

Method dispatch for Generic Function Summary
strategies.FRD2012

strategies.FRD2012
data.WXZ2014

Data of the rock-paper-scissors game from Wang, Xu, and Zhou (2014)
data.DFS2020

Data of Dvorak, Fischbacher and Schmelz (2020)
WXZ2014

Data of the rock-paper-scissors game from Wang, Xu, and Zhou (2014)
DFS2020

Data of Dvorak, Fischbacher and Schmelz (2020)
data.DF2011

Data of Dal Bo and Frechette (2011)
DF2011

Data of Dal Bo and Frechette (2011)
data.FRD2012

Data of Fudenberg, Rand, and Dreber (2012)
FRD2012

Data of Fudenberg, Rand, and Dreber (2012)