QMLE.zip

Return the parameter of a specified distribution estimated using the QUANTILES
386 Downloads
Updated 22 Apr 2014

View License

QMLE, quantile maximum likelihood estimation, as explained in
QMLE: fast, robust, and efficient estimation of distribution functions based on quantiles.
-Brown and Heathcote, 2003
QMLE: estimating Lognormal, Wald, and Weibull RT distributions with a parameter-dependent lower bound.
-Heathcote, Brown, Cousineau, 2004
see also:
A comment on Heathcote, Brown, and Mewhort's QMLE method for response time distributions.
-Speckman, Rouder, 2004

[par,logL, exF]=QMLE(data, distr)
par= return the parameter of the distribution distr estimated using the
QUANTILES in data. DATA already contains QUANTILE. Use the function
"quantile" in matlab or "lequantile" provided with this code.
Heathcote et al. propose to use as first and last quantile the extreme
of the assumed distribution (for example, 0 and +inf for exp. distr).

logL= return the minimum found log-likelihood

exF= exit flag. 1=everything went fine. 2=fminsearch did not converge

[...]=QMLE(data, distr, 'startPoint',[0 10], 'plotF',1,'N',10)
StartPoint= specift the initial "good guess" for the search. If provided
it as to be consistent with the number of parameter of the assumed distribution.
If not specified, some classic Reaction Time's good guess will be used.

plotF= plot the parameter estimation while it's been calculated

N=number of elements in each quantile. If it's all the same, do not
specify.

NOTICE that any custom distribution function can be used, as far as you
have a function that describe his pdf. Notice that this function has to
end with pdf. (SEE EXAMPLE 2)

**EXAMPLE 1

a=normrnd(10,25,10000,1);
%we will have a different amount of data in the quantile (like in this example, and we will
also specify the extremes of the assumed distribution
[q,~,~,N]=lequantile(a, 'qq',[0.0:0.05:0.8 1], 'eQuant',[-inf inf])
[par]=QMLE(q,'norm', 'startPoint',[1 1 ],'plotF',1,'N',N);

**EXAMPLE 2

a=exprnd(5, 1000,1);
%this time we will use the equally distributed quantile, so we don't
have to specify N
[q]=lequantile(a, 'qq', [0:0.2:1], 'eQuant',[0 Inf]);
[par]=QMLE(q,'exp', 'startPoint',[200],'plotF',1);

Created by Valerio Biscione, 11 04 2014

Cite As

Valerio Biscione (2024). QMLE.zip (https://www.mathworks.com/matlabcentral/fileexchange/46330-qmle-zip), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2014a
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Published Release Notes
1.0.0.0