Description Usage Arguments Details Value Author(s) References See Also Examples
View source: R/crawfordpendakur.R
The cpLower
function computes a CrawfordPendakur type lower bound on the number of GARPconsistent subpopulations by creating a set of pairwise GARPviolating observations.
1 2 3 4 5 
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 
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 
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 
... 
additional arguments passed to the 
For each run of the algorithm, a random permutation of the observations is drawn, and one by one each observation is pairwisetested against all previously found violators. If the current observation is found pairwiseinconsistent with all previously found violators it is added to the set of violators.
cpLower
returns an object of class lowerBound
which contains the following elements:

numeric vector containing the indices of observations that are pairwise GARPinconsistent, 

lower bound on the number of types, 

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

lower bound on the number of types, 

Afriat parameter used in the algorithm. 
Julien Boelaert jubo.stats@gmail.com
Crawford, I. and Pendakur, K. (2013). How many types are there? The Economic Journal, 123(567):7795.
See cpUpper for the upper bound on the number of types.
1 2 3 4 5 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.