BookmarkSubscribeRSS Feed
tlnarayana26
Calcite | Level 5

Hi to all,

Sas code 

 

/*STRATA METHOD */
PROC SORT DATA=PROD_DATA OUT=PROD_DATA_SORT;
BY PROD_FLAG;
RUN;

PROC SURVEYSELECT DATA=PROD_DATA_SORT OUT=STRATA_SPLIT SAMPRATE=.7 SEED=34258 OUTALL;
STRATA PROD_FLAG;
RUN;

DATA TRAINING VALIDATION;
SET STRATA_SPLIT;
IF SELECTED = 1 THEN OUTPUT TRAINING;
ELSE OUTPUT VALIDATION;
RUN;

 

I have one data set it contains 100 observations. Spiting data into 70%  and 30% using PROC SURVEYSELECT method with  Strata statement.

 Then data is split into 70 and 30 .

But i have two problems

 

1.Run same code into another system/ laptop. the data split is 70 and 30.

  But In both of 70 agents are differed.

  How to get same agents on all laptops?

 

2.Adding some variables to data set and spit is 70 and 30

  But In both of 70 agents are differed.

  How to get same agents on all laptops?

  

please give your valuable suggestions

 

 

Thanks,

Lakshminrayana.

2 REPLIES 2
ballardw
Super User

If exact same data is needed on multiple machines the best approach is likely to generate one data set and copy to other computers. Possibly that data set should only contain 'agents' what ever those may be.

 

Are you specifying the exact same SEED= value on the other machines? SEED may not work on different machines for a number of reasons. ANY difference in the input data set will change the output. Sorting by one variable is not going to guarantee that the order of the data is exactly the same if  there are any other variables in the data.

 

I do not understand how your topic 2 differs from topic 1.

 

 

tlnarayana26
Calcite | Level 5
Thanks,
ballardw

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!
Mastering the WHERE Clause in PROC SQL

SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 2 replies
  • 618 views
  • 0 likes
  • 2 in conversation