<?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: How to use WEIGHT in PROC QUANTREG? in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-use-WEIGHT-in-PROC-QUANTREG/m-p/199810#M10700</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Use a log transformation on the response:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 14pt; font-family: Courier New;"&gt;model logsalary = YrMajor /&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 14pt; font-family: Courier New;"&gt;quantile&lt;/SPAN&gt;&lt;SPAN style="font-size: 14pt; font-family: Courier New;"&gt; = (&lt;/SPAN&gt;&lt;STRONG style=": ; color: #008080; font-size: 14pt; font-family: Courier New;"&gt;0.1&lt;/STRONG&gt;&lt;SPAN style="font-size: 14pt; font-family: Courier New;"&gt;, &lt;/SPAN&gt;&lt;STRONG style=": ; color: #008080; font-size: 14pt; font-family: Courier New;"&gt;0.5&lt;/STRONG&gt;&lt;SPAN style="font-size: 14pt; font-family: Courier New;"&gt;, &lt;/SPAN&gt;&lt;STRONG style=": ; color: #008080; font-size: 14pt; font-family: Courier New;"&gt;0.9&lt;/STRONG&gt;&lt;SPAN style="font-size: 14pt; font-family: Courier New;"&gt;);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 17 Aug 2015 14:34:26 GMT</pubDate>
    <dc:creator>Rick_SAS</dc:creator>
    <dc:date>2015-08-17T14:34:26Z</dc:date>
    <item>
      <title>How to use WEIGHT in PROC QUANTREG?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-use-WEIGHT-in-PROC-QUANTREG/m-p/199807#M10697</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;PROC QUANTREG is not robust to high leverage points.&amp;nbsp; Running:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;proc quantreg data = sashelp.baseball plots = all;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;model salary = YrMajor /quantile = (0.1, 0.5, 0.9);&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Gives a warning in the log that there are high leverage points and suggests using the WEIGHT statement.&amp;nbsp; However, no details are available. I have seen some articles suggesting weighting by the inverse of leverage, but there isn't a lot of material.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How should this be done?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Peter&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 15 Aug 2015 14:18:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-to-use-WEIGHT-in-PROC-QUANTREG/m-p/199807#M10697</guid>
      <dc:creator>plf515</dc:creator>
      <dc:date>2015-08-15T14:18:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to use WEIGHT in PROC QUANTREG?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-use-WEIGHT-in-PROC-QUANTREG/m-p/199808#M10698</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Peter,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I poked at this a little bit, using the inverse of the robust distance as a weight.&amp;nbsp; It appeared to reduce the number of outliers, but...&amp;nbsp; The log says the leverage option still uses the unweighted values to generate the next step.&amp;nbsp; I was hoping that some sort of iterative process could be applied, but no luck.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Steve Denham&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Aug 2015 12:25:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-to-use-WEIGHT-in-PROC-QUANTREG/m-p/199808#M10698</guid>
      <dc:creator>SteveDenham</dc:creator>
      <dc:date>2015-08-17T12:25:57Z</dc:date>
    </item>
    <item>
      <title>Re: How to use WEIGHT in PROC QUANTREG?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-use-WEIGHT-in-PROC-QUANTREG/m-p/199809#M10699</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Steve.&amp;nbsp; Hmm.&amp;nbsp; Maybe the developer of QUANTREG will chime in. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Aug 2015 12:35:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-to-use-WEIGHT-in-PROC-QUANTREG/m-p/199809#M10699</guid>
      <dc:creator>plf515</dc:creator>
      <dc:date>2015-08-17T12:35:42Z</dc:date>
    </item>
    <item>
      <title>Re: How to use WEIGHT in PROC QUANTREG?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-use-WEIGHT-in-PROC-QUANTREG/m-p/199810#M10700</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Use a log transformation on the response:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 14pt; font-family: Courier New;"&gt;model logsalary = YrMajor /&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 14pt; font-family: Courier New;"&gt;quantile&lt;/SPAN&gt;&lt;SPAN style="font-size: 14pt; font-family: Courier New;"&gt; = (&lt;/SPAN&gt;&lt;STRONG style=": ; color: #008080; font-size: 14pt; font-family: Courier New;"&gt;0.1&lt;/STRONG&gt;&lt;SPAN style="font-size: 14pt; font-family: Courier New;"&gt;, &lt;/SPAN&gt;&lt;STRONG style=": ; color: #008080; font-size: 14pt; font-family: Courier New;"&gt;0.5&lt;/STRONG&gt;&lt;SPAN style="font-size: 14pt; font-family: Courier New;"&gt;, &lt;/SPAN&gt;&lt;STRONG style=": ; color: #008080; font-size: 14pt; font-family: Courier New;"&gt;0.9&lt;/STRONG&gt;&lt;SPAN style="font-size: 14pt; font-family: Courier New;"&gt;);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Aug 2015 14:34:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-to-use-WEIGHT-in-PROC-QUANTREG/m-p/199810#M10700</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2015-08-17T14:34:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to use WEIGHT in PROC QUANTREG?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-use-WEIGHT-in-PROC-QUANTREG/m-p/199811#M10701</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rick&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That does not solve the problem. There are still 26 leverage points and the warning is still given.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Peter&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Aug 2015 14:59:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-to-use-WEIGHT-in-PROC-QUANTREG/m-p/199811#M10701</guid>
      <dc:creator>plf515</dc:creator>
      <dc:date>2015-08-17T14:59:08Z</dc:date>
    </item>
    <item>
      <title>Re: How to use WEIGHT in PROC QUANTREG?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-use-WEIGHT-in-PROC-QUANTREG/m-p/199812#M10702</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The WARNING is common from one of the plots.&amp;nbsp; If you delete PLOTS=ALL, there is no warning.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Aug 2015 15:39:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-to-use-WEIGHT-in-PROC-QUANTREG/m-p/199812#M10702</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2015-08-17T15:39:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to use WEIGHT in PROC QUANTREG?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-use-WEIGHT-in-PROC-QUANTREG/m-p/199813#M10703</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Interesting!&amp;nbsp; But that's surely a problem? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I know that QUANTREG is sensitive to high leverage points.&amp;nbsp; But the extent of the sensitivity (and whether it is problematic) surely doesn't depend on whether one requests particular plots!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Aug 2015 15:44:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-to-use-WEIGHT-in-PROC-QUANTREG/m-p/199813#M10703</guid>
      <dc:creator>plf515</dc:creator>
      <dc:date>2015-08-17T15:44:02Z</dc:date>
    </item>
    <item>
      <title>Re: How to use WEIGHT in PROC QUANTREG?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-use-WEIGHT-in-PROC-QUANTREG/m-p/199814#M10704</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;SAS is efficient. If a statistic is not needed by an analysis, it is usually not computed. If you use the LEVERAGE option on the MODEL statement, you get the warning.&amp;nbsp; If you specify PLOT=RDPLOT (which is part of PLOT=ALL), the proc &lt;A href="http://support.sas.com/documentation/cdl/en/statug/68162/HTML/default/viewer.htm#statug_qreg_details17.htm"&gt;needs to compute the leverage values&lt;/A&gt;, so it helps you out by specifying the option for you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Aug 2015 16:54:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-to-use-WEIGHT-in-PROC-QUANTREG/m-p/199814#M10704</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2015-08-17T16:54:10Z</dc:date>
    </item>
    <item>
      <title>Re: How to use WEIGHT in PROC QUANTREG?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-use-WEIGHT-in-PROC-QUANTREG/m-p/199815#M10705</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;But why when a WEIGHT value is specified does the leverage estimation not change?&amp;nbsp; To answer Peter's question, I would think that if you correctly specified weights for the observations then the leverage of given points with small weights would go down.&amp;nbsp; I was hoping to set up a sort of iterative process that minimized the number of leverage points, but it doesn't look like the output dataset from a weighted analysis looks any different than an unweighted analysis.&amp;nbsp; I suppose that is the result of the optimization method being used.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Steve Denham&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Aug 2015 17:07:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-to-use-WEIGHT-in-PROC-QUANTREG/m-p/199815#M10705</guid>
      <dc:creator>SteveDenham</dc:creator>
      <dc:date>2015-08-17T17:07:35Z</dc:date>
    </item>
    <item>
      <title>Re: How to use WEIGHT in PROC QUANTREG?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-use-WEIGHT-in-PROC-QUANTREG/m-p/199816#M10706</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'll be the first to agree that the word "weight" is used in a confusing fashion in the doc for the ROBUSTREG and QUANTREG docs.&amp;nbsp; To me, it seems like the word is used in at least three different ways.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think you need to look at the &lt;A href="http://support.sas.com/documentation/cdl/en/statug/68162/HTML/default/viewer.htm#statug_rreg_details32.htm"&gt;ROBUSTREG documentation&lt;/A&gt;, not the QUANTREG doc, to see how the WEIGHT statement is used to detect leverage points and outliers. The short answer is that the WEIGHT variable is ignored for that computation. Notice that the robust distances are documented as not being affected by the WEIGHT statement. Notice also that in ROBUSTREG, the "final weighted least squares estimates" refer to "the least squares estimates after the detected outliers are deleted." In other words, the OUTLIER indicator variable (0/1) is used as a weight to exclude observations.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Based on what I've just said, I don't really understand the warning message. You might want to take this up with Tech Support unless Steve has additional ideas. Maybe you are supposed to run the PROC once to get the leverage values (and the warning) and then you use that 0/1 variable to exclude the high-leverage points?:&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;proc quantreg data = sashelp.baseball ;&lt;BR /&gt;model logsalary = YrMajor /quantile=(0.1, 0.5, 0.9) leverage;&lt;BR /&gt;output out=out leverage=leverage;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc quantreg data = out;&lt;BR /&gt;weight leverage;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* exclude hihg-leverage from first run */&lt;BR /&gt;model logsalary = YrMajor /quantile=(0.1, 0.5, 0.9);&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Blah, blah, I'm not an expert, blah, blah, I don't speak for SAS, etc.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Aug 2015 18:23:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-to-use-WEIGHT-in-PROC-QUANTREG/m-p/199816#M10706</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2015-08-17T18:23:39Z</dc:date>
    </item>
    <item>
      <title>Re: How to use WEIGHT in PROC QUANTREG?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-use-WEIGHT-in-PROC-QUANTREG/m-p/199817#M10707</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok, time to talk to tech support.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'll report back on what they say.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Aug 2015 18:34:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-to-use-WEIGHT-in-PROC-QUANTREG/m-p/199817#M10707</guid>
      <dc:creator>plf515</dc:creator>
      <dc:date>2015-08-17T18:34:04Z</dc:date>
    </item>
  </channel>
</rss>

