How to select the observations randomly from a SAS dataset
Answer Posted / learner
By using ranuni function. for example you want select 30
percent of data randamly from a data set.
data x;
set y;
if ranuni(100)<.3 ;
run;
here 100 is the seed. the number generated depends on this
seed .
Is This Answer Correct ? | 11 Yes | 1 No |
Post New Answer View All Answers
Name few SAS functions?
Do you need to rearrange the order of the data for the report?
How do you use the do loop if you don’t know how many times you should execute the do loop?
What is a pdv and what are its functions?
What are the difference between the sas data step and sas procs?
For a user to have access to a standard workspace server, is internal authentication alone is sufficient? : sas-grid-administration
What is the difference between order and group variable in proc report?
hi here is a problem can anybody solve this? i want to report the data through third party file. by using data _null_ or proc report or macro automation process. but i want to insert the 'titles and footnotes' in between the data and also starting of 2nd and ending of 2nd and starting of 3rd and ending of the 3rd page. tell me how and write the code?
what is the one statement to set the criteria of data that can be coded in any step? : Sas programming
What are pdv and it functions?
Explain append procedure?
What is the function of output statement in a SAS Program?
What is the maximum length of the macro variable? : sas-macro
What is the SAS data set?
Explain the main difference between the sas procedures and functions? : Sas-administrator