The input pref.mat
must be a square matrix, with number of rows equal to the number of desired observations. All entries must be either 0, 1, or 2. The interpretation of the matrix is the same as in function directPrefs
:
pref.mat[i, j] = 0
if bundle i
is not revealed prefered to bundle j
pref.mat[i, j] = 1
if bundle i
is revealed prefered to bundle j
pref.mat[i, j] = 2
if bundle i
is strictly revealed prefered to bundle j
.
All diagonal entries of pref.mat
must be 1 (each bundle is revealed prefered to itself), except when afriat.par
is strictly less than 1.
The simulated data (quantities and prices) are obtained by particle swarm optimization (of package pso
). Fitness must reach 0 for the data to be consistent with the preference matrix. If optimization fails, a warning is issued.