ID Good_Bad
734374 0
4834110 1
I want to extrapolate the 1's 12 times as 0s so that for every 0 I have 12 1s like this:
ID Good_Bad
734374 0
4834110 1
4834110 1
4834110 1
4834110 1
4834110 1
4834110 1
4834110 1
4834110 1
4834110 1
4834110 1
4834110 1
4834110 1
& this has to be done using SAS. Can anyone help out?
Thanks in advance!!
Try this code:
data test;
input ID Good_Bad ;
infile datalines;
datalines;
734374 0
4834110 1
;
run;
data final(drop=i);
set test;
by Good_Bad;
if Good_bad=0 then output;
if Good_Bad=1 then
do i= 1 to 12;
output;
end;
Run;
Try this code:
data test;
input ID Good_Bad ;
infile datalines;
datalines;
734374 0
4834110 1
;
run;
data final(drop=i);
set test;
by Good_Bad;
if Good_bad=0 then output;
if Good_Bad=1 then
do i= 1 to 12;
output;
end;
Run;
Thanks for your reply but I have figured it out!!
Use PEVENT on the model statement to apply a prior probability when running a model with low event rates.
Thanks Reeza!!
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.
Use this tutorial as a handy guide to weigh the pros and cons of these commonly used machine learning algorithms.
Find more tutorials on the SAS Users YouTube channel.