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
Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!
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.
Ready to level-up your skills? Choose your own adventure.