<?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: simple slopes PROC PLM versus calculating by hand in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/simple-slopes-PROC-PLM-versus-calculating-by-hand/m-p/925937#M46050</link>
    <description>Did you try LSMESTIMATE ,not ESTIMATE ?</description>
    <pubDate>Fri, 26 Apr 2024 03:11:06 GMT</pubDate>
    <dc:creator>Ksharp</dc:creator>
    <dc:date>2024-04-26T03:11:06Z</dc:date>
    <item>
      <title>simple slopes PROC PLM versus calculating by hand</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/simple-slopes-PROC-PLM-versus-calculating-by-hand/m-p/925917#M46049</link>
      <description>&lt;P&gt;Before I realized PROC PLM was a thing for getting simple slopes, I was taught how to get them from the proc mixed output by combining the estimates available there.&amp;nbsp; I'm now noticing that one estimate is consistently different.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Let's say we have data A B and M, where A is categorical with 2 levels, B is categorical with 2 levels, and M is continuous.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to get the slope for M at:&amp;nbsp;&lt;/P&gt;&lt;P&gt;A1B1&lt;/P&gt;&lt;P&gt;A2B1&lt;/P&gt;&lt;P&gt;A1B2&lt;/P&gt;&lt;P&gt;A2B2 (reference)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The default reference for categorical is the last value so A2B2 is the reference. If you calculate by hand from the solution for fixed effects, the values are the same for A2B2, A2B1, and A1B2 but wildly different for A1B1 and I can't for the life of me figure out why. For example:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="rhampton16_0-1714093022011.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/95904i810B207DBC61C98B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="rhampton16_0-1714093022011.png" alt="rhampton16_0-1714093022011.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;A2B2 is -.2300 (same in PLM)&lt;/P&gt;&lt;P&gt;A2B1 is -.2300 + 1.4324 = 1.2033 (1.2024 in PLM)&lt;/P&gt;&lt;P&gt;A1B2 is -.2300 + .4836 = .2555 (.2535 in PLM)&lt;/P&gt;&lt;P&gt;using the same method, A1B1 would be -.2300 + -1.3125 = -1.542&lt;/P&gt;&lt;P&gt;using PLM, A1B1 is .3735&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here's my syntax for the estimates:&lt;/P&gt;&lt;P&gt;estimate 'medinc x Target1 x stim1' medinc 1 medinc*target 0 1 medinc*stim 0 1 medinc*target*stim 0 0 0 1,&lt;BR /&gt;'medinc x Target1 x stim2' medinc 1 medinc*target 0 1 medinc*stim 1 0 medinc*target*stim 0 0 1 0,&lt;BR /&gt;'medinc x Target2 x stim1' medinc 1 medinc*target 1 0 medinc*stim 0 1 medinc*target*stim 0 1 0 0,&lt;BR /&gt;'medinc x Target2 x stim2' medinc 1 medinc*target 1 0 medinc*stim 1 0 medinc*target*stim 1 0 0 0 /e;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Does anyone understand the difference? What is the value in the solution for A1B1 if not the comparison to the joint reference?&lt;/P&gt;</description>
      <pubDate>Fri, 26 Apr 2024 02:23:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/simple-slopes-PROC-PLM-versus-calculating-by-hand/m-p/925917#M46049</guid>
      <dc:creator>rhampton16</dc:creator>
      <dc:date>2024-04-26T02:23:19Z</dc:date>
    </item>
    <item>
      <title>Re: simple slopes PROC PLM versus calculating by hand</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/simple-slopes-PROC-PLM-versus-calculating-by-hand/m-p/925937#M46050</link>
      <description>Did you try LSMESTIMATE ,not ESTIMATE ?</description>
      <pubDate>Fri, 26 Apr 2024 03:11:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/simple-slopes-PROC-PLM-versus-calculating-by-hand/m-p/925937#M46050</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2024-04-26T03:11:06Z</dc:date>
    </item>
    <item>
      <title>Re: simple slopes PROC PLM versus calculating by hand</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/simple-slopes-PROC-PLM-versus-calculating-by-hand/m-p/925940#M46051</link>
      <description>I believe that's just for means from CLASS variables, no? I'm looking at simple slopes.</description>
      <pubDate>Fri, 26 Apr 2024 03:51:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/simple-slopes-PROC-PLM-versus-calculating-by-hand/m-p/925940#M46051</guid>
      <dc:creator>rhampton16</dc:creator>
      <dc:date>2024-04-26T03:51:35Z</dc:date>
    </item>
    <item>
      <title>Re: simple slopes PROC PLM versus calculating by hand</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/simple-slopes-PROC-PLM-versus-calculating-by-hand/m-p/925984#M46052</link>
      <description>&lt;BLOCKQUOTE&gt;
&lt;P&gt;The default reference for categorical is the last value so A2B2 is the reference. If you calculate by hand from the solution for fixed effects, the values are the same for A2B2, A2B1, and A1B2 but wildly different for A1B1 and I can't for the life of me figure out why. For example:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="PaigeMiller_0-1714126067346.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/95920i2F85B90CB8E6E8D2/image-size/medium?v=v2&amp;amp;px=400" role="button" title="PaigeMiller_0-1714126067346.png" alt="PaigeMiller_0-1714126067346.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;A2B2 is -.2300 (same in PLM)&lt;/P&gt;
&lt;P&gt;A2B1 is -.2300 + 1.4324 = 1.2033 (1.2024 in PLM)&lt;/P&gt;
&lt;P&gt;A1B2 is -.2300 + .4836 = .2555 (.2535 in PLM)&lt;/P&gt;
&lt;P&gt;using the same method, A1B1 would be -.2300 + -1.3125 = -1.542&lt;/P&gt;
&lt;P&gt;using PLM, A1B1 is .3735&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Your calculations for A1B1 are incorrect. It should be -0.2300+1.4324+0.4836-1.3125 = .3735, same as PLM.&lt;/P&gt;</description>
      <pubDate>Fri, 26 Apr 2024 10:25:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/simple-slopes-PROC-PLM-versus-calculating-by-hand/m-p/925984#M46052</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2024-04-26T10:25:37Z</dc:date>
    </item>
    <item>
      <title>Re: simple slopes PROC PLM versus calculating by hand</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/simple-slopes-PROC-PLM-versus-calculating-by-hand/m-p/926068#M46055</link>
      <description>&lt;P&gt;This will be much easier if you rewrite the model into an equivalent form. Create a single variable, AB, with 4 values. Then write the model as:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; class ab; model &amp;lt;your-response&amp;gt;=ab ab*m / noint &amp;lt;other-options&amp;gt;;&lt;/P&gt;
&lt;P&gt;The AB parameters are then the intercepts for each group and the AB*M parameters are the group slopes. No need for ESTIMATE statements. If you want to test for equality of slopes or to compare group slopes, then see &lt;A href="http://support.sas.com/kb/24177" target="_self"&gt;this note&lt;/A&gt; that shows how.&lt;/P&gt;</description>
      <pubDate>Fri, 26 Apr 2024 16:30:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/simple-slopes-PROC-PLM-versus-calculating-by-hand/m-p/926068#M46055</guid>
      <dc:creator>StatDave</dc:creator>
      <dc:date>2024-04-26T16:30:03Z</dc:date>
    </item>
  </channel>
</rss>

