Really appreciate your function, was doing this manually for a while!
I apologise in advance if this is an ignorant question, as I'm a very basic MatLab user.
Would it be possible to amend your script to take into account for situations in which you know some data is missing? The particular type I'm interested in is when I know that my data actually only represents e.g. the first 70% on the CDF.
I hope this question makes sense. I'm not even sure of the right terminology to use!
Great Job.
I've changed it a bit to suit my needs, and going to add a GUI to allow the user to fit just a specific distribution, or select some of them. ALL of them would be a default.
Thanks!
Hi Roni,
The "Best Fit" can be found by the output by either D(1) or PD{1}, depending on if you want a structure or ProbDist class object. You can use the class object directly in other statistical functions, such as:
p=cdf(PD{1},xvalue)
The reason for including all valid distributions is that depending on preferences of model selection or assumptions from the data the distribution that you may prefer to use may be the 2nd or even 3rd "best" from the output, or not given at all. This is especially true if the SORTBY values are close in value, or if a parameter in a given distribution is close to a simpler special case.
Example 3 is an example of the latter; should you use as a model the Negative Binomial Distribution with r=.98 or assume it is actually the more simpler Geometric Distribution with r=1 which is not given as an output?
The error graph is displayed when 'CDF' is given as an input. You can change the number of distributions to include in the plot by adjusting the max_num_dist variable in the plotfigs subfunction.
Hope that helps,
-MIke
Comment only