BookmarkSubscribeRSS Feed
india2016
Pyrite | Level 9

Hello all,

I have a dataset wherein I have 1 lakh records based on data I need 300 samples of each based on one variable for example :

I have dataset which has data for India,Singapore,Malaysia

So I need 100 for India 100 for Singapore and 100 for Malaysia in one dataset . I cannot use where condition because I have more than 300 conditions for which I need 100 data in one dataset.

Any suggestion would really appreciate.

3 REPLIES 3
PeterClemmensen
Tourmaline | Level 20

Do you need 300 samples or 1 sample of 300 observations?

PeterClemmensen
Tourmaline | Level 20

Show us some sample of your data, makes it much easier to help you.

Norman21
Lapis Lazuli | Level 10

It sounds like you want simple random sampling by strata. The following SESUG paper describes this well (example 2 on page 7):

 

https://www.lexjansen.com/sesug/2015/190_Final_PDF.pdf

 

Norman.
SAS 9.4 (TS1M6) X64_10PRO WIN 10.0.17763 Workstation

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 3 replies
  • 725 views
  • 1 like
  • 3 in conversation