I discovered the Afriat's theorem on the possible rationalization of a given data set of demand observations and would like to ask for your help in understanding how to compute Afriat numbers in practice, since I can't find a way to compute them.
The Varian algorithm is the following:
The first step consists in indexing the elements in the demand dataset S and finding the index of the maximal number.
Until here, I believe I understand what's going on. If we have a dataset of demands that satisfies GARP, then we can order them by the revealed preference relation directly or indirectly without any cycle and find such an index (the maximal one).
Then comes the third step of the Algorithm. "Input: A set of demand observations (p^i, x^i), i = 1...n, and the revealed preference relation R that satisfy GARP. Output: A set of numbers U^i, lamda^i, > 0, i = 1...n, that satisfy the Afriat inequalities.
- I=(1, ..., n] and B non empty, defines as a transitive and complete binary relation.
Let m = max(I), we found it before.
Set E = (i in I: x^iR^xm). If B = 0, set U^m=lamda^m and go to 6.
Should we understand that on the n*n matrix with the coefficients, the diagonal terms will always be (1,1) then ?
Also, the algorithm says otherwise go to step 4. And then I don't understand how we can go to step 4, since there is always at least one element in E ?
Set U^m = min (over E),min(over B), min( U^J + lamda^jp^j(x^i - x^), u^j).
Set lamda^m = max (over E),max (over B) max((U^J - U^m)/p^i(x^J - x^i), 1).
May someone explain to me these steps. Thanks very much!!!