<?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: Issues with Quantile Regression Output at Different Quantiles in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/Issues-with-Quantile-Regression-Output-at-Different-Quantiles/m-p/935291#M46620</link>
    <description>&lt;P&gt;Are you getting any warnings in the log? For example, you might see&lt;/P&gt;
&lt;P&gt;WARNING: The bootstrap covariance is close to 0.&lt;BR /&gt;WARNING: The ESTIMATE statement is ignored because the&lt;BR /&gt;covariance could not be computed at QUANTILE= 0.5&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;These results make me think that a large proportion of your data is tied at the median value. Study the following example. In the example, the LOS_hours response variable is binned to the nearest hour and most of the values are tied values at the median. When the QUANTREG procedure estimates the median for each class, there is no variation. (Notice in your output that the standard error of each estimate is 0 and the confidence interval has zero length.)&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I suggest you study (graph) your data to determine if your data are similar.&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data Have;
input trtgroup LOS_hours @@;
datalines;
 1 10 1 12 1 18 1 22 1 24 1 24 1 24 1 24 1 24 1 24 1 25 1 27 1 30 
 1 24 1 24 1 24 1 24 1 24 1 24
 0 12 0 16 0 20 0 26 0 30 0 30 0 30 0 30 0 30 0 30 0 32 0 35 0 36
 0 30 0 30 0 30 0 30 0 30 0 30
;

proc quantreg data=Have ci=resampling;
class trtgroup;
model LOS_hours = trtgroup/ quantile=0.5 ;
estimate 'Diff in Medians' trtgroup 1 -1 / CL;
run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 10 Jul 2024 10:15:09 GMT</pubDate>
    <dc:creator>Rick_SAS</dc:creator>
    <dc:date>2024-07-10T10:15:09Z</dc:date>
    <item>
      <title>Issues with Quantile Regression Output at Different Quantiles</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Issues-with-Quantile-Regression-Output-at-Different-Quantiles/m-p/935009#M46612</link>
      <description>&lt;P&gt;I want to compare the median of a continuous variable &amp;nbsp;b/n two groups using quantile regression, as you see below, when I set the quantile to 0.75, I receive output that includes p-values and difference estimates table. However, adjusting the quantile to 0.5 does not yield the second table with these details. Could you please advise on how to address this issue?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="bhrq_0-1720459730008.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/98214iB683C35A85EDDC74/image-size/medium?v=v2&amp;amp;px=400" role="button" title="bhrq_0-1720459730008.png" alt="bhrq_0-1720459730008.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="bhrq_1-1720459802788.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/98215i780128EEF3CC7E43/image-size/medium?v=v2&amp;amp;px=400" role="button" title="bhrq_1-1720459802788.png" alt="bhrq_1-1720459802788.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;here is my code:&lt;/P&gt;
&lt;P&gt;proc quantreg data=both_MIS ci=resampling;&lt;BR /&gt;class trtgroup;&lt;BR /&gt;model LOS_hours = trtgroup/ quantile=0.5 ;&lt;BR /&gt;estimate 'Diff in Medians' trtgroup 1 -1 / CL;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 08 Jul 2024 17:43:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Issues-with-Quantile-Regression-Output-at-Different-Quantiles/m-p/935009#M46612</guid>
      <dc:creator>bhr-q</dc:creator>
      <dc:date>2024-07-08T17:43:26Z</dc:date>
    </item>
    <item>
      <title>Re: Issues with Quantile Regression Output at Different Quantiles</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Issues-with-Quantile-Regression-Output-at-Different-Quantiles/m-p/935252#M46618</link>
      <description>&lt;P&gt;You can try add an ODS OUTPUT statement to output the parameter estimation on quantile 0.75. For example -&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc quantreg data=KeepSmoking ci=resampling;&lt;BR /&gt;class sex Race Education Activity Exercise;&lt;BR /&gt;model Change = Sex Age Education Activity Exercise YearsSmoke&lt;BR /&gt;PerDay /quantile = 0.75;&lt;BR /&gt;estimate "diff in Quantile 0.75" sex 1 -1/ CL;&lt;BR /&gt;&lt;STRONG&gt;ods output ProcessEst=PE;&lt;/STRONG&gt;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This should help see the different quantile estimates.&lt;/P&gt;</description>
      <pubDate>Wed, 10 Jul 2024 02:32:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Issues-with-Quantile-Regression-Output-at-Different-Quantiles/m-p/935252#M46618</guid>
      <dc:creator>cici0017</dc:creator>
      <dc:date>2024-07-10T02:32:36Z</dc:date>
    </item>
    <item>
      <title>Re: Issues with Quantile Regression Output at Different Quantiles</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Issues-with-Quantile-Regression-Output-at-Different-Quantiles/m-p/935291#M46620</link>
      <description>&lt;P&gt;Are you getting any warnings in the log? For example, you might see&lt;/P&gt;
&lt;P&gt;WARNING: The bootstrap covariance is close to 0.&lt;BR /&gt;WARNING: The ESTIMATE statement is ignored because the&lt;BR /&gt;covariance could not be computed at QUANTILE= 0.5&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;These results make me think that a large proportion of your data is tied at the median value. Study the following example. In the example, the LOS_hours response variable is binned to the nearest hour and most of the values are tied values at the median. When the QUANTREG procedure estimates the median for each class, there is no variation. (Notice in your output that the standard error of each estimate is 0 and the confidence interval has zero length.)&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I suggest you study (graph) your data to determine if your data are similar.&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data Have;
input trtgroup LOS_hours @@;
datalines;
 1 10 1 12 1 18 1 22 1 24 1 24 1 24 1 24 1 24 1 24 1 25 1 27 1 30 
 1 24 1 24 1 24 1 24 1 24 1 24
 0 12 0 16 0 20 0 26 0 30 0 30 0 30 0 30 0 30 0 30 0 32 0 35 0 36
 0 30 0 30 0 30 0 30 0 30 0 30
;

proc quantreg data=Have ci=resampling;
class trtgroup;
model LOS_hours = trtgroup/ quantile=0.5 ;
estimate 'Diff in Medians' trtgroup 1 -1 / CL;
run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 10 Jul 2024 10:15:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Issues-with-Quantile-Regression-Output-at-Different-Quantiles/m-p/935291#M46620</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2024-07-10T10:15:09Z</dc:date>
    </item>
  </channel>
</rss>

