How to run KS test with Dagum distribution

15 ビュー (過去 30 日間)
Lolipop
Lolipop 2016 年 1 月 19 日
コメント済み: Image Analyst 2016 年 1 月 19 日
I have generated x numbers with Dagum distribution using inverse cdf method and now I want to run ks test but I constantly get this error:
Error using kstest (line 142)
CDF must define an increasing function of X.
This is my code:
N=20000;
a=5;
p=1;
b=1;
u=rand(1,N);
x=b*(u.^(-1/p)-1).^(-1/a);
cdf=(1+(x/b).^(-a)).^(-p);
X=0:length(x)-1;
h=kstest(x,[X' cdf']);
How should I run ks test with Dagum distribution'
Thank you!

回答 (1 件)

Image Analyst
Image Analyst 2016 年 1 月 19 日
I think your x is wrong. How did you come up with that x????
  2 件のコメント
Lolipop
Lolipop 2016 年 1 月 19 日
by inverse cdf method....it could be that my cdf is wrong but how should I generate x then?
Image Analyst
Image Analyst 2016 年 1 月 19 日
I'd try using
x = linspace(minX, maxX, numberOfElements);
But I don't know that distribution so I don't know what values the equation should typically use.

サインインしてコメントする。

タグ

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by