Hi
I find an inconsistency of results with two datasets. With the first dataset, the manually calculated answer is consistent with SAS output. But with the second dataset, it is not the case. Please see the attached Excel sheet. Please let me know where the error is.
Thank you
S_pera
Your formula is incorrect. The KS statistic does not use the AbsDiff column.
Instead you need three columns:
1. LowSn = (cumFreq-1)/5
2. DPlus = F(X) - LowSn
3. DMinus = Sn - F(X)
Then KS = max(DPlus, DMinus)
For more information, see What is Kolmogorov's D Statistic and especially the section "Compute the statistic manually".
Hi Reeza
No there were no ties. I am attaching the Excel file again. Please try.
rgds
S_pera
Your formula is incorrect. The KS statistic does not use the AbsDiff column.
Instead you need three columns:
1. LowSn = (cumFreq-1)/5
2. DPlus = F(X) - LowSn
3. DMinus = Sn - F(X)
Then KS = max(DPlus, DMinus)
For more information, see What is Kolmogorov's D Statistic and especially the section "Compute the statistic manually".
Dear Rick_SAS
Sorted. Thank you very much.
S_pera
Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.
Register today!Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.
Find more tutorials on the SAS Users YouTube channel.
Select SAS Training centers are offering in-person courses. View upcoming courses for: