Hi,
i try to use the oversampling technique with PROC SURVEYSELECT.
I have a sample of 8500 obersvations with 1% of 0 and 99% of 1.
I achieved undersampling by droppings 1 but now i want to inflate the percentage of 0 with oversampling.
So i tried with PROC SURVEYSELECT to have a random sample of, for example, 12.5% of 0 and 87.5% of 1 with the URS method but he can't do a random sample greater with a number of 0 greater than in the original sample.
For example, i got like 99 times 1 and 1 time 0. What i want is to have like still 99 times 1 but 10 times 1 in my new sample, is it impossible with PROC SURVEYSELECT ?
Thanks you by advance.
data have;
set sashelp.class ;
run;
proc sort data=have;by sex;run;
proc surveyselect data=have out=want method=urs sampsize=(100 100) outhits;
strata sex;
run;
Can you use TWO proc surveyselect to sample for these two level 0,1
and after that combine them together by
data want;
set a b;
run;
or try this one.
data have;
set sashelp.class ;
size=1;
run;
proc sort data=have;by sex;run;
proc surveyselect data=have out=want method=pps_wr sampsize=(100 100) outhits;
strata sex;
size size;
run;
data have;
set sashelp.class ;
run;
proc sort data=have;by sex;run;
proc surveyselect data=have out=want method=urs sampsize=(100 100) outhits;
strata sex;
run;
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 25. Read more here about why you should contribute and what is in it for you!
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.