View License

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video

Highlights from

Be the first to rate this file! 22 Downloads (last 30 days) File Size: 3.95 KB File ID: #40167 Version: 1.3
image thumbnail




04 Feb 2013 (Updated )

FITMETHIS finds best-fitting distribution to data vector

| Watch this File

File Information

F= fitmethis(X) finds the distibution that best fits data in vector X among all distributions available in MATLAB's function MLE. Either continuous or discrete distributions are used based on user input or the type of data supplied (see below) The function returns a structure array with fields:
name: name of the distribution (see HELP MLE for a list)
par: vector of parameter estimates (1, 2 or 3 values)

ci: matrix of confidence limits, one column per parameter

LL: Log-Likelihood of the data

aic: Akaike Information Criterion

Optional arguments can be specified as name/value pairs (see help).

Required Products Statistics and Machine Learning Toolbox
MATLAB release MATLAB 8.0 (R2012b)
MATLAB Search Path
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (5)
25 Aug 2016 Radek Silhavy

This nice code, How to resolve the which distribution was the best?

Comment only
24 May 2016 moatez hassan

I am interesting to use lines of code in my work

Comment only
15 Feb 2016 Isabella Osetinsky-Tzidaki

Hoped to use, however, after just a first trial, encountered some confusions starting from: the MATLAB GEV version is for maxima, the MATLAB EV version is for minima, so to match between them, your must mirror either GEV or EV. You may compare the location parameter you get for GEV as is with the location parameter you get for EV as is. They are a great deal different. A simple solution for this case is mirroring EV by negating the input, i.e. by using "-x" instead of "x" and then mirroring the EV location parameter by negating it. In this way, you will come much closer to the GEV location parameter.

Comment only

Nice piece of work.I am so thankful to you as this code has solved much of my research work.The problem is, I also wanna find out the mean and SD of that distribution.So how could I do that?

Comment only
05 Feb 2013 Francisco de Castro

I didn't realize there was already a function to do this (more comprehensive, probably): ALLFITDIS by Mike Sheppard.

Comment only
29 Oct 2013 1.1

Modify helper function plotfitdist.m

11 Nov 2014 1.2

Better handling of preferred distribution

11 Nov 2014 1.3

Better handling of preferred distribution in FITMETHIS. Better plot of discrete distributions in PLOTFITDIST

Contact us