BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
Toni2
Lapis Lazuli | Level 10

i try to produce KS statistic using npar1way  

 

proc npar1way edf data=final_pop_ks_1 ;
class source;
var FEES;
exact ks;
output out=stat ks;
run;

However, SAS does not stop running (even with a small number of obs). I raised this in another post and i was advised to remove the option EXACT. 

 

This resolved the issue however, now the output does not include the p-value for the D statistic of KS

 

This is the npar1way without the option EXACT

Output without EXACT optionOutput without EXACT option

 

In addition in the PROC NPAR1WAY user guide i found that EXACT is not produced for KS npar1way  - see below. 

 

PROC NPAR1WAY provides exact p-values for tests for location and scale differences based on the following

scores: Wilcoxon, median, van der Waerden (normal), Savage, Siegel-Tukey, Ansari-Bradley, Klotz, Mood,
and Conover. Additionally, PROC NPAR1WAY provides exact p-values for tests that use the raw data as
scores. Exact tests are available for two-sample and multisample data. When the data are classified into two
samples, tests are based on simple linear rank statistics. When the data are classified into more than two
samples, tests are based on one-way ANOVA statistics.

 

My question is : i there any way we can produce p-values for the KS - D statistic or workaround ?

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Rick_SAS
SAS Super FREQ

Add the D option to the PROC NPAR1WAY statement:

proc npar1way edf D data=final_pop_ks_1 ;

 

 

By the way, exact tests are for small data sets. Looks like you have 3000 observations, which is why the procedure never seems to finish processing the exact test. Add the MC option to the exact statement to get an approximate p-value for the exact test::

exact ks / MC;

 

 

View solution in original post

2 REPLIES 2
Rick_SAS
SAS Super FREQ

Add the D option to the PROC NPAR1WAY statement:

proc npar1way edf D data=final_pop_ks_1 ;

 

 

By the way, exact tests are for small data sets. Looks like you have 3000 observations, which is why the procedure never seems to finish processing the exact test. Add the MC option to the exact statement to get an approximate p-value for the exact test::

exact ks / MC;

 

 

Toni2
Lapis Lazuli | Level 10
thanks 🙂

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!
How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

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
  • 2 replies
  • 462 views
  • 2 likes
  • 2 in conversation