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.
Do you need 300 samples or 1 sample of 300 observations?
Show us some sample of your data, makes it much easier to help you.
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
Available on demand!
Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.
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.