DATA Step, Macro, Functions and more

re: Data Selection

Accepted Solution Solved
Reply
Regular Contributor
Posts: 222
Accepted Solution

re: Data Selection

Hi.....I am trying to select a random sample of the Sales Amounts for each Month in the dataset. The thing is that the number for each sample for each month will not be the same. For example, For 201301, then sample size may be 23, for 2011302 may be 35, etc. However, the monthly sample size will be predetermined and known. Is it possible to generate random numbers for each  month separately and then select the required number of Sales Amounts for each month. Thanks.


Accepted Solutions
Solution
‎01-26-2016 03:10 PM
Respected Advisor
Posts: 4,646

Re: re: Data Selection

Use proc surveyselect with months as your strata and specify ALLOC=SAS_dataset to give the allocation for each stratum (month).

PG

View solution in original post


All Replies
Solution
‎01-26-2016 03:10 PM
Respected Advisor
Posts: 4,646

Re: re: Data Selection

Use proc surveyselect with months as your strata and specify ALLOC=SAS_dataset to give the allocation for each stratum (month).

PG
☑ This topic is SOLVED.

Need further help from the community? Please ask a new question.

Discussion stats
  • 1 reply
  • 173 views
  • 0 likes
  • 2 in conversation