<?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 Weighted linear regression in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/Weighted-linear-regression/m-p/291599#M15505</link>
    <description>&lt;P&gt;I have data for which I did a regression and the White test for constant variance had a p value =0.0016 indicating heterosdedasticity of the variance. &amp;nbsp;See attached graph for residuals vs predicted value. &amp;nbsp;The data was normally distributed see atached distribution graph which had a p=0.79 for the Shapiro Wilk test. &amp;nbsp;These results indicate that I need to do a weighted regression.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc reg;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* weighted linear regression */&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; model y = x;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; weight w;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In the literature I read, "&amp;nbsp;&lt;/P&gt;&lt;P&gt;If however we know the noise variance σ 2 i at each measurement i, and set wi = 1/σ2 i , we get the heteroskedastic MLE, and recover efficiency."&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My question is how do we know this weight value and based upon my data what would be an appropriate weight i.e., 1/y or something else?&lt;/P&gt;</description>
    <pubDate>Sun, 14 Aug 2016 16:22:28 GMT</pubDate>
    <dc:creator>jacksonan123</dc:creator>
    <dc:date>2016-08-14T16:22:28Z</dc:date>
    <item>
      <title>Weighted linear regression</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Weighted-linear-regression/m-p/291599#M15505</link>
      <description>&lt;P&gt;I have data for which I did a regression and the White test for constant variance had a p value =0.0016 indicating heterosdedasticity of the variance. &amp;nbsp;See attached graph for residuals vs predicted value. &amp;nbsp;The data was normally distributed see atached distribution graph which had a p=0.79 for the Shapiro Wilk test. &amp;nbsp;These results indicate that I need to do a weighted regression.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc reg;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* weighted linear regression */&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; model y = x;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; weight w;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In the literature I read, "&amp;nbsp;&lt;/P&gt;&lt;P&gt;If however we know the noise variance σ 2 i at each measurement i, and set wi = 1/σ2 i , we get the heteroskedastic MLE, and recover efficiency."&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My question is how do we know this weight value and based upon my data what would be an appropriate weight i.e., 1/y or something else?&lt;/P&gt;</description>
      <pubDate>Sun, 14 Aug 2016 16:22:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Weighted-linear-regression/m-p/291599#M15505</guid>
      <dc:creator>jacksonan123</dc:creator>
      <dc:date>2016-08-14T16:22:28Z</dc:date>
    </item>
    <item>
      <title>Re: Weighted linear regression</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Weighted-linear-regression/m-p/291690#M15521</link>
      <description>&lt;P&gt;The optimal weight values are unknown.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I can think of three options, listed from easiest to most difficult:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1) Transform the response variable by applying a variance-stabilizing transformation.&amp;nbsp;A typical transformation is to define LogY = log(y) and then model LogY as a function of X. &amp;nbsp;This would require that Y &amp;gt; 0 for your response variable, but there are &lt;A href="http://blogs.sas.com/content/iml/2011/04/27/log-transformations-how-to-handle-negative-data-values.html" target="_self"&gt;ways to handle negative values&lt;/A&gt;, too.&lt;/P&gt;
&lt;P&gt;2) Use robust regression, especially &lt;A href="http://support.sas.com/documentation/cdl/en/statug/68162/HTML/default/viewer.htm#statug_rreg_gettingstarted01.htm" target="_self"&gt;M-estimation by using PROC ROBUSTREG&lt;/A&gt;, if you think that your response variable has been contaminated by outliers.&lt;/P&gt;
&lt;P&gt;3) Implement &lt;A href="http://support.sas.com/documentation/cdl/en/statug/68162/HTML/default/viewer.htm#statug_nlin_examples02.htm" target="_self"&gt;iteratively reqeighted least squares regression &lt;/A&gt;by using PROC NLIN&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Since (1) is easy and is commonly done in practice, I would suggest that you start there. &amp;nbsp;Other variance stabilizing transformations include sqrt(Y) and 1/Y. You should use the one that makes the most intuitive sense for your data.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 15 Aug 2016 14:19:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Weighted-linear-regression/m-p/291690#M15521</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2016-08-15T14:19:43Z</dc:date>
    </item>
    <item>
      <title>Re: Weighted linear regression</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Weighted-linear-regression/m-p/291697#M15523</link>
      <description>&lt;P&gt;I will try each of the suggested options and see which works best.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for the advice.&lt;/P&gt;</description>
      <pubDate>Mon, 15 Aug 2016 15:01:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Weighted-linear-regression/m-p/291697#M15523</guid>
      <dc:creator>jacksonan123</dc:creator>
      <dc:date>2016-08-15T15:01:01Z</dc:date>
    </item>
  </channel>
</rss>

