Learn R Programming

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.

Terms of use

Non-commercial use of stratEst is free of charge. The author kindly asks all users of the package to cite the following article in the Journal of the Economic Science Association in publications or presentations of their research:

Dvorak, F. stratEst: a software package for strategy frequency estimation. J Econ Sci Assoc 9, 337–349 (2023). https://doi.org/10.1007/s40881-023-00141-7

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

263

Version

1.1.8

License

GPL-3

Issues

Pull Requests

Stars

Forks

Maintainer

Fabian Dvorak

Last Published

October 20th, 2025

Functions in stratEst (1.1.8)

plot.stratEst.strategy

Plot Method for stratEst.strategy
is.stratEst.model

Class stratEst.model
print.stratEst.check

Print Method for stratEst.check
is.stratEst.strategy

Class stratEst.strategy
stratEst.data

Creates a stratEst.data object.
stratEst.test

Runs t-tests if model parameters differ from user defined values
strategies.DF2011

strategies.DF2011
stratEst.model

Strategy Estimation Function
summary.stratEst.check

Method dispatch for Generic Function Summary
summary.stratEst.data

Method dispatch for Generic Function summary
stratEst.simulate

Simulation function for strategy estimation.
stratEst.strategy

Creates a stratEst.strategy object.
strategies.RPS

strategies.RPS
summary.stratEst.model

Method dispatch for Generic Function Summary
strategies.PD

strategies.PD
strategies.DFS2020

strategies.DFS2020
strategies.FRD2012

strategies.FRD2012
is.stratEst.check

Class stratEst.check
data.DFS2020

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

Class stratEst.data
DF2011

Data of Dal Bo and Frechette (2011)
data.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)
data.FRD2012

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

Data of Fudenberg, Rand, and Dreber (2012)
stratEst.check

Check model assumptions
WXZ2014

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

Strategy Estimation Function
print.stratEst.strategy

Print Method for stratEst.strategy
round.stratEst.strategy

Round Method for stratEst.strategy
print.stratEst.data

Print Method for stratEst.data
print.stratEst.model

Print Method for stratEst.model