<?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: WLS - Residuals not equal zero with intercept in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/WLS-Residuals-not-equal-zero-with-intercept/m-p/491408#M25513</link>
    <description>&lt;P&gt;I assume you mean "is this the expected behavior." Yes. In fact, it's&amp;nbsp;why weighting is useful for robust regression estimates. If an observation is an outlier, you can downweight&amp;nbsp;it. Then the fit doesn't go through the middle of the data anymore.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;However, the residuals do still have WEIGHTED means of zero:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc means data=Work.Residuals sum mean;
   var residuals;
   weight w;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Thu, 30 Aug 2018 20:19:44 GMT</pubDate>
    <dc:creator>Rick_SAS</dc:creator>
    <dc:date>2018-08-30T20:19:44Z</dc:date>
    <item>
      <title>WLS - Residuals not equal zero with intercept</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/WLS-Residuals-not-equal-zero-with-intercept/m-p/490767#M25490</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;Please excuse this basic question but the sum of the residuals with the following weighted least squares regression, which includes an intercept, does not equal zero (-0.1025)... Is it normal?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data Work.Sample;
      input  x y w; 
   datalines;
   0.0067   13.3832     0.3989422804
   0.0133   17.271      0.3946744272
   0.02     15.0223     0.3818928999
   0.0267   18.1516     0.3614238299
   0.0333   13.6427     0.3349933138
   0.04     16.6002     0.3033892838
   0.0467   16.7669     0.2687428615
;

proc reg data=Work.Sample outest=Work.Coeff tableout noprint;
	model y = x;
	weight w;
	output out=Work.Residuals  r=residuals;
quit;

proc means data=Work.Residuals sum;
	var residuals;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 29 Aug 2018 10:21:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/WLS-Residuals-not-equal-zero-with-intercept/m-p/490767#M25490</guid>
      <dc:creator>Alain38</dc:creator>
      <dc:date>2018-08-29T10:21:07Z</dc:date>
    </item>
    <item>
      <title>Re: WLS - Residuals not equal zero with intercept</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/WLS-Residuals-not-equal-zero-with-intercept/m-p/491408#M25513</link>
      <description>&lt;P&gt;I assume you mean "is this the expected behavior." Yes. In fact, it's&amp;nbsp;why weighting is useful for robust regression estimates. If an observation is an outlier, you can downweight&amp;nbsp;it. Then the fit doesn't go through the middle of the data anymore.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;However, the residuals do still have WEIGHTED means of zero:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc means data=Work.Residuals sum mean;
   var residuals;
   weight w;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 30 Aug 2018 20:19:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/WLS-Residuals-not-equal-zero-with-intercept/m-p/491408#M25513</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2018-08-30T20:19:44Z</dc:date>
    </item>
    <item>
      <title>Re: WLS - Residuals not equal zero with intercept</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/WLS-Residuals-not-equal-zero-with-intercept/m-p/491524#M25514</link>
      <description>Thank you so much Rick! I was indeed missing the point that the mean has to be weighted too.</description>
      <pubDate>Fri, 31 Aug 2018 06:03:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/WLS-Residuals-not-equal-zero-with-intercept/m-p/491524#M25514</guid>
      <dc:creator>Alain38</dc:creator>
      <dc:date>2018-08-31T06:03:08Z</dc:date>
    </item>
  </channel>
</rss>

