turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

Find a Community

- Home
- /
- Analytics
- /
- Stat Procs
- /
- Calculation of Kolmogorov-Smirnov p-value in NPAR1...

Topic Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

09-26-2014 10:42 AM

What exact algorithm is used to calculate the asymptotic K-S p-value given the d-statistic and n (or n1 and n2 for two-sided tests) in NPAR1WAY? The documentation I found shows the theoretical equations, which involve an infinite sum, but my understanding is that in practice approximations are always used (at minimum the infinite sum must be truncated).

Also, is the function that does the calculation available to be called in by users in a data step (as is the case in R and other stat packages)?

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Posted in reply to ewolin

09-26-2014 01:05 PM

Did you come across some incorrect p-values with proc NPAR1WAY?

PG

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Posted in reply to PGStats

09-26-2014 01:17 PM

Within the scope of what NPAR1WAY addresses, no problems, but NPAR1WAY does NOT work on weighted data.

I had to fool it by using FREQ as the weight and recalculating the p-value from _d_, n1 and n2 using a function I wrote myself. To my surprise, for unweighted data my calculation and the one by NPAR1WAY agree to 8 significant digits! I suspect I implemented the very same algorithm for the calculation that NPAR1WAY uses, which is why I'm wondering...