Rank: 137 based on 522 downloads (last 30 days) and 15 files submitted
photo

Mike Sheppard

E-mail

Personal Profile:
Professional Interests:

 

Watch this Author's files

 

Files Posted by Mike View all
Updated   File Tags Downloads
(last 30 days)
Comments Rating
20 Aug 2013 Random arrays from the left truncated normal distribution. Random arrays from the left truncated normal distribution. Author: Mike Sheppard simulation, statistics, finance 23 0
04 Apr 2012 Screenshot Fit all valid parametric probability distributions to data ALLFITDIST Fit all valid parametric probability distributions to data. Author: Mike Sheppard simulation, statistics, finance, mathematics, potw, pick of the week 225 20
  • 4.92308
4.9 | 14 ratings
04 Apr 2012 Screenshot Multivariate normal random vectors with fixed mean and covariance matrix Random vectors from the multivariate normal distribution with fixed mean and covariance matrix. Author: Mike Sheppard statistics, finance 19 0
04 Apr 2012 Screenshot Political Apportionment Allocates seats according to METHOD until NUM seats have been allocated Author: Mike Sheppard mathematics, optimization, statistics, data exploration 12 2
  • 5.0
5.0 | 1 rating
04 Apr 2012 Screenshot Apply a function to a set of probability distributions Returns the distribution of the function FUN applied to the set of distributions given in VARARGIN Author: Mike Sheppard mathematics, measurement, statistics, simulation 16 0
Comments and Ratings by Mike View all
Updated File Comments Rating
13 Mar 2012 Fit all valid parametric probability distributions to data ALLFITDIST Fit all valid parametric probability distributions to data. Author: Mike Sheppard

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

15 Feb 2012 Fit all valid parametric probability distributions to data ALLFITDIST Fit all valid parametric probability distributions to data. Author: Mike Sheppard

Warwick, thanks for your note. I am updating the file a bit, and the functionality of custom distributions seems interesting.

If you like, you can e-mail me directly with your improved functionality and I can include it in the next update with acknowledgment.

14 Feb 2012 Fit all valid parametric probability distributions to data ALLFITDIST Fit all valid parametric probability distributions to data. Author: Mike Sheppard

Warwick, for a "potentially a very useful script" I'm sorry you felt it was only worth a rating of one. Do you have suggestions on how it can be improved? Constructive criticism or ways to improve the program/functionality are always welcome, but I did not see any in your comment, other than asking for specific help after giving it a poor rating.

Please re-read the help section; specifically Example 2.

10 Feb 2012 Generation of Random Variates generates random variates from over 870 univariate distributions Author: James Huntley

08 Dec 2011 All Sums Distribution of unique sums among all combinations of vectors. Author: Mike Sheppard

For unequal probabilities see "Sum of probability distributions" #34082

Comments and Ratings on Mike's Files View all
Updated File Comment by Comments Rating
02 Jul 2014 Fit all valid parametric probability distributions to data ALLFITDIST Fit all valid parametric probability distributions to data. Author: Mike Sheppard Nebitno

26 May 2014 Political Apportionment Allocates seats according to METHOD until NUM seats have been allocated Author: Mike Sheppard Jorge

I don't know if I'm doing this correctly, but I'm unable to reproduce the Wikipedia example for the D'Hondt method (http://en.wikipedia.org/wiki/D%27Hondt_method#Example)

I try the following:
apport([100 80 30 20],8,'DH',0)

and the result is 5 3 0 0, while the example states that it should be 4 3 1 0. Incidentally if I select 'All', four of the methods show this 4 3 1 0 result, but D'Hondt is not among them. Am I doing something wrong or is there something that I'm missing here? =(

28 Jan 2014 Fit all valid parametric probability distributions to data ALLFITDIST Fit all valid parametric probability distributions to data. Author: Mike Sheppard sonaki, sonakis23

Hi, I was wondering how could I plot both PDF, CDF and the error graph any ideas?

26 Nov 2013 Fit all valid parametric probability distributions to data ALLFITDIST Fit all valid parametric probability distributions to data. Author: Mike Sheppard debora

@Hernando

I've the same problem. You need to change all ~ (line 245 and others) by another letter.

25 Nov 2013 Fit all valid parametric probability distributions to data ALLFITDIST Fit all valid parametric probability distributions to data. Author: Mike Sheppard Hernando

Well i`m using r2009a. and using the file i've got this error:
??? Error: File: allfitdist.m Line: 245 Column: 11
Expression or statement is incorrect--possibly unbalanced (, {, or [.

[D PD] = allfitdist(data,'CCDF');
??? Error: File: allfitdist.m Line: 245 Column: 11
Expression or statement is incorrect--possibly unbalanced (, {, or [.
data = normrnd(5,3,1e4,1);
>> [D PD] = allfitdist(data,'CCDF');
??? Undefined function or method 'allfitdist' for input arguments of type 'double'.
Is there any restriction for the file?

Contact us