Prest : Open-Source Software for Computational Revealed Preference Analysis

Revealed preference analysis revolves around the theoretical identification and empirical testing of falsifiable restrictions (or “axioms”) on people’s observable choice behavior that are necessary and/or sufficient for it to be thought of as being compatible with some theoretical model of preference-maximizing choice. This methodological approach originates in the works of Samuelson (1938), Houthakker (1950), Arrow (1959), Richter (1966) and Afriat (1967), who focused on the textbook model of rational choice that portrays the decision maker as maximizing a complete, transitive and stable binary preference relation (possibly with additional properties) on a set of choice alternatives. The vast literature generated by these works has contributed in essential ways to the empirical analysis of individual and collective decision making under certainty, risk and uncertainty, in both budget-constrained and more general choice domains (Chambers & Echenique, 2015; I. Crawford & De Rock, 2014; Halevy, Persitz, & Zrill, 2018; Nishimura, Ok, & Quah, 2017).

The growing development of theoretical revealed-preference tests for budgetary datasets (i.e.ones where choices are price-and income-constrained) and their successful and continuously expanding application in empirical studies have been facilitated by the development of relevant computer algorithms.Such algorithms have been coded, for example, in: 1. Mathematica (Beatty & Crawford, 2011;Varian, 1996); 2. Fortran (Cherchye, Crawford, De Rock, & Vermeulen, 2009); 3. R (Boelaert, 2014); 4. MATLAB (Dean & Martin, 2016;Heufer & Hjertstrand, 2015). 1he resulting computer programs allow the user to test if a given budgetary dataset complies with certain axioms of choice consistency, or to compute various indices that are suggestive of "how close" a given decision maker's choices are to the model of rational choice/utility maximization.
Yet, despite the plethora of choice-theoretic models that are operational on discrete finite sets of general alternatives in non-budgetary environments and predict rational as well as bounded-rational behavior 2 , no computational revealed preference tools are currently available for this important class of choice environments and models.
Hereby announced Prest is a user-friendly desktop application that, for the first time, combines standard revealed-preference analysis on budgetary datasets with novel axiomconsistency and model-based goodness-of-fit analysis on general choice datasets.
In summary, Prest 3 : 1. Has a user-friendly graphical interface, through which all tasks can be performed.

Prest consists of two separate communicating programs:
GUI implements the user-facing graphical interface.It executes the core component (described below) as a subprocess and uses it to compute tasks as requested by the user.It is written in Python 4 and uses PyQt5.This program is released under the GNU GPL license.
Core implements the computations and communicates with the GUI using synchronous binary messages sent over its standard input/output.It is written in Rust 5 for speed, reliability, and ease of parallelisation.This program is released under the 3-Clause BSD license.
The components of the GUI wrapper (or the binary protocol itself) can be reused to create other clients to the core.For example, we have implemented an (unreleased) command-line interface to model estimation for easier testing and benchmarking.
2. Offers a detailed analysis of consistency for budgetary-choice data.
For each such dataset we construct a graph as follows: • Vertices represent k observations (p i , x i ) in each graph, where p i , x i ∈ R n + are, respectively, the observed prices and demanded quantities for the n goods in question; • Edges are defined in two variants: Every strict edge is also non-strict.
Prest finds and counts the following: GARP violations: elementary cycles (i.e.cycles with no repeating vertices) of non-strict edges where at least one edge is strict.
SARP violations: elementary cycles of non-strict edges where for at least one edge i ⊵ j in the cycle, WARP (strict) violations: SARP violations of length 2.
2 An example of such bounded rationality is when choices are guided by maximization of an incomplete preference relation.Allowing the preference relation to be incomplete is a natural way to model the decision maker's indecisiveness between some choice alternatives, which is ruled out by the model of rational choice.
3 For the definitions of the axioms and indices mentioned below see Chambers & Echenique (2015) or https://prestsoftware.com.

Houtman-Maks (1985) index:
This is the number of observations that need to be removed from a subject's choice data to make it comply with GARP, SARP or WARP (non-)strict.We compute both the upper and lower bound of each such index for every subject.If the bounds coincide, we report their value as the exact Houtman-Maks index, otherwise we report the bounded interval.
3. Offers a detailed consistency analysis for general-choice data.This includes both forced-and non-forced choice data, as well as data where one of the feasible market alternatives is the default/status quo option.
Here we construct a multigraph where: • Vertices represent the alternatives in a finite set X; • Edges represent the observations where the subject chose an alternative over another.Like in budgetary data, each edge here is either just non-strict, or also strict: for example, the choice of {x, y} from menu {x, y} ⊆ X, denoted C({x, y}) = {x, y}, induces a non-strict edge x ≿ y, while the choice of {x} from menu {x, y, z} induces two strict edges x ≻ y and x ≻ z.
More formally, we define edges as follows: Again, every strict edge is also non-strict.
Then we find elementary cycles in the graph, counting consistency violations as follows: Congruence violations: Elementary cycles of non-strict edges where at least one edge is strict.

Strict Choice Consistency violations:
Elementary cycles of strict edges.

WARP violations:
Congruence violations of length 2.

Binary Choice Consistency violations:
Congruence violations restricted to menus with 2 alternatives.

Strict Binary Choice Consistency violations
Strict Choice Consistency violations restricted to menus with 2 alternatives.
4. Features choice-merging and supports the analysis of multi-valued choice.
For general-choice datasets, if the same menu of alternatives was presented to some subject more than once, then Prest allows for merging the various choices at that menu.This feature allows the user to subsequently treat the observed choices as if they were multi-valued (this is also allowed and/or predicted by many choicetheoretic models).

Features novel non-parametric goodness-of-fit tests for models defined on general choice environments.
These tests identify which of the relevant model(s) that are embedded in Prest's current toolkit offer(s) the best explanation for a given subject's behavior.
Each model supported by Prest describes a decision process determined by one or more preorders (these include linear orders, weak orders and partial orders as special cases), possibly coupled with additional information.A "configuration" of all determinants influencing which alternative(s) will be chosen by the decision model from a menu is called an instance of the model.
In model estimation, Prest generates all possible instances for each selected model and computes the number of disagreements between the choices of the model and the examined subject from the given dataset.The best-matching model for each subject is chosen as the model that has an instance with the lowest number of disagreements.The latter is called the distance score of the model in question.This model-based extension of the Houtman-Maks method for non-budgetary data originates in Costa-Gomes, Cueva, Gerasimou and Tejiščák (2016).
The list of models currently supported by Prest is available in the software's documentation pages in https://prestsoftware.com.
Importantly, as with consistency analysis on general-choice data, models assuming the presence of default/status quo market alternatives and models of non-forced choice are also supported.6 6. Features Monte-Carlo simulations of random behavior.
The choices of an arbitrary number of (uniform-)random-behaving artificial decision makers can be simulated in ways that allow for the distributions of variables of interest such as the number of an axiom's violations and a model's distance score to be derived.These can then be used to understand which of the available human choice data can be thought of as having been generated randomly.This methodological approach (for budgetary choice data) originates in Bronars (1987).
Prest currently supports simulations for both forced-and non-forced choice general datasets, and also for ones with default/status quo market alternatives.