Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

kstest for lognorm and weibull

52 views
Skip to first unread message

Jeong Yeol

unread,
Oct 5, 2010, 1:11:04 AM10/5/10
to
I have a txt. (1 by 79 matrix)

so i wanna perform kstest for normal and lognormal , weibull.

When i perform normal kstest, it is working well.

but lognormal and weibull kstest is not working.

ex)
- lognormal kstest
log_para=lognfit(txt)
[h,p,k]=kstest(A2,[A2 logncdf(A2,log_para(1),log_para(2))])

- weibull kstest
wbl_para=wblfit(txt)
[h,p,k]=kstest(A2,[A2 wblcdf(A2,wbl_para(1),wbl_para(2))])

click enter key.

the error massage is as below..
"Hypothesized CDF matrix must have 2 columns."

What is the problem..???

Peter Perkins

unread,
Oct 5, 2010, 9:46:18 AM10/5/10
to

It's pretty hard to say with the amount of information you've provided.
What shape is A2, which is to say, what shape are [A2 logncdf(...)]
and [A2 wblcdf(...)]?

One thing that you are (probably) doing wrong is ignoring this warning
in the KSTEST reference page:

"The Kolmogorov-Smirnov test requires that CDF be predetermined. It is
not accurate if CDF is estimated from the data. To test x against a
normal distribution without specifying the parameters, use LILLIETEST
instead."

0 new messages