<?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: Plotting 95% CI with SGPLOT in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/Plotting-95-CI-with-SGPLOT/m-p/764506#M21914</link>
    <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/311553"&gt;@mariko5797&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;I was trying to use this code as reference: &lt;A href="https://communities.sas.com/t5/Graphics-Programming/How-Can-I-Display-Confidence-Interval-like-Prediction-Limit-by/td-p/461481" target="_blank" rel="noopener"&gt;https://communities.sas.com/t5/Graphics-Programming/How-Can-I-Display-Confidence-Interval-like-Prediction-Limit-by/td-p/461481&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;However, the 95% CI of my graph display overlaps the data points. I want either the background color of the 95% CI very faded or nonexistent.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%macro Graphics2(tissue=, units=, DV=, adjust=, pval=);
	title; title1; footnote1; footnote2;
	ods graphics / reset width = 300px height = 400px noscale attrpriority = none;
	
     proc sgplot data = work (where = (SPECTYPE = "&amp;amp;tissue"));
	 scatter x = V1WT y = &amp;amp;DV;
	 reg x = V1WT y = &amp;amp;DV / name = "reg" clm clmattrs=(clmfillattrs=(color=white) clmlineattrs=(pattern=shortdash)) nolegclm 
							nomarkers lineattrs = GraphData2; /*add regression line*/
	 keylegend "reg";
	 xaxis label = "Weight (kg)" values = (45, 50 to 200 by 25);
	 %if &amp;amp;adjust = Y %then %do;
	 yaxis label = "Concentrations (&amp;amp;units)";
		 title height = 10pt "Concentrations vs. Weight";
		 footnote1 j = l height = 8pt "Note: Concentrations were adjusted for dose received at time of sample taken";
	 %end;
	 %else %if &amp;amp;adjust = N %then %do;
		 yaxis label = "Concentrations (&amp;amp;units)";
		 title height = 10pt "&amp;amp;tissue: Concentrations vs. Weight";
	 %end;
	 inset ("p-value" = "&amp;amp;pval") / border textattrs = (size=8);
	run;
%mend;

%Graphics2(tissue= ADIPOSE TISSUE, units= ng/g, DV= AD&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Easiest thing to do would be the change the order of the Scatter and Reg plots. If you place the Scatter after the Reg it will be placed after (or over if you want to think of it that way) the regression.&lt;/P&gt;
&lt;P&gt;Second would be to use the CLMTRANSPARENCY option with a value of 0.5 or greater (up to 1 for completely transparent). The default is 0 for this parameter which makes the confidence band opaque.&lt;/P&gt;</description>
    <pubDate>Fri, 27 Aug 2021 17:05:42 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2021-08-27T17:05:42Z</dc:date>
    <item>
      <title>Plotting 95% CI with SGPLOT</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Plotting-95-CI-with-SGPLOT/m-p/764503#M21913</link>
      <description>&lt;P&gt;I was trying to use this code as reference: &lt;A href="https://communities.sas.com/t5/Graphics-Programming/How-Can-I-Display-Confidence-Interval-like-Prediction-Limit-by/td-p/461481" target="_blank"&gt;https://communities.sas.com/t5/Graphics-Programming/How-Can-I-Display-Confidence-Interval-like-Prediction-Limit-by/td-p/461481&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;However, the 95% CI of my graph display overlaps the data points. I want either the background color of the 95% CI very faded or nonexistent.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%macro Graphics2(tissue=, units=, DV=, adjust=, pval=);
	title; title1; footnote1; footnote2;
	ods graphics / reset width = 300px height = 400px noscale attrpriority = none;
	
     proc sgplot data = work (where = (SPECTYPE = "&amp;amp;tissue"));
	 scatter x = V1WT y = &amp;amp;DV;
	 reg x = V1WT y = &amp;amp;DV / name = "reg" clm clmattrs=(clmfillattrs=(color=white) clmlineattrs=(pattern=shortdash)) nolegclm 
							nomarkers lineattrs = GraphData2; /*add regression line*/
	 keylegend "reg";
	 xaxis label = "Weight (kg)" values = (45, 50 to 200 by 25);
	 %if &amp;amp;adjust = Y %then %do;
	 yaxis label = "Concentrations (&amp;amp;units)";
		 title height = 10pt "Concentrations vs. Weight";
		 footnote1 j = l height = 8pt "Note: Concentrations were adjusted for dose received at time of sample taken";
	 %end;
	 %else %if &amp;amp;adjust = N %then %do;
		 yaxis label = "Concentrations (&amp;amp;units)";
		 title height = 10pt "&amp;amp;tissue: Concentrations vs. Weight";
	 %end;
	 inset ("p-value" = "&amp;amp;pval") / border textattrs = (size=8);
	run;
%mend;

%Graphics2(tissue= ADIPOSE TISSUE, units= ng/g, DV= ADJDV, adjust= Y, pval= 0.05);
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="mariko5797_0-1630083005311.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/63101iC1B9DB438ED6AB62/image-size/medium?v=v2&amp;amp;px=400" role="button" title="mariko5797_0-1630083005311.png" alt="mariko5797_0-1630083005311.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 27 Aug 2021 16:54:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Plotting-95-CI-with-SGPLOT/m-p/764503#M21913</guid>
      <dc:creator>mariko5797</dc:creator>
      <dc:date>2021-08-27T16:54:20Z</dc:date>
    </item>
    <item>
      <title>Re: Plotting 95% CI with SGPLOT</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Plotting-95-CI-with-SGPLOT/m-p/764506#M21914</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/311553"&gt;@mariko5797&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;I was trying to use this code as reference: &lt;A href="https://communities.sas.com/t5/Graphics-Programming/How-Can-I-Display-Confidence-Interval-like-Prediction-Limit-by/td-p/461481" target="_blank" rel="noopener"&gt;https://communities.sas.com/t5/Graphics-Programming/How-Can-I-Display-Confidence-Interval-like-Prediction-Limit-by/td-p/461481&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;However, the 95% CI of my graph display overlaps the data points. I want either the background color of the 95% CI very faded or nonexistent.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%macro Graphics2(tissue=, units=, DV=, adjust=, pval=);
	title; title1; footnote1; footnote2;
	ods graphics / reset width = 300px height = 400px noscale attrpriority = none;
	
     proc sgplot data = work (where = (SPECTYPE = "&amp;amp;tissue"));
	 scatter x = V1WT y = &amp;amp;DV;
	 reg x = V1WT y = &amp;amp;DV / name = "reg" clm clmattrs=(clmfillattrs=(color=white) clmlineattrs=(pattern=shortdash)) nolegclm 
							nomarkers lineattrs = GraphData2; /*add regression line*/
	 keylegend "reg";
	 xaxis label = "Weight (kg)" values = (45, 50 to 200 by 25);
	 %if &amp;amp;adjust = Y %then %do;
	 yaxis label = "Concentrations (&amp;amp;units)";
		 title height = 10pt "Concentrations vs. Weight";
		 footnote1 j = l height = 8pt "Note: Concentrations were adjusted for dose received at time of sample taken";
	 %end;
	 %else %if &amp;amp;adjust = N %then %do;
		 yaxis label = "Concentrations (&amp;amp;units)";
		 title height = 10pt "&amp;amp;tissue: Concentrations vs. Weight";
	 %end;
	 inset ("p-value" = "&amp;amp;pval") / border textattrs = (size=8);
	run;
%mend;

%Graphics2(tissue= ADIPOSE TISSUE, units= ng/g, DV= AD&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Easiest thing to do would be the change the order of the Scatter and Reg plots. If you place the Scatter after the Reg it will be placed after (or over if you want to think of it that way) the regression.&lt;/P&gt;
&lt;P&gt;Second would be to use the CLMTRANSPARENCY option with a value of 0.5 or greater (up to 1 for completely transparent). The default is 0 for this parameter which makes the confidence band opaque.&lt;/P&gt;</description>
      <pubDate>Fri, 27 Aug 2021 17:05:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Plotting-95-CI-with-SGPLOT/m-p/764506#M21914</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2021-08-27T17:05:42Z</dc:date>
    </item>
  </channel>
</rss>

