<?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 Plot reverse cumulative distributions paneled by study day in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Plot-reverse-cumulative-distributions-paneled-by-study-day/m-p/820325#M323782</link>
    <description>&lt;P&gt;The following output was made in R. I was wondering if there was a way to make something similar in SAS.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="mariko5797_0-1656103498923.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/72725i155099D1A240E6EC/image-size/medium?v=v2&amp;amp;px=400" role="button" title="mariko5797_0-1656103498923.png" alt="mariko5797_0-1656103498923.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _test1;
 label ELISA = "ELISA Total IgG Level"
		StDy = "Study Day";
 input ELISA StDy @@;
 cards;
6.94 1 6.97 8 7.11 29 6.95 36 7.12 57 6.70 64 7.13 92 7.01 124
7.06 1 6.89 8 7.28 29 6.93 36 7.05 57 7.00 64 7.04 92 7.21 124
7.05 1 7.11 8 7.03 29 6.98 36 7.04 57 7.08 64 6.87 92 6.81 124
6.95 1 7.05 8 6.98 29 6.94 36 7.06 57 7.12 64 7.19 92 7.12 124
6.91 1 6.89 8 7.23 29 6.98 36 6.93 57 6.83 64 6.99 92 7.00 124
;

data test1;
 label USUBJID = "Subject ID" TrtA = "Treatment Group";
 set _test1; usubjid = 1; trta = 'A'; 							 output;
 set _test1; usubjid = 2; trta = 'A'; elisa = 0.9*elisa + 0.02;  output;
 set _test1; usubjid = 3; trta = 'B'; elisa = 0.8*elisa + 0.32;  output;
 set _test1; usubjid = 4; trta = 'C'; elisa = 1.1*elisa - 0.62;  output;
 set _test1; usubjid = 5; trta = 'C'; elisa = 1.01*elisa + 0.08; output;
 set _test1; usubjid = 6; trta = 'D'; elisa = 1.01*elisa - 0.16; output;
 set _test1; usubjid = 7; trta = 'E'; elisa = 0.93*elisa + 0.11; output;
 set _test1; usubjid = 8; trta = 'E'; elisa = 0.87*elisa + 0.51; output;

proc sort; by trta stdy usubjid;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 24 Jun 2022 20:46:56 GMT</pubDate>
    <dc:creator>mariko5797</dc:creator>
    <dc:date>2022-06-24T20:46:56Z</dc:date>
    <item>
      <title>Plot reverse cumulative distributions paneled by study day</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Plot-reverse-cumulative-distributions-paneled-by-study-day/m-p/820325#M323782</link>
      <description>&lt;P&gt;The following output was made in R. I was wondering if there was a way to make something similar in SAS.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="mariko5797_0-1656103498923.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/72725i155099D1A240E6EC/image-size/medium?v=v2&amp;amp;px=400" role="button" title="mariko5797_0-1656103498923.png" alt="mariko5797_0-1656103498923.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _test1;
 label ELISA = "ELISA Total IgG Level"
		StDy = "Study Day";
 input ELISA StDy @@;
 cards;
6.94 1 6.97 8 7.11 29 6.95 36 7.12 57 6.70 64 7.13 92 7.01 124
7.06 1 6.89 8 7.28 29 6.93 36 7.05 57 7.00 64 7.04 92 7.21 124
7.05 1 7.11 8 7.03 29 6.98 36 7.04 57 7.08 64 6.87 92 6.81 124
6.95 1 7.05 8 6.98 29 6.94 36 7.06 57 7.12 64 7.19 92 7.12 124
6.91 1 6.89 8 7.23 29 6.98 36 6.93 57 6.83 64 6.99 92 7.00 124
;

data test1;
 label USUBJID = "Subject ID" TrtA = "Treatment Group";
 set _test1; usubjid = 1; trta = 'A'; 							 output;
 set _test1; usubjid = 2; trta = 'A'; elisa = 0.9*elisa + 0.02;  output;
 set _test1; usubjid = 3; trta = 'B'; elisa = 0.8*elisa + 0.32;  output;
 set _test1; usubjid = 4; trta = 'C'; elisa = 1.1*elisa - 0.62;  output;
 set _test1; usubjid = 5; trta = 'C'; elisa = 1.01*elisa + 0.08; output;
 set _test1; usubjid = 6; trta = 'D'; elisa = 1.01*elisa - 0.16; output;
 set _test1; usubjid = 7; trta = 'E'; elisa = 0.93*elisa + 0.11; output;
 set _test1; usubjid = 8; trta = 'E'; elisa = 0.87*elisa + 0.51; output;

proc sort; by trta stdy usubjid;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 24 Jun 2022 20:46:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Plot-reverse-cumulative-distributions-paneled-by-study-day/m-p/820325#M323782</guid>
      <dc:creator>mariko5797</dc:creator>
      <dc:date>2022-06-24T20:46:56Z</dc:date>
    </item>
    <item>
      <title>Re: Plot reverse cumulative distributions paneled by study day</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Plot-reverse-cumulative-distributions-paneled-by-study-day/m-p/820332#M323783</link>
      <description>&lt;P&gt;To do anything resembling series plots you need a continuous X variable and a (more or less) continuous y variable.&lt;/P&gt;
&lt;P&gt;Your final data set appears to have a variable Stdy that would control which graph panel items go into, and the Elisa variable that appears to be an X axis variable. Neither TrtA or Usubjid appear to be usable for a Y axis. So what type of plot do you want? The data shown doesn't match with the plots shown in form.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Adding a random Y axis variable:&lt;/P&gt;
&lt;PRE&gt;data test1;
 label USUBJID = "Subject ID" TrtA = "Treatment Group";
 set _test1; usubjid = 1; trta = 'A'; 							 output;
 set _test1; usubjid = 2; trta = 'A'; elisa = 0.9*elisa + 0.02;  y=25*rand('uniform'); output;
 set _test1; usubjid = 3; trta = 'B'; elisa = 0.8*elisa + 0.32;  y=26*rand('uniform'); output;
 set _test1; usubjid = 4; trta = 'C'; elisa = 1.1*elisa - 0.62;  y=27*rand('uniform'); output;
 set _test1; usubjid = 5; trta = 'C'; elisa = 1.01*elisa + 0.08; y=28*rand('uniform'); output;
 set _test1; usubjid = 6; trta = 'D'; elisa = 1.01*elisa - 0.16; y=29*rand('uniform'); output;
 set _test1; usubjid = 7; trta = 'E'; elisa = 0.93*elisa + 0.11; y=24*rand('uniform'); output;
 set _test1; usubjid = 8; trta = 'E'; elisa = 0.87*elisa + 0.51; y=23*rand('uniform'); output;

proc sort data=test1; 
  by stdy trta elisa;
run;


proc sgpanel data=test1;
   panelby stdy /columns=3;
   series x=elisa y=y/ group=trta;
run;&lt;BR /&gt;/* or maybe*/&lt;BR /&gt;proc sgpanel data=test1;&lt;BR /&gt;   panelby stdy /columns=3;&lt;BR /&gt;   scatter x=elisa y=usubjid/ group=trta;&lt;BR /&gt;run;&lt;BR /&gt;/* or */&lt;BR /&gt;&lt;BR /&gt;proc sgpanel data=test1;&lt;BR /&gt;   panelby stdy /columns=3;&lt;BR /&gt;   vbox elisa /category=usubjid group=trta;&lt;BR /&gt;run;&lt;/PRE&gt;
&lt;P&gt;SGpanel creates groups of similar graphs with each panel definition coming from the variable(s) on the Panelby statement. There are a fair number of layout elements for the panels in options after the / on the Panelby statement.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;A categorical group variable is typical way to show different related values with the Group=option.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 24 Jun 2022 21:31:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Plot-reverse-cumulative-distributions-paneled-by-study-day/m-p/820332#M323783</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2022-06-24T21:31:32Z</dc:date>
    </item>
    <item>
      <title>Re: Plot reverse cumulative distributions paneled by study day</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Plot-reverse-cumulative-distributions-paneled-by-study-day/m-p/820340#M323785</link>
      <description>Y = Proportion of Subjects (%)&lt;BR /&gt;X = ELISA Results (OD450)&lt;BR /&gt;Grouped by treatment group (TRTA)&lt;BR /&gt;Paneled by study day (STDY)&lt;BR /&gt;&lt;BR /&gt;It was requested to be reverse cumulative distribution, but I only saw SAS&lt;BR /&gt;documentation on normal cumulative distribution plots.&lt;BR /&gt;</description>
      <pubDate>Fri, 24 Jun 2022 23:11:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Plot-reverse-cumulative-distributions-paneled-by-study-day/m-p/820340#M323785</guid>
      <dc:creator>mariko5797</dc:creator>
      <dc:date>2022-06-24T23:11:39Z</dc:date>
    </item>
    <item>
      <title>Re: Plot reverse cumulative distributions paneled by study day</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Plot-reverse-cumulative-distributions-paneled-by-study-day/m-p/820346#M323788</link>
      <description>&lt;P&gt;Any percentage requires a denominator to calculate and I am not sure exactly what proportion you mean in this case for any given point.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 25 Jun 2022 05:41:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Plot-reverse-cumulative-distributions-paneled-by-study-day/m-p/820346#M323788</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2022-06-25T05:41:01Z</dc:date>
    </item>
    <item>
      <title>Re: Plot reverse cumulative distributions paneled by study day</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Plot-reverse-cumulative-distributions-paneled-by-study-day/m-p/820362#M323795</link>
      <description>&lt;P&gt;How to calculate these Proportion of Subject ?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _test1;
 label ELISA = "ELISA Total IgG Level"
		StDy = "Study Day";
 input ELISA StDy @@;
 cards;
6.94 1 6.97 8 7.11 29 6.95 36 7.12 57 6.70 64 7.13 92 7.01 124
7.06 1 6.89 8 7.28 29 6.93 36 7.05 57 7.00 64 7.04 92 7.21 124
7.05 1 7.11 8 7.03 29 6.98 36 7.04 57 7.08 64 6.87 92 6.81 124
6.95 1 7.05 8 6.98 29 6.94 36 7.06 57 7.12 64 7.19 92 7.12 124
6.91 1 6.89 8 7.23 29 6.98 36 6.93 57 6.83 64 6.99 92 7.00 124
;

data test1;
 label USUBJID = "Subject ID" TrtA = "Treatment Group";
 set _test1; usubjid = 1; trta = 'A'; 							 output;
 set _test1; usubjid = 2; trta = 'A'; elisa = 0.9*elisa + 0.02;  output;
 set _test1; usubjid = 3; trta = 'B'; elisa = 0.8*elisa + 0.32;  output;
 set _test1; usubjid = 4; trta = 'C'; elisa = 1.1*elisa - 0.62;  output;
 set _test1; usubjid = 5; trta = 'C'; elisa = 1.01*elisa + 0.08; output;
 set _test1; usubjid = 6; trta = 'D'; elisa = 1.01*elisa - 0.16; output;
 set _test1; usubjid = 7; trta = 'E'; elisa = 0.93*elisa + 0.11; output;
 set _test1; usubjid = 8; trta = 'E'; elisa = 0.87*elisa + 0.51; output;

proc sort data=test1; by trta stdy usubjid ;
run;


ods select none;
ods output cdfplot=cdfplot;
proc univariate data=test1 ;
by trta stdy  ;
cdfplot ELISA;
run;
ods select all;

data cdfplot;
 set cdfplot;
 inv_ECDFY=1-ECDFY*0.01;
run;

title;
ods graphics/reset attrpriority=none;
proc sgpanel data=cdfplot;
panelby  stdy /layout=panel  rows=4;
step x=ECDFX y=inv_ECDFY/group=trta markers;&lt;BR /&gt;keylegend /position=right across=1;&lt;BR /&gt;
run;&lt;/CODE&gt;&lt;/PRE&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="Ksharp_0-1656155150221.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/72736i6F2F5A51C02717F2/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Ksharp_0-1656155150221.png" alt="Ksharp_0-1656155150221.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 25 Jun 2022 11:05:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Plot-reverse-cumulative-distributions-paneled-by-study-day/m-p/820362#M323795</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2022-06-25T11:05:57Z</dc:date>
    </item>
  </channel>
</rss>

