<?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 PROC MIXED LSMEANS by predictor without interaction term in MODEL in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/PROC-MIXED-LSMEANS-by-predictor-without-interaction-term-in/m-p/791597#M38792</link>
    <description>&lt;P&gt;I have a linear mixed effect model for a repeated measure data with both predictor (3 levels) and time (4 levels) as categorical variables. There was a predictor-time interaction in the model, but I took it out because it is not significant. I want to get the model estimated outcome by predictor. Here is my code:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=""&gt;PROC MIXED DATA = df covtest METHOD=REML PLOTS(MAXPOINTS=NONE)=(ResidualPanel());
 CLASS expo time; 
 MODEL outcome = expo time /solution CHISQ  DDFM=KenwardRoger RESIDUAL;
 REPEATED time / subject = pid Type = CS R RCorr;
 LSMEANS expo/ CL;
RUN;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;1) Are the LSMEANS I got from above code the average predicted outcome across all time points by predictor? I am not sure what is the default value LSEMANS using for categorical variables.&lt;/P&gt;&lt;P&gt;2) I know that I can calculate LSMEANS for each combination of predictor and time if I add "expo*time" to the MODEL statement. But since I don't want to keep the interaction term in the model, how can I calculate predicted outcome at each time point by my predictor?&lt;/P&gt;</description>
    <pubDate>Fri, 21 Jan 2022 21:28:52 GMT</pubDate>
    <dc:creator>kivanvan</dc:creator>
    <dc:date>2022-01-21T21:28:52Z</dc:date>
    <item>
      <title>PROC MIXED LSMEANS by predictor without interaction term in MODEL</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/PROC-MIXED-LSMEANS-by-predictor-without-interaction-term-in/m-p/791597#M38792</link>
      <description>&lt;P&gt;I have a linear mixed effect model for a repeated measure data with both predictor (3 levels) and time (4 levels) as categorical variables. There was a predictor-time interaction in the model, but I took it out because it is not significant. I want to get the model estimated outcome by predictor. Here is my code:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=""&gt;PROC MIXED DATA = df covtest METHOD=REML PLOTS(MAXPOINTS=NONE)=(ResidualPanel());
 CLASS expo time; 
 MODEL outcome = expo time /solution CHISQ  DDFM=KenwardRoger RESIDUAL;
 REPEATED time / subject = pid Type = CS R RCorr;
 LSMEANS expo/ CL;
RUN;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;1) Are the LSMEANS I got from above code the average predicted outcome across all time points by predictor? I am not sure what is the default value LSEMANS using for categorical variables.&lt;/P&gt;&lt;P&gt;2) I know that I can calculate LSMEANS for each combination of predictor and time if I add "expo*time" to the MODEL statement. But since I don't want to keep the interaction term in the model, how can I calculate predicted outcome at each time point by my predictor?&lt;/P&gt;</description>
      <pubDate>Fri, 21 Jan 2022 21:28:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/PROC-MIXED-LSMEANS-by-predictor-without-interaction-term-in/m-p/791597#M38792</guid>
      <dc:creator>kivanvan</dc:creator>
      <dc:date>2022-01-21T21:28:52Z</dc:date>
    </item>
    <item>
      <title>Re: PROC MIXED LSMEANS by predictor without interaction term in MODEL</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/PROC-MIXED-LSMEANS-by-predictor-without-interaction-term-in/m-p/791598#M38793</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/366627"&gt;@kivanvan&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;1) Are the LSMEANS I got from above code the average predicted outcome across all time points by predictor? I am not sure what is the default value LSEMANS using for categorical variables.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;In the case where your data is perfectly balanced, equal number of observations in each cell of the experiment, the LSMEANS are the arithmetic average. If the experiment is not balanced, then the LSMEANS are adjusted for this imbalance, and no longer equal the arithmetic average, but are better representations of the mean for each level of your class variables.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;2) I know that I can calculate LSMEANS for each combination of predictor and time if I add "expo*time" to the MODEL statement. But since I don't want to keep the interaction term in the model, how can I calculate predicted outcome at each time point by my predictor?&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;The &lt;A href="https://documentation.sas.com/doc/en/pgmmvacdc/9.4/statug/statug_mixed_syntax08.htm" target="_self"&gt;LSMEANS statement&lt;/A&gt; in PROC MIXED should give predicted values even without the interaction.&lt;/P&gt;</description>
      <pubDate>Fri, 21 Jan 2022 21:52:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/PROC-MIXED-LSMEANS-by-predictor-without-interaction-term-in/m-p/791598#M38793</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2022-01-21T21:52:11Z</dc:date>
    </item>
    <item>
      <title>Re: PROC MIXED LSMEANS by predictor without interaction term in MODEL</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/PROC-MIXED-LSMEANS-by-predictor-without-interaction-term-in/m-p/791602#M38794</link>
      <description>&lt;P&gt;Yes the LSMEANS are computed averaging over other classification effects in the model. You can use the E option in the LSMEANS statement to see exactly how the LSMEANS are computed.&lt;/P&gt;
&lt;P&gt;No, without the interaction term, you will not be able to get the lsmeans for EXPO at each value of TIME with the LSMEANS statement. But you can use the ESTIMATE statement. For example, suppose EXPO has 2 levels and TIME has 4 levels, then you can use the following ESTIMATE statement in your PROC MIXED program --&lt;/P&gt;
&lt;P&gt;estimate 'average of EXPO for time=1' int 1 expo 0.5 0.5 time 1 0 0 0;&lt;/P&gt;
&lt;P&gt;estimate 'average of EXPO for time=2' int 1 expo 0.5 0.5 time 0 1 0 0;&lt;/P&gt;
&lt;P&gt;estimate 'average of EXPO for time=3' int 1 expo 0.5 0.5 time 0 0 1 0;&lt;/P&gt;
&lt;P&gt;estimate 'average of EXPO for time=4' int 1 expo 0.5 0.5 time 0 0 0 1;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope this helps,&lt;/P&gt;
&lt;P&gt;Jill&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 21 Jan 2022 22:31:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/PROC-MIXED-LSMEANS-by-predictor-without-interaction-term-in/m-p/791602#M38794</guid>
      <dc:creator>jiltao</dc:creator>
      <dc:date>2022-01-21T22:31:31Z</dc:date>
    </item>
    <item>
      <title>Re: PROC MIXED LSMEANS by predictor without interaction term in MODEL</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/PROC-MIXED-LSMEANS-by-predictor-without-interaction-term-in/m-p/791855#M38808</link>
      <description>Thanks for your reply! It is helpful to know how LSMEANS are calculated for the imbalanced data, which it is in my case.&lt;BR /&gt;Regarding the LSMEANS without interaction term, I tried it and got an error:" ERROR: Effects used in the LSMEANS statement must have appeared previously in the MODEL statement." So I don't think it is feasible through LSMEANS if I take out the interaction from the model.</description>
      <pubDate>Mon, 24 Jan 2022 14:05:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/PROC-MIXED-LSMEANS-by-predictor-without-interaction-term-in/m-p/791855#M38808</guid>
      <dc:creator>kivanvan</dc:creator>
      <dc:date>2022-01-24T14:05:54Z</dc:date>
    </item>
    <item>
      <title>Re: PROC MIXED LSMEANS by predictor without interaction term in MODEL</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/PROC-MIXED-LSMEANS-by-predictor-without-interaction-term-in/m-p/791864#M38809</link>
      <description>Thank you for your help! The E option works great for me.</description>
      <pubDate>Mon, 24 Jan 2022 14:38:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/PROC-MIXED-LSMEANS-by-predictor-without-interaction-term-in/m-p/791864#M38809</guid>
      <dc:creator>kivanvan</dc:creator>
      <dc:date>2022-01-24T14:38:14Z</dc:date>
    </item>
  </channel>
</rss>

