Rank: 199 based on 512 downloads (last 30 days) and 15 files submitted
photo

Mike Sheppard

E-mail

Personal Profile:

 

Watch this Author's files

 

Files Posted by Mike Sheppard 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 16 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 267 21
  • 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 17 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 15 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 10 0
Comments and Ratings by Mike Sheppard 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 Sheppard's Files View all
Updated File Comment by Comments Rating
10 Sep 2014 Repeated Values Finds all repeated values for input X, and their attributes. Author: Mike Sheppard Xindi Li

really helpful, thanks!

22 Aug 2014 Fit all valid parametric probability distributions to data ALLFITDIST Fit all valid parametric probability distributions to data. Author: Mike Sheppard Alireza

The allfitdist function for normally distributed data return 'rayleigh' as best fit distribution! So weird as it is an example included in file.

commands: data = normrnd(5,3,1e4,1); [D PD] = allfitdist(data,'PDF'); D(1)

output: ans =

DistName: 'rayleigh'
NLogL: 2.4515e+04 - 1.5959e+03i
BIC: 4.9038e+04 - 3.1919e+03i
AIC: 4.9031e+04 - 3.1919e+03i
AICc: 4.9031e+04 - 3.1919e+03i
ParamNames: {'B'}
ParamDescription: {'scale'}
Params: 4.1166
Paramci: [2x1 double]
ParamCov: 4.2366e-04
Support: [1x1 struct]

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 sonakis23 sonaki

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

Contact us