<?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 Error Bars for Interaction Assessment in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Error-Bars-for-Interaction-Assessment/m-p/904153#M357224</link>
    <description>&lt;P&gt;&lt;EM&gt;Hello, I am looking at significant interaction and want to produce error bars in SAS. I&amp;nbsp; am using PROC LOGISTIC and I used the LRT test to determine significant interactions. I will include a sample diagram of what the graphs should look like.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc logistic data=multi descending;&lt;BR /&gt;class damage(ref=first) smell(ref=first) smokeinlive(ref=first) employ(ref=first) pain(ref=first) clinicalinsomnia(ref=first) sleepquality1(ref=first) everasthma(ref=first) evercb(ref=first) evercopd(ref=first) depression(ref=first) everptsd(ref=first)/param=reference;&lt;BR /&gt;model everanxiety=damage smell smokeinlive employ clinicalinsomnia sleepquality1 pain everasthma evercb evercopd depression everptsd employ*sleepquality1 smokeinlive*sleepquality1;&lt;BR /&gt;run;&lt;/P&gt;</description>
    <pubDate>Tue, 21 Nov 2023 21:39:18 GMT</pubDate>
    <dc:creator>Madame_O</dc:creator>
    <dc:date>2023-11-21T21:39:18Z</dc:date>
    <item>
      <title>Error Bars for Interaction Assessment</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Error-Bars-for-Interaction-Assessment/m-p/904153#M357224</link>
      <description>&lt;P&gt;&lt;EM&gt;Hello, I am looking at significant interaction and want to produce error bars in SAS. I&amp;nbsp; am using PROC LOGISTIC and I used the LRT test to determine significant interactions. I will include a sample diagram of what the graphs should look like.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc logistic data=multi descending;&lt;BR /&gt;class damage(ref=first) smell(ref=first) smokeinlive(ref=first) employ(ref=first) pain(ref=first) clinicalinsomnia(ref=first) sleepquality1(ref=first) everasthma(ref=first) evercb(ref=first) evercopd(ref=first) depression(ref=first) everptsd(ref=first)/param=reference;&lt;BR /&gt;model everanxiety=damage smell smokeinlive employ clinicalinsomnia sleepquality1 pain everasthma evercb evercopd depression everptsd employ*sleepquality1 smokeinlive*sleepquality1;&lt;BR /&gt;run;&lt;/P&gt;</description>
      <pubDate>Tue, 21 Nov 2023 21:39:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Error-Bars-for-Interaction-Assessment/m-p/904153#M357224</guid>
      <dc:creator>Madame_O</dc:creator>
      <dc:date>2023-11-21T21:39:18Z</dc:date>
    </item>
    <item>
      <title>Re: Error Bars for Interaction Assessment</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Error-Bars-for-Interaction-Assessment/m-p/904277#M357283</link>
      <description>&lt;P&gt;One way to do this is to use the EFFECTPLOT statement and ask for an interaction plot. Notice that since you have more than two explanatory variables, you must specify values for the variables that do not appear in the plot. There are several ways to do this, but PROC PLM will choose the reference values by default, which is probably what you want.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Since I don't have your data, here is an example that shows how to get the plot for some data in the Sashelp.cars data set:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data cars;
set sashelp.cars;
Y = (origin='Asia');   /* make binary response var */
if type not in ('Hybrid','Truck') AND cylinders in (4,6);
run;

proc logistic data=cars descending;
class Type(ref=first) Cylinders(ref=first) DriveTrain(ref=first) / param=reference;
model Y = Type Cylinders DriveTrain Type*Cylinders;
store logiModel;
run;

/* plot interactions. See
   https://blogs.sas.com/content/iml/2019/05/30/visualize-interaction-effects-regression.html
*/
proc plm restore=logiModel noinfo;
   effectplot interaction(x=Type sliceby=DriveTrain) / cluster clm connect; 
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="InteractionPlot1.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/90109i0609CAA55B95BA9E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="InteractionPlot1.png" alt="InteractionPlot1.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt; &lt;/P&gt;
&lt;P&gt;If you don't want the default choices for the other explanatory variables, you can use the AT= option to override the default:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc plm restore=logiModel noinfo;
   effectplot interaction(x=Type sliceby=DriveTrain) / at(Cylinders='6') cluster clm connect; 
run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;For more information about the EFFECTPLOT and PROC PLM, see&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;A href="https://blogs.sas.com/content/iml/2016/06/22/sas-effectplot-statement.html" target="_blank"&gt;Use the EFFECTPLOT statement to visualize regression models in SAS - The DO Loop&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;A href="https://blogs.sas.com/content/iml/2017/12/18/visualize-multivariate-regression-models-by-slicing-continuous-variables.html" target="_blank"&gt;Visualize multivariate regression models by slicing continuous variables - The DO Loop (sas.com)&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;A href="https://blogs.sas.com/content/iml/2019/05/30/visualize-interaction-effects-regression.html" target="_blank"&gt;Visualize interaction effects in regression models - The DO Loop (sas.com)&lt;/A&gt;&lt;/LI&gt;
&lt;/UL&gt;</description>
      <pubDate>Wed, 22 Nov 2023 19:25:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Error-Bars-for-Interaction-Assessment/m-p/904277#M357283</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2023-11-22T19:25:09Z</dc:date>
    </item>
    <item>
      <title>Re: Error Bars for Interaction Assessment</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Error-Bars-for-Interaction-Assessment/m-p/906577#M357957</link>
      <description>&lt;P&gt;Sorry for the late response, I was able to figure it out before anyone saw the post. But thank you so much!&lt;/P&gt;</description>
      <pubDate>Wed, 06 Dec 2023 18:57:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Error-Bars-for-Interaction-Assessment/m-p/906577#M357957</guid>
      <dc:creator>Madame_O</dc:creator>
      <dc:date>2023-12-06T18:57:36Z</dc:date>
    </item>
  </channel>
</rss>

