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
What is the difference between proportion and average?
Mention how to limit decimal places for the variable using proc means?
Are you sensitive to code walk-throughs peer review or QC review?
Do you need to rearrange the order of the data for the report?
How would you identify a macro variable?
Are you involved in writing the inferential analysis plan? Tables specfications?
how to read the variables in sas? : Sas-administrator
How would you invoke a macro? : sas-macro
what can you learn from the sas log when debugging? : Sas programming
How do you convert basic cube to transaction cube and transaction cube to basic cube?
What are the best sas programming practices for handling very large datasets? : sas-grid-administration
how does sas handle missing values in procs? : Sas programming
what are some good sas programming practices for processing very large data sets? : Sas programming
what is sas database server? : Sas-di
what is the use of proc sql? : Sas programming