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

 

 

Ready to join fellow brilliant minds for the SAS Hackathon?

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

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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