Solved
Contributor
Posts: 44

# SAS Extrapolation

``````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?

Accepted Solutions
Solution
‎01-25-2017 06:11 AM
Frequent Contributor
Posts: 96

## Re: SAS Extrapolation

Try this code:

``````data test;
input ID Good_Bad ;
infile datalines;
datalines;
734374  0
4834110 1
;
run;

data final(drop=i);
set test;
if Good_bad=0 then output;
do i= 1 to 12;
output;
end;
Run;``````

All Replies
Solution
‎01-25-2017 06:11 AM
Frequent Contributor
Posts: 96

## Re: SAS Extrapolation

Try this code:

``````data test;
input ID Good_Bad ;
infile datalines;
datalines;
734374  0
4834110 1
;
run;

data final(drop=i);
set test;
if Good_bad=0 then output;
do i= 1 to 12;
output;
end;
Run;``````
Contributor
Posts: 44

## Re: SAS Extrapolation

Posted in reply to Kalind_Patel

Thanks for your reply but I have figured it out!!

Super User
Posts: 19,768

## Re: SAS Extrapolation

Use PEVENT on the model statement to apply a prior probability when running a model with low event rates.

Contributor
Posts: 44

## Re: SAS Extrapolation

Thanks Reeza!!

☑ This topic is solved.

Need further help from the community? Please ask a new question.

Discussion stats
• 4 replies
• 304 views
• 0 likes
• 3 in conversation