Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


How to select the observations randomly from a SAS dataset

Answers were Sorted based on User's Feedback



How to select the observations randomly from a SAS dataset..

Answer / srinath

Proc surveyselect;
this gives the random selection of observations.

Is This Answer Correct ?    23 Yes 1 No

How to select the observations randomly from a SAS dataset..

Answer / 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

How to select the observations randomly from a SAS dataset..

Answer / srikanth

you can use the RANUNI function to select observations
randomly.

Ex:-

data test;
input number @@;
cards;
2.1 3.1 4 6 2.2 4.9 4 5 3 3.3 4 5 3 4.3 5 7 3 3 9 11
;

data test1;
set test;
random=ranuni(1);
run;

%let k=10;

PROC SORT DATA=TEST1;
BY random;/*SORT OBSERVATIONS*/
run;

DATA TEST2;
SET TEST2 (DROP=RANDOM);
IF _N_ LE &K;
RUN;

PROC PRINT ;
RUN;

Is This Answer Correct ?    8 Yes 6 No

How to select the observations randomly from a SAS dataset..

Answer / neel

By using the point function

Is This Answer Correct ?    1 Yes 1 No

How to select the observations randomly from a SAS dataset..

Answer / chowdary vamsi

using rununni function generate random sample observations

Is This Answer Correct ?    0 Yes 0 No

How to select the observations randomly from a SAS dataset..

Answer / name is no need

I think by using mod operator we can select the random
observations.
syntax:mod(_n_,number);

Is This Answer Correct ?    5 Yes 6 No

How to select the observations randomly from a SAS dataset..

Answer / ram

by using proc sort.

Is This Answer Correct ?    2 Yes 18 No

Post New Answer

More SAS Interview Questions

What is the differnce between SDTM 3.1.2 to 3.1.1 version

0 Answers   Wipro,


how many types prompting framework can be broken down to? : Sas-bi

0 Answers  


what is PhaseIII, ODS, TLG, Macro and Proc in SAS

0 Answers  


What are the features of SAS?

0 Answers  


Are the preferred term counts are always equal to Body system counts? If so, Why are they equal if not why they are not equal?

1 Answers   Icon,


what is the effect of the options statement errors=1? : Sas programming

0 Answers  


What is the basic structure of a sas program?

0 Answers  


i want for interview question & answer plz it need immediate send t my mail raviprakashmot@gmal.cm

0 Answers   SAS,


Which is the best place to learn SAS clinicals and Oracle clinical in hyderabad?

2 Answers  


How we will Developing new reports Using Data step programming and Macros ?

4 Answers  


How do you add a number to a macro variable?

2 Answers  


What is the difference between match merge and one to one merge?

0 Answers  


Categories