Learn R Programming

revealedPrefs (version 0.4.1)

revealedPrefs-package: revealedPrefs

Description

revealedPrefs

Arguments

Details

This package is meant for the analysis of (quantity, price) data, eg. of bundles of goods and corresponding prices. It features fast algorithms that make the analysis of large datasets feasible.

Functions directPrefs and indirectPrefs compute revealed preferences.

Functions checkWarp, checkSarp, checkGarp perform fast non-parametric tests of rationality using the corresponding rationality axioms.

Functions simWarp, simSarp, simGarp and simPrefs generate simulated data consistent with a rationality axiom or with a given preference matrix.

Functions cpLower and cpUpper generate Crawford-Pendakur type bounds on the number of subpopulations and provide the corresponding clusterings.

References

Varian, H. R. (1982) The Nonparametric Approach to Demand Analysis, Econometrica, 50(4):945-973.

Varian, H. R. (1984) Microeconomic Analysis. New York/London: Norton, 2nd edition, pp 141-143.

Crawford, I. and Pendakur, K. (2013). How many types are there? The Economic Journal, 123(567):77-95.

See Also

See directPrefs for computation of preferences, checkGarp for rationality tests, simGarp for data generation, and cpUpper for clustering of data into non-violating subsets.

Examples

Run this code
# NOT RUN {
# Compute preferences and check rationality on a GARP-violating dataset:
data(noGarp)
indirectPrefs(noGarp$x, noGarp$p)
checkGarp(noGarp$x, noGarp$p)

# Cluster dataset into GARP-consistent subpopulations:
cpUpper(noGarp$x, noGarp$p)
# }

Run the code above in your browser using DataLab