BookmarkSubscribeRSS Feed
Amoryn
Calcite | Level 5

hi

I am new to sas but need to do the following:

my data (this is just dummy data, the full set contains 25 million obs)

phone numberHV CustomerRegionAgePort in pmt methodspend bucket
0832122256High ValueGauteng25yesPrepaidR120 to R155
0833132424Low ValueGauteng26yespostpaidR0 to R50
0834532675Very high ValueKZN12yespostpaidR180 to R230
0854217863Mid ValueLimpopo20noprepaidR260 to R300

Create a random sample which consists of the following:

  1. 100 people should reflect a prepaid pmt method
  2. 25 people should be high or very high value customers (should be split between prepaid and postpaid pmt method)
  3. the region should comprise of 40% gauteng and the rest shoul be equally divided
  4. the age should be 26 and older
  5. 30 of the people should have ported in (yes)
  6. spend should be above R120

any idea as to how to go about tackling this problem

1 REPLY 1
Keith
Obsidian | Level 7

That's very specific criteria, so you may have to use more than one method.  I would suggest reading up on PROC SURVEYSELECT which is used for extracting samples.  You can create a dataset that contains the relevant variable names and how many of each should be returned. this is then referenced in the SAMPSIZE= option in PROC SURVEYSELECT.  There are many other options you can specify to control the output.

Hope this points you in the right direction.

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

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
  • 1 reply
  • 1194 views
  • 0 likes
  • 2 in conversation