cpLower {revealedPrefs}R Documentation

Lower bound on the number of GARP-consistent subpopulations.

Description

The cpLower function computes a Crawford-Pendakur type lower bound on the number of GARP-consistent subpopulations by creating a set of pairwise GARP-violating observations.

Usage

cpLower(x, p, times= 1, afriat.par= 1)
## S3 method for class 'lowerBound'
print(x, ...)
## S3 method for class 'lowerBound'
summary(object, ...)

Arguments

x

data frame or matrix containing the observed quantities, where each row corresponds to an observation and the columns are types of goods, or an object of class lowerBound to be used with print,

p

data frame or matrix (of same dimensions as x) containing the corresponding prices,

times

number of times the algorithm is run (the final result is the best of times results, ie. highest number of clusters found),

afriat.par

the Afriat parameter, a real number in [0,1], which allows a certain level of error in the optimization of choices ; default is 1, ie. no optimization error allowed,

object

object of class lowerBound as returned by cpLower,

...

additional arguments passed to the print and summary methods (unused).

Details

For each run of the algorithm, a random permutation of the observations is drawn, and one by one each observation is pairwise-tested against all previously found violators. If the current observation is found pairwise-inconsistent with all previously found violators it is added to the set of violators.

Value

cpLower returns an object of class lowerBound which contains the following elements:

violators

numeric vector containing the indices of observations that are pairwise GARP-inconsistent,

n.clust

lower bound on the number of types,

hist.n.types

numeric vector containing the history of numbers of types found during multiple runs of the algorithm.

n.types

lower bound on the number of types,

afriat.par

Afriat parameter used in the algorithm.

Author(s)

Julien Boelaert jubo.stats@gmail.com

References

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

See Also

See cpUpper for the upper bound on the number of types.

Examples

# Lower bound for GARP-violating data:
data(noGarp)
cp.low <- cpLower(noGarp$x, noGarp$p)
cp.low
cp.low$violators

[Package revealedPrefs version 0.4.1 Index]