Matlab Code

Below five Matlab m files that can be used to estimate the consumer search model as described in “Maximum
likelihood estimation of search costs” (with José Luis Moraga-González), *European Economic Review*, 52, 820-48, 2008.

The code is meant for academic research only. Users of this code (or a modified version of it) should reference the above paper. The code is provided without additional support. The code is tested using Matlab 7.8 (including optimization toolbox) on both Mac OS X and Windows XP.

The main file is:

maxlik.m - Reads the data and calls the other functions.

Accompanying functions are:

loglik.m - Computes the log-likelihood function;

f.m - Computes *F*(*p*) that solves the equilibrium condition;

condc.m - Computes the integrand used to calculate the critical search cost values;

conddc.m - Computes the derivative of the search cost values with respect to the parameters.

Price data used for the estimation:

pricedata.txt - Prices of Kingston KTT3614 memory chip.

[Home]

Last
updated: August 15, 2019