BookmarkSubscribeRSS Feed
kokodenden52
Obsidian | Level 7

Oversampling is introduced below as a method of building a model when the number of targets is extremely small.

 

The method by Enterprise Miner is introduced below,

Could it be done by writing program?

 

https://www.sas.com/offices/asiapacific/japan/service/technical/faq/list/body/em003.html

 

 

Sorry to trouble you, but please tell me.

3 REPLIES 3
Ksharp
Super User
data have;
 set sashelp.heart;
run;
proc sort data=have;by status;run;
/*Check population ratio of Dead and Alive*/
proc freq data=have;
table status/missing;
run;

/*If you want oversample 1:1 for Dead and Alive*/
proc surveyselect data=have out=want sampsize=(1000 1000);
strata status;
run;

/*Check the oversample rate*/
proc freq data=want;
table status/missing;
run;
kokodenden52
Obsidian | Level 7

Mr.Ksharp

 

Thank you for your answer.

 

You showed the program in detail.

It helps me  very useful.

 

Once again, thanks a lot.

PGStats
Opal | Level 21

If you want oversampling, i.e. to sample more units than there are in the dataset, you will need to add option

 

method=urs

 

to the proc surveyselect statement of @Ksharp code above. URS means unrestricted random sampling, i.e. sampling with replacement. By default, proc surveyselect does SRS: simple random sampling which is sampling without replacement.

PG

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 16. Read more here about why you should contribute and what is in it for you!

Submit your idea!

How to Concatenate Values

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 3 replies
  • 1467 views
  • 2 likes
  • 3 in conversation