BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
S_pera
Calcite | Level 5

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

1 ACCEPTED SOLUTION

Accepted Solutions
Rick_SAS
SAS Super FREQ

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".

View solution in original post

4 REPLIES 4
Reeza
Super User
Excel file isn't displaying for some reason. You also need to provide the SAS code you used. My first guess is ties - does your data have tied values in it?
S_pera
Calcite | Level 5

Hi Reeza

 

No there were no ties. I am attaching the Excel file again. Please try.

 

rgds

 

S_pera

Rick_SAS
SAS Super FREQ

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".

S_pera
Calcite | Level 5

Dear Rick_SAS

 

Sorted. Thank you very much.

 

S_pera

 

 

SAS Innovate 2025: Register Now

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!

What is Bayesian Analysis?

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 4 replies
  • 1103 views
  • 3 likes
  • 3 in conversation