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
how many types of prompts are there? : Sas-bi
What is a method to debug and test your SAS program?
How sas treats the dsd delimiters?
explain the concepts and capabilities of business object? : Sas-bi
How to test the debugging in sas?
What are the data types in sas?
How do you debug and test your SAS programs?
Difference between nodup and nodupkey options?
how does sas handle missing values in sort order? : Sas programming
Explain the use of proc print and proc contents?
Do you need to compute new variables? If so,should you do this before you execute the report-writing procedure?
what is the difference between calculating the 'mean' using the mean function and proc means? : Sas programming
Explain bmdp procedure?
How will you generate test data with no input data?
Briefly explain input and put function?