<?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: Proc plm effectplot change colors in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/Proc-plm-effectplot-change-colors/m-p/586426#M18834</link>
    <description>&lt;P&gt;Thanks a lot! By using the OUTPM= statement and proc sgpanel I can produce the interaction plots I wanna have.&lt;/P&gt;</description>
    <pubDate>Thu, 05 Sep 2019 14:02:42 GMT</pubDate>
    <dc:creator>Magdal3na</dc:creator>
    <dc:date>2019-09-05T14:02:42Z</dc:date>
    <item>
      <title>Proc plm effectplot change colors</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Proc-plm-effectplot-change-colors/m-p/586392#M18830</link>
      <description>&lt;P&gt;Hey all,&lt;/P&gt;&lt;P&gt;I'm creating effectplots via proc plm and I'd like to adjust the colors in the graph. My statement includes 'sliceby=a'. A is a class variable with 3 levels, I want to assign a color to each level and the lines in the graph to be displayed in that color.&lt;/P&gt;&lt;P&gt;No method to alter plots I know worked. Proc plm doesn't accept templates, further I tried to alter the 'Stat.PLM.Graphics.IntPlot' template. symbol1 color=.... doeesn't work either.&lt;/P&gt;&lt;P&gt;My SAS Version in use is 9.4 (TS1M2).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Anyone has an idea how to change the colors?&lt;/P&gt;&lt;P&gt;Thank you in advance!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods graphics on; ods exclude Storeinfo classlevels;
   proc plm source=model1;
   effectplot interaction(x=time sliceby=a plotby=b)/ clm connect; run;
ods graphics off;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is the model I store:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods graphics on; ods exclude iterhistory  FitStatistics lsmeans diffs; 
	 proc mixed data=longr PLOTS(only)=PEARSONPANEL(conditional) covtest ; where a&amp;lt;4 and vessel=2 and t&amp;lt;&amp;gt;0; 
  class a id ide time vessel b;
      model particles = time a b time*a time*b a*b time*a*b/ ddfm=kr  residual ; 
	  random intercept / subject=ide(id)  type=un; repeated time/ subject=ide(id)  type=arh(1);
lsmeans time a b time*a time*b a*b time*a*b/diff ; ods output diffs=diffs1;  
store model1; run; ods graphics off;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 05 Sep 2019 13:20:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Proc-plm-effectplot-change-colors/m-p/586392#M18830</guid>
      <dc:creator>Magdal3na</dc:creator>
      <dc:date>2019-09-05T13:20:06Z</dc:date>
    </item>
    <item>
      <title>Re: Proc plm effectplot change colors</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Proc-plm-effectplot-change-colors/m-p/586410#M18831</link>
      <description>&lt;P&gt;Please provide the procedure code that contains the STORE statement that generates the item store for the model.&lt;/P&gt;</description>
      <pubDate>Thu, 05 Sep 2019 13:09:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Proc-plm-effectplot-change-colors/m-p/586410#M18831</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2019-09-05T13:09:03Z</dc:date>
    </item>
    <item>
      <title>Re: Proc plm effectplot change colors</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Proc-plm-effectplot-change-colors/m-p/586413#M18832</link>
      <description>&lt;P&gt;Added it to the original post.&lt;/P&gt;</description>
      <pubDate>Thu, 05 Sep 2019 13:21:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Proc-plm-effectplot-change-colors/m-p/586413#M18832</guid>
      <dc:creator>Magdal3na</dc:creator>
      <dc:date>2019-09-05T13:21:00Z</dc:date>
    </item>
    <item>
      <title>Re: Proc plm effectplot change colors</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Proc-plm-effectplot-change-colors/m-p/586420#M18833</link>
      <description>&lt;P&gt;I can think of two ways. The first is to create your own style. I don't have much experience with that. The second way is to output the predicted values by using the OUTPM= option on the MODEL statement, then use PROC SGPLOT or PROC SGPANEL to create the graph.&amp;nbsp; &lt;A href="https://blogs.sas.com/content/graphicallyspeaking/2018/10/08/getting-started-with-sgplot-part-13-style-attributes/" target="_self"&gt;Both procedures support the STYLEATTRS statement&lt;/A&gt;, which you can use to assign group colors, line patterns, and more. You'll need to sort by the X variable:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc mixed data=longr; 
   class a time b;
   model particles = time a b time*a time*b a*b time*a*b/ ddfm=kr  residual outpm=mixedout; 
run;

proc sort data=mixedout; by b a time; run;

proc sgpanel data=mixedout;
styleattrs datacontrastcolors=(magenta blue gold);
panelby b;
scatter x=time y=Pred / yerrorlower=lower yerrorupper=upper group=a;
series x=time y=Pred / group=a;
rowaxis grid;
colaxis grid;
run;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 05 Sep 2019 13:48:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Proc-plm-effectplot-change-colors/m-p/586420#M18833</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2019-09-05T13:48:32Z</dc:date>
    </item>
    <item>
      <title>Re: Proc plm effectplot change colors</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Proc-plm-effectplot-change-colors/m-p/586426#M18834</link>
      <description>&lt;P&gt;Thanks a lot! By using the OUTPM= statement and proc sgpanel I can produce the interaction plots I wanna have.&lt;/P&gt;</description>
      <pubDate>Thu, 05 Sep 2019 14:02:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Proc-plm-effectplot-change-colors/m-p/586426#M18834</guid>
      <dc:creator>Magdal3na</dc:creator>
      <dc:date>2019-09-05T14:02:42Z</dc:date>
    </item>
    <item>
      <title>Re: Proc plm effectplot change colors</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Proc-plm-effectplot-change-colors/m-p/587298#M18850</link>
      <description>&lt;P&gt;For other tips regarding visualizing mixed models, see the article &lt;A href="https://blogs.sas.com/content/iml/2018/12/19/visualize-mixed-model.html" target="_self"&gt;"Visualize a mixed model that has repeated measures or random coefficients."&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 09 Sep 2019 16:25:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Proc-plm-effectplot-change-colors/m-p/587298#M18850</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2019-09-09T16:25:41Z</dc:date>
    </item>
  </channel>
</rss>

