Matlab program for computing measures of rationality for consumer choice data using methods discussed in Mononen (2023), "Computing and Comparing Measures of Rationality".
- Background
- Measures of Rationality
- Measures of Rationality for Rationalization with Symmetric Utility
- Afriat's Efficiency Index with Symmetric Utility
- Houtman-Maks Index with Symmetric Utility
- Swaps Index with Symmetric Utility
- Varian's Goodness-of-Fit of degree α with Symmetric Utility
- Inverse Varian's Goodness-of-Fit of degree α with Symmetric Utility
- Normalized Minimum Cost Index of degree α with Symmetric Utility
- Statistical Significance of Rationality Measures
- Installation
- Usage
- References
The observed consumer choice data consists of
The revealed preference is
A revealed preference
The data
As is well known, the data is rationalizable iff the revealed preference
The measures of rationality capture how close the observed data is to being rationalizable.
For a common adjustment factor
Afriat's critical cost efficiency index (1972) is
Houtman-Maks index (1985) is
Swaps index (Apesteguia & Ballester, 2015; Mononen, 2023) is
For observation specific adjustment factors
Varian's goodness-of-fit of degree
Varian's goodness-of-fit of degree
For observation specific adjustment factors
Inverse Varian's goodness-of-fit of degree
Inverse Varian's goodness-of-fit of degree
For relation specific adjustment factors
Normalized minimum cost index of degree
Normalized minimum cost index of degree
Next, we consider the rationalization of the observed choices by a symmetric utility. Especially, if the goods are risky assets where one of them pays off with equal probability, then this corresponds to rationalization by a utility that satisfies first-order stochastic dominance.
For a permutation of goods
Define the symmetrically extended revealed preference for all
The choices can be rationalized by a symmetric and non-satiated utility function if and only if
Using these symmetrically extended revealed preferences and their acyclicality, we can extend all the previous measures of rationality to rationalization by a symmetric utility.
For a common adjustment factor
Afriat's efficiency index with symmetric utility is
Houtman-Maks index with symmetric utility is
Swaps index with symmetric utility is
For observation specific adjustment factors
Varian's goodness-of-fit of degree
Varian's goodness-of-fit of degree
For observation specific adjustment factors
Inverse Varian's goodness-of-fit of degree
Inverse Varian's goodness-of-fit of degree
For relation specific adjustment factors
Normalized minimum cost index of degree
Normalized minimum cost index of degree
The significance levels for violations of rationality are based on testing if the measure of rationality observed in the data could have been generated by a person choosing randomly on the budget line. Formally, for a number of goods
Here, the p-value of the test is the probability that random choices are less (more) rational than the observed choices.
-
Download the repository.
-
Open the main folder of the repository in Matlab.
-
Add the main folder and the subfolders to the Matlab path with the command
addpath(genpath('./'))
The directory Examples
offers minimal examples of the usage and an application to the experiment from Choi et al., 2014, "Who Is (More) Rational?", American Economic Review.
The function rationality_measures
calculates measures of rationality from prices and quantities.
values_vec = rationality_measures(P, Q, power_vec)
Input:
P: A matrix of prices where the rows index goods and the columns
index time periods. The column vector at t gives the vector of
prices that the consumer faced in the period t.
Q: A matrix of purchased quantities where the rows index
goods and the columns index time periods. The column vector at t gives
the purchased bundle at the period t.
power_vec: A vector of power variations to calculate for Varian's index,
inverse Varian's index, and normalized minimum cost index.
Output:
values_vec(1): Afriat's index
values_vec(2): Houtman-Maks index
values_vec(3): Swaps index
For each power_vec(j):
values_vec(3*j + 1): Varian's index of degree power_vec(j)
values_vec(3*j + 2): Inverse Varian's index of degree power_vec(j)
values_vec(3*j + 3): Normalized minimum cost index of degree power_vec(j)
The function rationality_measures_symmetric
calculates measures of rationality for symmetric utility from prices and quantities.
values_vec = rationality_measures_symmetric(P, Q, power_vec)
Input:
P: A matrix of prices where the rows index goods and the columns
index time periods.
Q: A matrix of purchased quantities where the rows index
goods and the columns index time periods.
power_vec: A vector of power variations to calculate for Varian's index,
inverse Varian's index, and normalized minimum cost index.
Output:
values_vec(1): Afriat's index with symmetric utility
values_vec(2): Houtman-Maks index with symmetric utility
values_vec(3): Swaps index with symmetric utility
For each power_vec(j):
values_vec(3*j + 1): Varian's index of degree power_vec(j) with symmetric utility
values_vec(3*j + 2): Inverse Varian's index of degree power_vec(j) with symmetric utility
values_vec(3*j + 3): Normalized minimum cost index of degree power_vec(j) with symmetric utility
The function statistical_significance
compares the measure of rationality from the data to the measure of rationality of choosing uniformly randomly on the budget line. This gives the probability that the data has a lower or higher measure of rationality than choosing randomly. This provides a statistical test for the significance of rationality violations following Mononen (2023).
[prob_more_rational_than_random, prob_less_rational_than_random, prob_random_satisfies_garp]
= statistical_significance(P, Q, power_vec, sample_size)
Input:
P: A matrix of prices where the rows index goods and the columns
index time periods.
Q: A matrix of purchased quantities where the rows index
goods and the columns index time periods.
power_vec: A vector of power variations to calculate for Varian's index,
inverse Varian's index, and normalized minimum cost index.
sample_size: The number of draws from the budget line used to estimate the
probabilities.
Output:
prob_more_rational_than_random: For each measure of rationality,
the probability that the data has a lower measure of rationality than
choosing uniformly on the budget line.
prob_less_rational_than_random: For each measure of rationality,
the probability that the data has a higher measure of rationality than
choosing uniformly on the budget line.
prob_random_satisfies_garp: The probability that uniform choices on the
budget line satisfy GARP.
The order of indices:
1: Afriat's index
2: Houtman-Maks index
3: Swaps index
For each degree in power_vec(j):
3*j + 1: Varian's index of degree power_vec(j)
3*j + 2: Inverse Varian's index of degree power_vec(j)
3*j + 3: Normalized minimum cost index of degree power_vec(j)
Afriat, Sydney N. (1967). The construction of utility functions from expenditure data. International economic review 8(1), pp. 67–77.
Afriat, Sydney N. (1972). Efficiency estimation of production functions. International economic review, 13(3) pp. 568–598.
Apesteguia, Jose and Ballester, Miguel (2015). A measure of rationality and welfare. Journal of Political Economy 123(6), pp. 1278–1310.
Chambers, Christopher P. and Rehbeck, John (2018). Note on symmetric utility. Economics Letters 162, pp. 27-29.
Choi, Syngjoo; Kariv, Shachar; Müller, Wieland, and Silverman, Dan (2014). Who Is (More) Rational? American Economic Review 104(6), pp. 1518–50.
Houtman, Martijn and Maks, J. A. H. (1985). Determining All Maximal Data Subsets Consistent with Revealed Preference. Kwantitatieve methoden 19(1), pp. 89–104.
Mononen, Lasse (2023). Computing and Comparing Measures of Rationality.
Varian, Hal R. (1990). Goodness-of-fit in optimizing models. Journal of Econometrics 46(1),pp. 125–140.