/* Specify the prior probability  */
/* to correct for oversampling    */


/* (1) 프로시져 사용 */

/* oversampling을 수정하기 위한 사전확률 정의 */

%let pi1=.02;       


/* Correct predicted probabilities */
/* 예측확률 수정 */

proc logistic data=develop;
   model ins(event='1')=dda ddabal dep depamt cashbk checks;
   score data = pmlr.new out=scored priorevent=&pi1;
run;
/*priorevent= : 사전확률을 지정 */


proc print data=scored(obs=10);
   var p_1 dda ddabal dep depamt cashbk checks;
run;


/* oversample 미수정 비교 */
proc logistic data=develop des;
   model ins=dda ddabal dep depamt cashbk checks;
   score data = pmlr.new out=scored_1 ;
run;

proc print data=scored_1(obs=20);
	var P_1 dda ddabal dep depamt cashbk checks;
run;
