<?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 PROC MIXED Continuous x Continuous interaction in PROC SGPLOT in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/Plotting-PROC-MIXED-Continuous-x-Continuous-interaction-in-PROC/m-p/739728#M35936</link>
    <description>&lt;P&gt;Hello &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/381106"&gt;@wab13&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;Welcome to the communities!&lt;/P&gt;
&lt;P&gt;I understand why you have posted your question to the Visual Analytics board, but Visual Analytics is a browser-based Business Intelligence product from SAS that you probably don't have (as you are mistakenly using this channel for a SGPLOT question).&lt;/P&gt;
&lt;P&gt;Anyway, Visual Analytics (commonly abbreviated as VA) is not suitable for answering your question.&lt;/P&gt;
&lt;P&gt;Your SGPLOT-question belongs to the 'Graphics Programming' board under the Programming drop-down list.&lt;/P&gt;
&lt;P&gt;Unfortunately I don't have the super-powers to move it (from one board to the other), but it will probably be done by someone else (like a community manager).&lt;/P&gt;
&lt;P&gt;I have no time today to write you an example program but if the question is not answered by tomorrow (which would surprise me), I will post an answer tomorrow (or on Monday).&lt;/P&gt;
&lt;P&gt;Cheers,&lt;/P&gt;
&lt;P&gt;Koen&lt;/P&gt;</description>
    <pubDate>Fri, 07 May 2021 09:45:42 GMT</pubDate>
    <dc:creator>sbxkoenk</dc:creator>
    <dc:date>2021-05-07T09:45:42Z</dc:date>
    <item>
      <title>Plotting PROC MIXED Continuous x Continuous interaction in PROC SGPLOT</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Plotting-PROC-MIXED-Continuous-x-Continuous-interaction-in-PROC/m-p/739645#M35935</link>
      <description>&lt;P&gt;I'm running a random intercept model with a continuous outcome and continuous-continuous interaction term. It is panel data with 3 time points:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;PROC MIXED covtest noclprint data = wab.data1 method=ml ;&lt;BR /&gt;    class ID cov2(ref='1') time(ref="0") cov1;&lt;BR /&gt;    model GSI = time es TIS es*TIS soc &lt;BR /&gt;          cov1 cov2 cov3 cov4 cov5 /s ddfm = SATTERTHWAITE CL OUTPREDM=Pred;&lt;BR /&gt;    random intercept /sub=ID type=un g;&lt;BR /&gt;    store Model;&lt;BR /&gt;run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And plotting the significant interaction with PROC GLM at M-1SD and M+1SD values of one of the variables in the interaction term:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;PROC PLM source=Model ;
effectplot slicefit(x=ES sliceby=TIS=4.24 6.22);
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="plot I want, but not looking good" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/59118i106747DCD4ECC9F0/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Capture1.PNG" alt="plot I want, but not looking good" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;plot I want, but not looking good&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Is there a way to customize the looks of the plot (change axis labels, colors, etc.)?&lt;/P&gt;&lt;P&gt;I've seen other posts recommending using the OUTPREDM option and use PROC SGPLOT instead of PROC GLM, but the outcome is&lt;SPAN style="font-family: inherit;"&gt;&amp;nbsp;not what I want.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sgplot data=Pred;             
   series x=ES y=Pred / group=TIS;  
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;SPAN style="font-family: inherit;"&gt;So is there an easy way to create a stored data with PROC MIXED coefficients for PROC SGPLOT?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="not what I want, but at least I can customize the looks" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/59117i6C83E92FDF1471F0/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Capture2.PNG" alt="not what I want, but at least I can customize the looks" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;not what I want, but at least I can customize the looks&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 06 May 2021 21:08:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Plotting-PROC-MIXED-Continuous-x-Continuous-interaction-in-PROC/m-p/739645#M35935</guid>
      <dc:creator>wab13</dc:creator>
      <dc:date>2021-05-06T21:08:06Z</dc:date>
    </item>
    <item>
      <title>Re: Plotting PROC MIXED Continuous x Continuous interaction in PROC SGPLOT</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Plotting-PROC-MIXED-Continuous-x-Continuous-interaction-in-PROC/m-p/739728#M35936</link>
      <description>&lt;P&gt;Hello &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/381106"&gt;@wab13&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;Welcome to the communities!&lt;/P&gt;
&lt;P&gt;I understand why you have posted your question to the Visual Analytics board, but Visual Analytics is a browser-based Business Intelligence product from SAS that you probably don't have (as you are mistakenly using this channel for a SGPLOT question).&lt;/P&gt;
&lt;P&gt;Anyway, Visual Analytics (commonly abbreviated as VA) is not suitable for answering your question.&lt;/P&gt;
&lt;P&gt;Your SGPLOT-question belongs to the 'Graphics Programming' board under the Programming drop-down list.&lt;/P&gt;
&lt;P&gt;Unfortunately I don't have the super-powers to move it (from one board to the other), but it will probably be done by someone else (like a community manager).&lt;/P&gt;
&lt;P&gt;I have no time today to write you an example program but if the question is not answered by tomorrow (which would surprise me), I will post an answer tomorrow (or on Monday).&lt;/P&gt;
&lt;P&gt;Cheers,&lt;/P&gt;
&lt;P&gt;Koen&lt;/P&gt;</description>
      <pubDate>Fri, 07 May 2021 09:45:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Plotting-PROC-MIXED-Continuous-x-Continuous-interaction-in-PROC/m-p/739728#M35936</guid>
      <dc:creator>sbxkoenk</dc:creator>
      <dc:date>2021-05-07T09:45:42Z</dc:date>
    </item>
    <item>
      <title>Re: Plotting PROC MIXED Continuous x Continuous interaction in PROC SGPLOT</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Plotting-PROC-MIXED-Continuous-x-Continuous-interaction-in-PROC/m-p/739799#M35937</link>
      <description>&lt;P&gt;You say "the outcome is not what I want," but what do you want?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Some ways to visualize mixed models are presented in 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."&amp;nbsp;&lt;/A&gt;&amp;nbsp;Maybe that will get you started.&lt;/P&gt;</description>
      <pubDate>Fri, 07 May 2021 15:11:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Plotting-PROC-MIXED-Continuous-x-Continuous-interaction-in-PROC/m-p/739799#M35937</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2021-05-07T15:11:50Z</dc:date>
    </item>
    <item>
      <title>Re: Plotting PROC MIXED Continuous x Continuous interaction in PROC SGPLOT</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Plotting-PROC-MIXED-Continuous-x-Continuous-interaction-in-PROC/m-p/739800#M35938</link>
      <description>&lt;P&gt;Yes, this blog post was extremely helpful to get me where I'm at now (that's where I got the code I pasted above).&lt;/P&gt;&lt;P&gt;Given the multiple lines, it seems to me that the second figure displays the relationship between x (es) and y (gsi) across the different clusters (individuals) -- random effects.&amp;nbsp;&lt;/P&gt;&lt;P&gt;But I'm not interested in displaying random effects, just average effects of X on Y by levels of moderator. I'm looking for something very similar to the first figure I posted (i.e. predictions of y [GSI] by x [ES] grouped by arbitrary levels of the moderator [TIS] -- like mean-1SD and mean+1SD), but would like to edit axis labels, legends, line colors. I read in other posts to the community that it is a bit harder to do that in PROC PLM than in PROC SGPLOT, but I haven't been able to send output of my models to PROC SGPLOT.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've been struggling to get at that with the code and examples in the blog post you pasted. I even thought about creating line graphs in Excel based on coefficients in the output, but was unsure if in mixed-effects models the coefficient of X would be (b+d) as in OLS regression (Y = a + bX + cM + dX*M) given the random intercept in my model&lt;SPAN style="font-family: inherit;"&gt;.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Plus I am really interested in learning to do this in SAS given that I have to do similar graphs often in my research.&lt;/P&gt;</description>
      <pubDate>Fri, 07 May 2021 15:31:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Plotting-PROC-MIXED-Continuous-x-Continuous-interaction-in-PROC/m-p/739800#M35938</guid>
      <dc:creator>wab13</dc:creator>
      <dc:date>2021-05-07T15:31:23Z</dc:date>
    </item>
    <item>
      <title>Re: Plotting PROC MIXED Continuous x Continuous interaction in PROC SGPLOT</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Plotting-PROC-MIXED-Continuous-x-Continuous-interaction-in-PROC/m-p/739804#M35939</link>
      <description>&lt;P&gt;Again, I cannot help you today (no time), but I will check the status of this track early next week and will post something if (still needed).&lt;/P&gt;
&lt;P&gt;If you want to learn about visuals with SAS (SG-procedures) then certainly follow this blog:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://blogs.sas.com/content/graphicallyspeaking/" target="_blank"&gt;https://blogs.sas.com/content/graphicallyspeaking/&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Also, search all blogs for the string 'visual'. It will also bring up many entries on Visual Analytics.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://blogs.sas.com/content/?s=visual" target="_blank"&gt;https://blogs.sas.com/content/?s=visual&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Cheers,&lt;/P&gt;
&lt;P&gt;Koen&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 07 May 2021 15:41:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Plotting-PROC-MIXED-Continuous-x-Continuous-interaction-in-PROC/m-p/739804#M35939</guid>
      <dc:creator>sbxkoenk</dc:creator>
      <dc:date>2021-05-07T15:41:58Z</dc:date>
    </item>
    <item>
      <title>Re: Plotting PROC MIXED Continuous x Continuous interaction in PROC SGPLOT</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Plotting-PROC-MIXED-Continuous-x-Continuous-interaction-in-PROC/m-p/739814#M35941</link>
      <description>&lt;P&gt;In the article, near the end, it says&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;It is worth noting that the MODEL statement in PROC MIXED also supports an &lt;FONT color="#FF0000"&gt;OUTPREDM= option&lt;/FONT&gt;. (The 'M' stands for 'marginal' model.) &lt;FONT color="#FF0000"&gt;The OUTPREDM= option writes a data set that contains the predictions that do not "incorporate the EBLUP values",&lt;/FONT&gt; where EBLUP is an abbreviation for the "empirical best linear unbiased prediction." These are the same predicted values that you obtain from the STORE statement and PROC PLM. However, the OUTPREDM= data set gives you complete control over how you use the predicted values. For example, you can use the OUTPREDM= data set to add the original observations to the graph of the predicted values for boys and girls.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So in your PROC MIXED code, use the OUTPRED&lt;FONT color="#FF0000"&gt;M&lt;/FONT&gt;= option instead of the OUTPRED= option.&lt;/P&gt;</description>
      <pubDate>Fri, 07 May 2021 15:59:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Plotting-PROC-MIXED-Continuous-x-Continuous-interaction-in-PROC/m-p/739814#M35941</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2021-05-07T15:59:41Z</dc:date>
    </item>
    <item>
      <title>Re: Plotting PROC MIXED Continuous x Continuous interaction in PROC SGPLOT</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Plotting-PROC-MIXED-Continuous-x-Continuous-interaction-in-PROC/m-p/739825#M35942</link>
      <description>&lt;P&gt;Ugh! Sorry for being dense, but I tried this above and got the graph with multiple lines that I pasted above.&lt;/P&gt;&lt;P&gt;Doing it again now, the only difference were that the lines had different colors, which I think are to show all possible levels of TIS.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture3.PNG" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/59134i5A4CB20B8CC2183A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Capture3.PNG" alt="Capture3.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc mixed covtest noclprint data = wab.data1 method=ml ;
class ID cov2(ref='1') cov1(ref="0") cov3;
model GSI = es TIS es*TIS time cov1 cov2 cov3 cov4 cov5 
	  /s ddfm = SATTERTHWAITE CL outpredm=MargPreds;
random intercept /sub=ID type=un g;
run;

proc sgplot data=MargPreds;             
   series x=ES y=Pred / group=TIS; 
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 07 May 2021 16:09:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Plotting-PROC-MIXED-Continuous-x-Continuous-interaction-in-PROC/m-p/739825#M35942</guid>
      <dc:creator>wab13</dc:creator>
      <dc:date>2021-05-07T16:09:53Z</dc:date>
    </item>
    <item>
      <title>Re: Plotting PROC MIXED Continuous x Continuous interaction in PROC SGPLOT</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Plotting-PROC-MIXED-Continuous-x-Continuous-interaction-in-PROC/m-p/739850#M35943</link>
      <description>&lt;P&gt;Think about what you are doing. You have multiple covariates in your model. If you evaluate the model on the original observations, you are seeing the predicted values for the fixed effects, evaluated at each observation. That is why you see all these jagged line: They correspond to the predicted values at a diverse set of explanatory variables.&amp;nbsp; This is explained in the article &lt;A href="https://blogs.sas.com/content/iml/2017/12/18/visualize-multivariate-regression-models-by-slicing-continuous-variables.html" target="_self"&gt;"Visualize multivariate regression models by slicing continuous variables,"&lt;/A&gt; especially the second example in that article.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;That is why the&amp;nbsp;EFFECTPLOT SLICEFIT statement is so powerful. It provides a syntax to set the value of the covariates (to means or to specific values) while varying just one of the continuous covariates. This results in a "slice" through the regression surface.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://blogs.sas.com/content/iml/2017/12/20/create-sliced-fit-plot-sas.html" target="_self"&gt;You can manually create a sliced plot by scoring the model&lt;/A&gt;, but I encourage you to use the EFFECTPLOT statement, if possible, since it is easier. For more examples of using the EFFECTPLOT statement, see &lt;A href="https://blogs.sas.com/content/iml/2016/06/22/sas-effectplot-statement.html" target="_self"&gt;"Use the EFFECTPLOT statement to visualize regression models in SAS."&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you can't figure it out from those examples, you will have to plot some sample data and PROC MIXED code that its the data.&lt;/P&gt;</description>
      <pubDate>Fri, 07 May 2021 17:37:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Plotting-PROC-MIXED-Continuous-x-Continuous-interaction-in-PROC/m-p/739850#M35943</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2021-05-07T17:37:29Z</dc:date>
    </item>
  </channel>
</rss>

