<?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: Interpretation of lsmeans in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/Interpretation-of-lsmeans/m-p/936782#M46749</link>
    <description>&lt;P&gt;The significant interaction tells you that the difference in the SES groups changes depending on the distance, or equivalently that the effect of distance depends SES - think of the slope of the two distance curves for the SES levels at each of various values of distance. But note that you are talking about the SES difference or the distance effect in terms of the log odds, not the event probability.&amp;nbsp;This is discussed in more detail in &lt;A href="https://support.sas.com/kb/24/177.html" target="_self"&gt;this note&lt;/A&gt;. See, in particular, the Poisson model example on rates and the use of the Margins macro at the end which compares the event probabilities at selected values of the continuous predictor (as well as compares slopes). A similar approach can be used for your logistic model. Note also the use of the EFFECTPLOT statement to plot the predicted log odds or predicted probabilities.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 23 Jul 2024 14:54:13 GMT</pubDate>
    <dc:creator>StatDave</dc:creator>
    <dc:date>2024-07-23T14:54:13Z</dc:date>
    <item>
      <title>Interpretation of lsmeans</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Interpretation-of-lsmeans/m-p/936709#M46741</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I ran a logistic regression model assessing the interaction between distance (a continuous variable) and SES (a categorical variable with two levels). I then wanted to calculate the predicted probabilities of the outcome for each level of the interaction. However, I understand that this cannot be done with a continuous variable in the interaction term. Thus, I used the lsmeans command to evaluate the predicted probability of each level of the interaction term at specific values of distance. My question is regarding the interpretation of the output. My interaction term was significant in my original logistic regression model such that the interaction between distance and the second level of SES were significantly associated with the outcome when the interaction between distance and the first level was the reference. However, once I calculated the predicted probabilities, these values were not significantly different from one another. Does this mean that overall, as distance changes, there is an association with the outcome among those in the second SES group, but that at these specific values of distance, there is no difference between the two groups?&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;STRONG&gt;proc&lt;/STRONG&gt;&lt;/SPAN&gt; &lt;SPAN&gt;&lt;STRONG&gt;logistic&lt;/STRONG&gt;&lt;/SPAN&gt; &lt;SPAN&gt;data&lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;"H:\desktop\DataAnalysis" &lt;SPAN&gt;descending&lt;/SPAN&gt;&lt;SPAN&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;class&lt;/SPAN&gt; &amp;nbsp;SES (&lt;SPAN&gt;ref&lt;/SPAN&gt;=&lt;SPAN&gt;'1'&lt;/SPAN&gt;) /&lt;SPAN&gt;param&lt;/SPAN&gt;=ref;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;model&lt;/SPAN&gt; stage = SES | distance&amp;nbsp;;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;where&lt;/SPAN&gt; sample = &lt;SPAN&gt;&lt;STRONG&gt;1&lt;/STRONG&gt;&lt;/SPAN&gt;;&lt;SPAN class=""&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;SPAN&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;STRONG&gt;proc&lt;/STRONG&gt;&lt;/SPAN&gt; &lt;SPAN&gt;&lt;STRONG&gt;logistic&lt;/STRONG&gt;&lt;/SPAN&gt; &lt;SPAN&gt;data&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;"H:\desktop\DataAnalysis" &lt;SPAN&gt;descending&lt;/SPAN&gt;&lt;SPAN&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;class&lt;/SPAN&gt; &amp;nbsp;SES (&lt;SPAN&gt;ref&lt;/SPAN&gt;=&lt;SPAN&gt;'1'&lt;/SPAN&gt;) &amp;nbsp;/&lt;SPAN&gt;param&lt;/SPAN&gt;=glm;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;model&lt;/SPAN&gt; stage = SES | distance&amp;nbsp;;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;lsmeans&lt;/SPAN&gt; SES/ &lt;SPAN&gt;at&lt;/SPAN&gt; distance=&lt;SPAN&gt;&lt;STRONG&gt;2.67&lt;/STRONG&gt;&lt;/SPAN&gt; &lt;SPAN&gt;ilink&lt;/SPAN&gt; &lt;SPAN&gt;or&lt;/SPAN&gt; &lt;SPAN&gt;cl&lt;/SPAN&gt; diff;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;lsmeans&lt;/SPAN&gt; SES/ &lt;SPAN&gt;at&lt;/SPAN&gt; distance=&lt;SPAN&gt;&lt;STRONG&gt;7.60&lt;/STRONG&gt;&lt;/SPAN&gt; &lt;SPAN&gt;ilink&lt;/SPAN&gt; &lt;SPAN&gt;or&lt;/SPAN&gt; &lt;SPAN&gt;cl&lt;/SPAN&gt; diff;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;lsmeans&lt;/SPAN&gt; SES/ &lt;SPAN&gt;at&lt;/SPAN&gt; distance=&lt;SPAN&gt;&lt;STRONG&gt;24.51&lt;/STRONG&gt;&lt;/SPAN&gt; &lt;SPAN&gt;ilink&lt;/SPAN&gt; &lt;SPAN&gt;or&lt;/SPAN&gt; &lt;SPAN&gt;cl&lt;/SPAN&gt; diff;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;where&lt;/SPAN&gt; sample = &lt;SPAN&gt;&lt;STRONG&gt;1&lt;/STRONG&gt;&lt;/SPAN&gt;;&lt;SPAN class=""&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;SPAN&gt;;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 23 Jul 2024 03:00:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Interpretation-of-lsmeans/m-p/936709#M46741</guid>
      <dc:creator>eajanio</dc:creator>
      <dc:date>2024-07-23T03:00:59Z</dc:date>
    </item>
    <item>
      <title>Re: Interpretation of lsmeans</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Interpretation-of-lsmeans/m-p/936739#M46742</link>
      <description>&lt;BLOCKQUOTE&gt;
&lt;P&gt;I then wanted to calculate the predicted probabilities of the outcome for each level of the interaction. However, I understand that this cannot be done with a continuous variable in the interaction term.&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This is not correct. Predicted values can be created from any model. If you are using PROC LOGISTIC, you can do this using the OUTPUT statement, and several other ways. See:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://blogs.sas.com/content/iml/2014/02/17/the-missing-value-trick-for-scoring-a-regression-model.html" target="_blank" rel="noopener"&gt;https://blogs.sas.com/content/iml/2014/02/17/the-missing-value-trick-for-scoring-a-regression-model.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://blogs.sas.com/content/iml/2014/02/19/scoring-a-regression-model-in-sas.html" target="_blank" rel="noopener"&gt;https://blogs.sas.com/content/iml/2014/02/19/scoring-a-regression-model-in-sas.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You will have to specify values of the continuous variable to predict at, as you tried to do using LSMEANS. You could also use the &lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.4/statug/statug_logistic_syntax13.htm" target="_self"&gt;EFFECTPLOT&lt;/A&gt; statement to draw a picture of the interaction. To answer your question about the LSMEANS: in this case, the LSMEANS would be on the lines shown in the plot of the Interaction.&lt;/P&gt;</description>
      <pubDate>Tue, 23 Jul 2024 13:10:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Interpretation-of-lsmeans/m-p/936739#M46742</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2024-07-23T13:10:19Z</dc:date>
    </item>
    <item>
      <title>Re: Interpretation of lsmeans</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Interpretation-of-lsmeans/m-p/936758#M46744</link>
      <description>&lt;P&gt;Thank you for your reply. Would the predicted probabilities produced here be different than those I've obtained with my code?&lt;/P&gt;</description>
      <pubDate>Tue, 23 Jul 2024 13:39:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Interpretation-of-lsmeans/m-p/936758#M46744</guid>
      <dc:creator>eajanio</dc:creator>
      <dc:date>2024-07-23T13:39:19Z</dc:date>
    </item>
    <item>
      <title>Re: Interpretation of lsmeans</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Interpretation-of-lsmeans/m-p/936772#M46746</link>
      <description>&lt;P&gt;Please provide more information. Please explain what you did. Please provide code. Please provide output.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The predicted values that SAS produces, I assume, are correct. If you are obtaining different predicted values, I would assume you have made a mistake somewhere.&lt;/P&gt;</description>
      <pubDate>Tue, 23 Jul 2024 14:19:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Interpretation-of-lsmeans/m-p/936772#M46746</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2024-07-23T14:19:10Z</dc:date>
    </item>
    <item>
      <title>Re: Interpretation of lsmeans</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Interpretation-of-lsmeans/m-p/936782#M46749</link>
      <description>&lt;P&gt;The significant interaction tells you that the difference in the SES groups changes depending on the distance, or equivalently that the effect of distance depends SES - think of the slope of the two distance curves for the SES levels at each of various values of distance. But note that you are talking about the SES difference or the distance effect in terms of the log odds, not the event probability.&amp;nbsp;This is discussed in more detail in &lt;A href="https://support.sas.com/kb/24/177.html" target="_self"&gt;this note&lt;/A&gt;. See, in particular, the Poisson model example on rates and the use of the Margins macro at the end which compares the event probabilities at selected values of the continuous predictor (as well as compares slopes). A similar approach can be used for your logistic model. Note also the use of the EFFECTPLOT statement to plot the predicted log odds or predicted probabilities.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 23 Jul 2024 14:54:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Interpretation-of-lsmeans/m-p/936782#M46749</guid>
      <dc:creator>StatDave</dc:creator>
      <dc:date>2024-07-23T14:54:13Z</dc:date>
    </item>
  </channel>
</rss>

