<?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 Re: Requesting rather a perhaps simple math help in SAS  plz?Weighted averages of weighted averages in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Requesting-rather-a-perhaps-simple-math-help-in-SAS-plz-Weighted/m-p/710700#M218834</link>
    <description>Yes, unfortunately I don't think there's  a way to simplify those weights, at least my basic algebra is saying the math wouldn't really be worth the effort. I think you'd need the same calculations essentially to figure out the new weights unless they happened to be constant (which is unlikely). &lt;BR /&gt;&lt;BR /&gt;</description>
    <pubDate>Mon, 11 Jan 2021 22:39:49 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2021-01-11T22:39:49Z</dc:date>
    <item>
      <title>Requesting rather a perhaps simple math help in SAS  plz?Weighted averages of weighted averages</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Requesting-rather-a-perhaps-simple-math-help-in-SAS-plz-Weighted/m-p/710696#M218831</link>
      <description>&lt;P&gt;Requesting rather a perhaps simple math help in SAS plz?Weighted averages of weighted averages&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hi, My I have &lt;STRONG&gt;A.)&lt;/STRONG&gt; detailed normalized banking data with unique loan info for each loan. Also, &lt;STRONG&gt;B.)&lt;/STRONG&gt;I have a portfolio level aka loan categorized into groups. Both are monthly snapshots.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The portfolio level has monthly weighted averages that were consolidated using loan level data. To get some quarterly reporting, I tried to weight the weighted of monthly portfolio data with the anticipation those will align with results of&amp;nbsp; the unique loan level data weighted by quarterly.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;However the results seem pretty different. Not sure if me being tired has anything to do with it. Am i being silly in missing something that's obvious?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 11 Jan 2021 22:32:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Requesting-rather-a-perhaps-simple-math-help-in-SAS-plz-Weighted/m-p/710696#M218831</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2021-01-11T22:32:16Z</dc:date>
    </item>
    <item>
      <title>Re: Requesting rather a perhaps simple math help in SAS  plz?Weighted averages of weighted averages</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Requesting-rather-a-perhaps-simple-math-help-in-SAS-plz-Weighted/m-p/710697#M218832</link>
      <description>I would assume if the weighted data is just summed it should reflect the quarterly values? No need to reweight? Or is the quarterly using different weights that reflect the three months totals?&lt;BR /&gt;</description>
      <pubDate>Mon, 11 Jan 2021 22:34:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Requesting-rather-a-perhaps-simple-math-help-in-SAS-plz-Weighted/m-p/710697#M218832</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2021-01-11T22:34:09Z</dc:date>
    </item>
    <item>
      <title>Re: Requesting rather a perhaps simple math help in SAS  plz?Weighted averages of weighted averages</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Requesting-rather-a-perhaps-simple-math-help-in-SAS-plz-Weighted/m-p/710699#M218833</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13879"&gt;@Reeza&lt;/a&gt;&amp;nbsp; Thank you for speedy response. Below is querying the monthly portfolio consolidated&amp;nbsp; aka group by portfolio, monthly.&amp;nbsp; Does this give a better idea?&lt;/P&gt;
&lt;P&gt;The source total orig data is monthly portfolio consolidated file&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;/*wa_fico wa_cltv wa_rate*/

%let prime=0.0325;
%let QTR=2020Q4;
data heloc;
 set ccrm_dnt.total_origination
 (keep=wa_fico wa_cltv wa_rate units dollars portfolio date);
 where portfolio in ('HELOC Jr Lien','HELOC Sr Lien')
 and put(intnx('qtr',date,0,'e'),yyq6. -l)="&amp;amp;QTR";
 retain prime &amp;amp;prime;
 Monthly_spread=wa_rate-prime;
run;

proc sql;
 create table heloc_summary as
 select portfolio,
 intnx('qtr',date,0,'e') as qtr format=yyq6. ,
 sum(wa_fico * dollars) / sum(dollars) as wa_fico format=8. label='WA FICO',
 sum(wa_cltv * dollars) / sum(dollars) as wa_cltv format=8. label='WA LTV',
 sum(Monthly_spread *dollars)/sum(dollars) as Spread,
 sum(dollars)/sum(units) as average_limit format=dollar20.2,
 sum(units) as count
 from heloc
 group by portfolio,qtr;
quit;

&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 11 Jan 2021 22:38:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Requesting-rather-a-perhaps-simple-math-help-in-SAS-plz-Weighted/m-p/710699#M218833</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2021-01-11T22:38:03Z</dc:date>
    </item>
    <item>
      <title>Re: Requesting rather a perhaps simple math help in SAS  plz?Weighted averages of weighted averages</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Requesting-rather-a-perhaps-simple-math-help-in-SAS-plz-Weighted/m-p/710700#M218834</link>
      <description>Yes, unfortunately I don't think there's  a way to simplify those weights, at least my basic algebra is saying the math wouldn't really be worth the effort. I think you'd need the same calculations essentially to figure out the new weights unless they happened to be constant (which is unlikely). &lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 11 Jan 2021 22:39:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Requesting-rather-a-perhaps-simple-math-help-in-SAS-plz-Weighted/m-p/710700#M218834</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2021-01-11T22:39:49Z</dc:date>
    </item>
    <item>
      <title>Re: Requesting rather a perhaps simple math help in SAS  plz?Weighted averages of weighted averages</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Requesting-rather-a-perhaps-simple-math-help-in-SAS-plz-Weighted/m-p/710702#M218835</link>
      <description>&lt;P&gt;so go back to unique loan level data and pull from there ? &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 11 Jan 2021 22:40:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Requesting-rather-a-perhaps-simple-math-help-in-SAS-plz-Weighted/m-p/710702#M218835</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2021-01-11T22:40:58Z</dc:date>
    </item>
    <item>
      <title>Re: Requesting rather a perhaps simple math help in SAS  plz?Weighted averages of weighted averages</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Requesting-rather-a-perhaps-simple-math-help-in-SAS-plz-Weighted/m-p/710703#M218836</link>
      <description>Yes, or if you happen to have an intermediary table that just has the sums of each quantity per month that may work as well. We create a set of monthly summaries of common stats such as these, usually just count and totals, for that reason.</description>
      <pubDate>Mon, 11 Jan 2021 22:43:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Requesting-rather-a-perhaps-simple-math-help-in-SAS-plz-Weighted/m-p/710703#M218836</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2021-01-11T22:43:10Z</dc:date>
    </item>
    <item>
      <title>Re: Requesting rather a perhaps simple math help in SAS  plz?Weighted averages of weighted averages</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Requesting-rather-a-perhaps-simple-math-help-in-SAS-plz-Weighted/m-p/710788#M218868</link>
      <description>&lt;P&gt;Calling&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13684"&gt;@Rick_SAS&lt;/a&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Jan 2021 12:09:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Requesting-rather-a-perhaps-simple-math-help-in-SAS-plz-Weighted/m-p/710788#M218868</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2021-01-12T12:09:39Z</dc:date>
    </item>
    <item>
      <title>Re: Requesting rather a perhaps simple math help in SAS  plz?Weighted averages of weighted averages</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Requesting-rather-a-perhaps-simple-math-help-in-SAS-plz-Weighted/m-p/712758#M219808</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13879"&gt;@Reeza&lt;/a&gt;&amp;nbsp;Yes monthly Portfolio summary file indeed exists and that seem to have worked. However, are we in sync that always better to go back to loan level data to play with loan characteristics at source and not at summary? Although, product of summed_outstanding* weighted average is expected to give the sum(outstanding*fico) etc. Final thoughts?&lt;/P&gt;</description>
      <pubDate>Wed, 20 Jan 2021 16:10:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Requesting-rather-a-perhaps-simple-math-help-in-SAS-plz-Weighted/m-p/712758#M219808</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2021-01-20T16:10:03Z</dc:date>
    </item>
  </channel>
</rss>

