Programming the statistical procedures from SAS

Random sampling - new programmer

Reply
New Contributor
Posts: 2

Random sampling - new programmer

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

Regular Contributor
Posts: 151

Re: Random sampling - new programmer

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.

Ask a Question
Discussion stats
  • 1 reply
  • 164 views
  • 0 likes
  • 2 in conversation