<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Lift charts for SAS Base? in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/Lift-charts-for-SAS-Base/m-p/553084#M9313</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hey there,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I did a search, trying to see how to create lift charts (preferably along with proc logistic) but can't seem to find any info.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;</description>
    <pubDate>Mon, 22 Apr 2019 22:39:18 GMT</pubDate>
    <dc:creator>edasdfasdfasdfa</dc:creator>
    <dc:date>2019-04-22T22:39:18Z</dc:date>
    <item>
      <title>Lift charts for SAS Base?</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Lift-charts-for-SAS-Base/m-p/553084#M9313</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hey there,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I did a search, trying to see how to create lift charts (preferably along with proc logistic) but can't seem to find any info.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;</description>
      <pubDate>Mon, 22 Apr 2019 22:39:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Lift-charts-for-SAS-Base/m-p/553084#M9313</guid>
      <dc:creator>edasdfasdfasdfa</dc:creator>
      <dc:date>2019-04-22T22:39:18Z</dc:date>
    </item>
    <item>
      <title>Re: Lift charts for SAS Base?</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Lift-charts-for-SAS-Base/m-p/553097#M9315</link>
      <description>&lt;P&gt;I believe PROC LOGISTIC can do these with the appropriate statements. Check out the ROC Curve listing in this link:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://support.sas.com/kb/30/333.html#roc" target="_blank"&gt;http://support.sas.com/kb/30/333.html#roc&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 23 Apr 2019 00:44:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Lift-charts-for-SAS-Base/m-p/553097#M9315</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2019-04-23T00:44:31Z</dc:date>
    </item>
    <item>
      <title>Re: Lift charts for SAS Base?</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Lift-charts-for-SAS-Base/m-p/553247#M9340</link>
      <description>&lt;P&gt;NOTE: the code is not written by me . I stole it from somewhere.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;/*******
  Credit Risk Scorecards: Development and Implementation using SAS
  (c)  Mamdouh Refaat
********/


/*******************************************************/
/* Macro LiftChart  */
/*******************************************************/

%macro LiftChart(DSin, ProbVar, DVVar, DSLift);
/* Calculation of the Lift chart data from 
   the predicted probabilities DSin using 
   the PorbVar and DVVar. The lift chart data
   is stored in DSLift. We use 10 deciles. 
*/

/* Sort the observations using the predicted Probability in descending order*/
proc sort data=&amp;amp;DsIn;
	by descending &amp;amp;ProbVar;
run;

/* Find the total number of Positives */
%local P Ntot;
proc sql noprint;
	select sum(&amp;amp;DVVar) into:P from &amp;amp;DSin;
	select count(*) into: Ntot from &amp;amp;DSin;
quit;
%let N=%eval(&amp;amp;Ntot-&amp;amp;P); /* total Negative(Good) */

/* Get Count number of correct defaults per decile */
data &amp;amp;DSLift;
	set &amp;amp;DsIn nobs=nn ;
	by descending &amp;amp;ProbVar;
	retain Tile 1  SumP 0 TotP 0 SumN 0 TotN 0;
	Tile_size=ceil(NN/10);

	TilePer=Tile/10;

	label TilePer ='Percent of Population';
	label TileP='Percent of population';

	if &amp;amp;DVVar=1 then SumP=SumP+&amp;amp;DVVar;
	else SumN=SumN+1;

	PPer=SumP/&amp;amp;P;			/* Positive  %    */
	NPer=SumN/&amp;amp;N;           /* Negative % */

	label PPer='Percent of Positives';
	label NPer='Percent of Negatives';

	if _N_ = Tile*Tile_Size then 	do;
		output;
		if Tile &amp;lt;10 then  Tile=Tile+1;
	end;	

	keep TilePer PPer NPer;
run;

/* Add the zero value to the curve */
data temp;
 	TilePer=0;
	PPer=0;
	NPer=0;
run;
Data &amp;amp;DSLift;
  set temp &amp;amp;DSlift;
run;
%mend;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 23 Apr 2019 13:40:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Lift-charts-for-SAS-Base/m-p/553247#M9340</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2019-04-23T13:40:02Z</dc:date>
    </item>
  </channel>
</rss>

