Zero-Inflated and Hurdle Models in Matlab (statistical distribution fitting)
5 views (last 30 days)
Show older comments
Héctor de Santos
on 20 Jan 2019
Commented: Jeff Miller
on 29 Apr 2019
Hello,
I have a very zero-inflated dataset and I am trying to find it in an statistical distribution. I tried several distributions in Matlab (distribution Fitter App) and no one works.
Now I want to to use a zero-inflated or hurdle model, however I do not find any reference nor example in matlab. How could I fit my data to a hurdle distribution in matlab?, in google the only reference I found was PSCL package for R software, but I would like to continue my work in Matlab.Is there something similar?
Thank you .
0 Comments
Accepted Answer
Jeff Miller
on 20 Jan 2019
You might be able to fit the distributions you have in mind using Cupid. For example, the following commands would define and plot zero-inflated Poisson and Binomial distributions (at least as I understand the terminology):
zipois = Mixture(.2,ConstantD(0),Poisson(4))
zipois.PlotDens
zibin = Mixture(.2,ConstantD(0),Binomial(4,.8))
zibin.PlotDens
Distribution parameters and mixture probabilities can be tweaked by hand or estimated directly from data (e.g., maximum likelihood). For example,
fakedata = zibin.Random(2000,1);
figure; histogram(fakedata);
zibin.EstML(fakedata,'rffr') % rffr means: Adjust the real-valued mixture probability,
% hold fixed the constant value and the binomial N
% adjust the real-valued binomial probability
zibin.PlotDens;
2 Comments
Muhammad Yasirroni
on 29 Apr 2019
It seems that I can't open http://https//github.com/milleratotago/Cupid
Jeff Miller
on 29 Apr 2019
I am not sure what is going on with the link in the answer above. This is the correct link:
More Answers (0)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!