<?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 plot a figure like this? in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/How-to-plot-a-figure-like-this/m-p/766760#M30692</link>
    <description>&lt;P&gt;Thanks, Rick! will do&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 09 Sep 2021 03:46:32 GMT</pubDate>
    <dc:creator>mantubiradar19</dc:creator>
    <dc:date>2021-09-09T03:46:32Z</dc:date>
    <item>
      <title>How to plot a figure like this?</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-to-plot-a-figure-like-this/m-p/763187#M30426</link>
      <description>&lt;P&gt;Hello everyone, I would like to know how I can plot a figure like this?&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2021-08-23 163005.jpg" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/62851i0AC5985B7BC649A2/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Screenshot 2021-08-23 163005.jpg" alt="Screenshot 2021-08-23 163005.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;The explanation is:&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;Median (black line) and interquartile range&lt;BR /&gt;(blue area) are indicated. The green area indicates the ranges 10th–25th and 75th–90th percentiles, respectively.&lt;BR /&gt;The red area indicates the ranges 5th–10th percentiles and 90th–95th percentiles. Data were obtained by quantile&lt;BR /&gt;regression.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks in advance&lt;/P&gt;</description>
      <pubDate>Mon, 23 Aug 2021 08:33:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-to-plot-a-figure-like-this/m-p/763187#M30426</guid>
      <dc:creator>mantubiradar19</dc:creator>
      <dc:date>2021-08-23T08:33:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to plot a figure like this?</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-to-plot-a-figure-like-this/m-p/763200#M30429</link>
      <description>&lt;P&gt;It sounds like you have used PROC QUANTREG to compute the 5th, 10th, 25th, 50th, 75th, 90th, and 95th estimates.&amp;nbsp; Have you already used the OUTPUT statement to write the predicted values to a SAS data set? Do you have the data in wide form (as opposed to long form)? If so, then use the BAND statement in PROC SGPLOT to get the plot:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;/* for wide data */
proc sgplot data=Have;
   band x=X lower=Pred05 upper=Pred95; 
   band x=X lower=Pred10 upper=Pred90; 
   band x=X lower=Pred25 upper=Pred75; 
   series x=X y=Pred50; 
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;For more information and an example, see &lt;A href="https://blogs.sas.com/content/iml/2018/08/06/score-quantile-regression-sas.html" target="_self"&gt;"How to score and graph a quantile regression model in SAS."&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If this doesn't answer your questions, please provide sample data so that we can see the form of your data.&lt;/P&gt;</description>
      <pubDate>Mon, 23 Aug 2021 10:21:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-to-plot-a-figure-like-this/m-p/763200#M30429</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2021-08-23T10:21:48Z</dc:date>
    </item>
    <item>
      <title>Re: How to plot a figure like this?</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-to-plot-a-figure-like-this/m-p/763218#M30432</link>
      <description>&lt;P&gt;Hi Rick, this is how my data looks like:&lt;/P&gt;
&lt;PRE&gt;ID	eGFR	Gender	Age
110	55	Male	45
111	67	Female	60
112	87	Female	78
114	68	Male	65
115	90	Male	43
116	87	Female	56
117	34	Male	67
118	58	Male	78
119	70	Female	89
120	80	Male	76
&lt;/PRE&gt;</description>
      <pubDate>Mon, 23 Aug 2021 11:50:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-to-plot-a-figure-like-this/m-p/763218#M30432</guid>
      <dc:creator>mantubiradar19</dc:creator>
      <dc:date>2021-08-23T11:50:27Z</dc:date>
    </item>
    <item>
      <title>Re: How to plot a figure like this?</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-to-plot-a-figure-like-this/m-p/763224#M30433</link>
      <description>&lt;P&gt;That's your original data, but what does the data look like that you intend to plot?&amp;nbsp; Show us the PROC QUANTREG step you are using to get the regression quantiles.&lt;/P&gt;</description>
      <pubDate>Mon, 23 Aug 2021 12:31:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-to-plot-a-figure-like-this/m-p/763224#M30433</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2021-08-23T12:31:30Z</dc:date>
    </item>
    <item>
      <title>Re: How to plot a figure like this?</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-to-plot-a-figure-like-this/m-p/763230#M30434</link>
      <description>&lt;P&gt;If you need the PROC QUANTREG code, follow this example. An explanation of the program is in the link I posted earlier.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;/* Program based on "How to score and graph a quantile regression model in SAS"
   https://blogs.sas.com/content/iml/2018/08/06/score-quantile-regression-sas.html
*/
data Orig;
   set sashelp.bweight(obs=5000 where=(MomWtGain&amp;lt;=40));
   keep MomAge Weight Boy;
run;

proc means  data=orig;run;

data Score;
Weight = .;
do Boy = 0 to 1;
   do MomAge = -9 to 17;
      output;
   end;
end;

data Combined;
set Orig                     /* original data */
    Score(in=_ScoreData);    /* scoring data  */
ScoreData = _ScoreData;      /* binary indicator variable. ScoreData=1 for scoring data */
run;
 
/* 3. Run the procedure on the combined (original + scoring) data */
ods select ModelInfo NObs;
proc quantreg data=Combined ci=none;
   class Boy;
   model Weight = MomAge Boy / quantile = 0.1 0.05 0.25 0.5 0.75 0.90 0.95;
   output out=QRegOut(where=(ScoreData=1)) /* output predicted values for the scoring data */
              P=Pred / columnwise;         /* COLUMWISE option supports multiple quantiles */
run;

proc sort data=QRegOut;
by Boy MomAge Quantile;
run;

Data Wide;
set QRegOut;
retain Pred05 Pred10 Pred25 Pred50 Pred75 Pred90 Pred95;
if      Quantile=0.05 then Pred05 = Pred;
else if Quantile=0.10 then Pred10 = Pred;
else if Quantile=0.25 then Pred25 = Pred;
else if Quantile=0.50 then Pred50 = Pred;
else if Quantile=0.75 then Pred75 = Pred;
else if Quantile=0.90 then Pred90 = Pred;
else if Quantile=0.95 then Pred95 = Pred;
if Quantile=0.95 then output;
drop Pred;
keep Boy MomAge Pred:;
run;

proc sgpanel data=Wide noautolegend;
   panelby Boy;
   band x=MomAge lower=Pred05 upper=Pred95 / fillattrs=(color=salmon); 
   band x=MomAge lower=Pred10 upper=Pred90 / fillattrs=(color=LightGreen); 
   band x=MomAge lower=Pred25 upper=Pred75 / fillattrs=(color=LightBlue); 
   series x=MomAge y=Pred50 / lineattrs=(color=Black); 
run;

&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 23 Aug 2021 13:19:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-to-plot-a-figure-like-this/m-p/763230#M30434</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2021-08-23T13:19:02Z</dc:date>
    </item>
    <item>
      <title>Re: How to plot a figure like this?</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-to-plot-a-figure-like-this/m-p/764117#M30472</link>
      <description>&lt;P&gt;Hi Rick,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you and I was able to obtain a similar-looking plot from quantile regression results. I would like to know how I can add the intervals of 5 units to the x and y axis? TIA&lt;/P&gt;</description>
      <pubDate>Thu, 26 Aug 2021 07:22:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-to-plot-a-figure-like-this/m-p/764117#M30472</guid>
      <dc:creator>mantubiradar19</dc:creator>
      <dc:date>2021-08-26T07:22:59Z</dc:date>
    </item>
    <item>
      <title>Re: How to plot a figure like this?</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-to-plot-a-figure-like-this/m-p/764136#M30473</link>
      <description>&lt;P&gt;For the X axis, use the COLAXIS statement:&lt;/P&gt;
&lt;P&gt;colaxis values=(35 to 70 by 5) valuesHint;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For the Y axis, use the ROWAXIS statement:&lt;/P&gt;
&lt;P&gt;rowaxis values=(60 to 125 by 5) valuesHint;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 26 Aug 2021 09:29:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-to-plot-a-figure-like-this/m-p/764136#M30473</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2021-08-26T09:29:28Z</dc:date>
    </item>
    <item>
      <title>Re: How to plot a figure like this?</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-to-plot-a-figure-like-this/m-p/765210#M30538</link>
      <description>Thanks Rick!</description>
      <pubDate>Wed, 01 Sep 2021 03:16:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-to-plot-a-figure-like-this/m-p/765210#M30538</guid>
      <dc:creator>mantubiradar19</dc:creator>
      <dc:date>2021-09-01T03:16:57Z</dc:date>
    </item>
    <item>
      <title>Re: How to plot a figure like this?</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-to-plot-a-figure-like-this/m-p/766356#M30641</link>
      <description>&lt;P&gt;Hi Rick,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm further interested in looking at the&amp;nbsp;distribution of decline in variables over time. How can I tabulate the distribution of slopes of regression lines over individuals?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks in advance&lt;/P&gt;</description>
      <pubDate>Tue, 07 Sep 2021 12:08:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-to-plot-a-figure-like-this/m-p/766356#M30641</guid>
      <dc:creator>mantubiradar19</dc:creator>
      <dc:date>2021-09-07T12:08:19Z</dc:date>
    </item>
    <item>
      <title>Re: How to plot a figure like this?</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-to-plot-a-figure-like-this/m-p/766363#M30642</link>
      <description>&lt;P&gt;Since the data you posted does not include a Time variable nor repeated observations for individuals, I suggest you start a new thread. Include data that we can use and the PROC code that you are using to model the slopes as a function of time.&lt;/P&gt;</description>
      <pubDate>Tue, 07 Sep 2021 12:39:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-to-plot-a-figure-like-this/m-p/766363#M30642</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2021-09-07T12:39:37Z</dc:date>
    </item>
    <item>
      <title>Re: How to plot a figure like this?</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-to-plot-a-figure-like-this/m-p/766760#M30692</link>
      <description>&lt;P&gt;Thanks, Rick! will do&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 09 Sep 2021 03:46:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-to-plot-a-figure-like-this/m-p/766760#M30692</guid>
      <dc:creator>mantubiradar19</dc:creator>
      <dc:date>2021-09-09T03:46:32Z</dc:date>
    </item>
  </channel>
</rss>

