BookmarkSubscribeRSS Feed
Noleen
Calcite | Level 5

Hello

I need to calculate KS between two groups of variables. Each group has 5 variables.

I use the following code,

   proc npar1way edf plots=all data=have;

      class BLdist1-BLdist5;

      var dist1-dist5;

   run;

LOG shows: ERROR: One and only one CLASS variable must be specified.

How can I fix the code? And can I store the result of KS as a new valuable in my dataset?

Thanks!

1 REPLY 1
data_null__
Jade | Level 19

You need to restructure your data so that BL(baseline?) is a category of a single CLASS variable (TIME?) that will have two levels, BASELINE and POST (perhaps).

the values of BLdist1-BLdist5 will be assigned to dist1-dist5 when the class variable is equal to BASELINE.

data need;

  set have;

  TIME='POST    ';

  output;

  TIME='BASELINE';

  dist1=bldist1; dist2=bldist2; ...

  output;

  run;

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

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
  • 1 reply
  • 863 views
  • 0 likes
  • 2 in conversation