BookmarkSubscribeRSS Feed
SASguyCO
Calcite | Level 5

I'm not sure this is the correct forum so please someone point me in the right direction if it's not.

I have one population that is distributed a certain way by length of tenure and I'd like to sample from another population such that I end up with the same distribution. 

For example I have pop A summarized as follows:

                 %    

tenure 1    10

tenure 2    30

tenure 3    25

tenure 4    35

and I'd like to randomly sample from pop B (say, 1,000,000 records) so that the 4 tenure buckets distribute just like pop A above so I'd have:

Pop B       N

tenure 1   100,000

tenure 2   300,000

tenure 3   250,000

tenure 4   350,000

I imagine there has to be some sort of statistical/sampling PROC to achieve this? If not, perhaps some basic code?

thanks a ton for any assistance!

2 REPLIES 2
Reeza
Super User

proc surveyselect with SAMPRATE option.

SASguyCO
Calcite | Level 5

Thank you Reeza, can you please provide sample syntax of how this would be accomplished with PROC SURVEYSELECT?  I've looked at the documentation and it seems pretty complex. 

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!

What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 2 replies
  • 1394 views
  • 0 likes
  • 2 in conversation