<?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: PROC MIXED THE LAST INTERACTION TERMS WAS NOT CALCULATED in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-mixed-the-last-interaction-terms-was-not-calculated/m-p/863086#M42675</link>
    <description>&lt;P&gt;Hi Jill,&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thank you so much for your helpful reply!&amp;nbsp;It's very informative.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Best,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Jess&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 08 Mar 2023 22:41:32 GMT</pubDate>
    <dc:creator>YYK273</dc:creator>
    <dc:date>2023-03-08T22:41:32Z</dc:date>
    <item>
      <title>Proc mixed the last interaction terms was not calculated</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-mixed-the-last-interaction-terms-was-not-calculated/m-p/862583#M42647</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Hello statisticians,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;When I run the&amp;nbsp;proc mixed model&amp;nbsp;on longitudinal complex survey data, I found only one of the interaction&amp;nbsp;year_mixed*age (when age=64) is not calculated each time.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;proc mixed data=sample;
class PN age (ref='50') ; 
model Score=year_mixed age  year_mixed*age  /solution cl;
random intercept year_mixed/ subject=PN type=un;
weight wt;
run;quit;&lt;/PRE&gt;&lt;P&gt;In this study, PN is the participant's ID, age is the year of age their scores were measured, and year_mixed is the date the score was measured (a continuous variable). I currently consider age categorical, and the level of PN is&amp;nbsp;22648, the&amp;nbsp;level of Age is 15, total observation used is&amp;nbsp;78028 after weight.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I also tried randomly selecting some small samples n=3000 to run the code the&amp;nbsp;&lt;SPAN&gt;interaction&amp;nbsp;year_mixed*age(64) is still missing and not calculated as I show in the result below.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="YYK273_2-1678138251464.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/81124iD5E3F6B33C49D1B4/image-size/medium?v=v2&amp;amp;px=400" role="button" title="YYK273_2-1678138251464.png" alt="YYK273_2-1678138251464.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="YYK273_1-1678137419237.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/81122i81DEA75F2C571821/image-size/medium?v=v2&amp;amp;px=400" role="button" title="YYK273_1-1678137419237.png" alt="YYK273_1-1678137419237.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Type 3 Tests of Fixed Effects&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Effect&lt;/TD&gt;&lt;TD&gt;Num DF&lt;/TD&gt;&lt;TD&gt;Den DF&lt;/TD&gt;&lt;TD&gt;F Value&lt;/TD&gt;&lt;TD&gt;Pr&amp;nbsp;&amp;gt;&amp;nbsp;F&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;year_mixed&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;1.90E+04&lt;/TD&gt;&lt;TD&gt;0.91&lt;/TD&gt;&lt;TD&gt;0.339&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;age&lt;/TD&gt;&lt;TD&gt;14&lt;/TD&gt;&lt;TD&gt;3.70E+04&lt;/TD&gt;&lt;TD&gt;3.48&lt;/TD&gt;&lt;TD&gt;&amp;lt;.0001&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;year_mixed*age&lt;/TD&gt;&lt;TD&gt;13&lt;/TD&gt;&lt;TD&gt;3.70E+04&lt;/TD&gt;&lt;TD&gt;0.81&lt;/TD&gt;&lt;TD&gt;0.65&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I am wondering why when age=64 the&amp;nbsp;year_mixed*age is not calculated. My other categorical variates work fine, they call can be calculated (Race, Education,&amp;nbsp;Et al.).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;I really appreciate your help!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Jess&lt;/P&gt;</description>
      <pubDate>Tue, 07 Mar 2023 01:27:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Proc-mixed-the-last-interaction-terms-was-not-calculated/m-p/862583#M42647</guid>
      <dc:creator>YYK273</dc:creator>
      <dc:date>2023-03-07T01:27:25Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Mixed — the last interaction terms was not calculated</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-mixed-the-last-interaction-terms-was-not-calculated/m-p/862584#M42648</link>
      <description>&lt;P&gt;This is what SAS does when you have a categorical variable, in this case AGE. At least one, and maybe more, of the levels cannot have a coefficient estimate ... or to say it another way, there isn't enough data to have all coefficients estimated. If (a much simpler case), if you are looking at a class variable that indicates Males or Females, you can only estimate one, and then the other is completely determined and has zero degrees of freedom.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What you really really really want to look at is the Least Squares Means in this case, which will indeed have means for all levels. See &lt;A href="https://communities.sas.com/t5/Statistical-Procedures/Interpreting-Multivariate-Linear-Regression-with-Categorical/m-p/591230#M28913" target="_self"&gt;this explanation&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;PLEASE DO NOT TYPE IN ALL CAPITALS.&lt;/P&gt;</description>
      <pubDate>Mon, 06 Mar 2023 21:50:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Proc-mixed-the-last-interaction-terms-was-not-calculated/m-p/862584#M42648</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2023-03-06T21:50:21Z</dc:date>
    </item>
    <item>
      <title>Re: PROC MIXED THE LAST INTERACTION TERMS WAS NOT CALCULATED</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-mixed-the-last-interaction-terms-was-not-calculated/m-p/862597#M42651</link>
      <description>&lt;P&gt;There might be some confounding in your data and that is why in addition to age 50, you get a zero estimate for age 64. To see if that is the case, you might run the following program and examine the E option output -&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc glm data=sample;
class PN age (ref='50') ; 
model Score=year_mixed age  year_mixed*age  / e;
weight wt;
run;
quit;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;Jill&lt;/P&gt;</description>
      <pubDate>Tue, 07 Mar 2023 00:53:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Proc-mixed-the-last-interaction-terms-was-not-calculated/m-p/862597#M42651</guid>
      <dc:creator>jiltao</dc:creator>
      <dc:date>2023-03-07T00:53:40Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Mixed — the last interaction terms was not calculated</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-mixed-the-last-interaction-terms-was-not-calculated/m-p/863084#M42674</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Hi Paige,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;I really appreciate your reply and help. Your solution works and is very helpful!&lt;/P&gt;&lt;P&gt;However, in my interaction year_mixed*age,&amp;nbsp;year_mixed is a continuous variable, and SAS reported &lt;STRONG&gt;ERROR: Only CLASS variables allowed in this effect. &lt;/STRONG&gt;This is my code:&lt;/P&gt;&lt;PRE&gt;proc mixed data=sample;
class PN age (ref='50') ; 
model Score=year_mixed age  year_mixed*age  /solution cl;
random intercept year_mixed/ subject=PN type=un;
weight wt;
LSMEANS year_mixed*age/diff;
run;quit;&lt;/PRE&gt;&lt;P&gt;&lt;SPAN&gt;How should I handle the interaction with a continuous variable?&amp;nbsp;It seems that LSMEANS does not work with continuous variables.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I really appreciate your time and help. Also, thank you so much for your reminder and I have changed my title.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 08 Mar 2023 22:30:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Proc-mixed-the-last-interaction-terms-was-not-calculated/m-p/863084#M42674</guid>
      <dc:creator>YYK273</dc:creator>
      <dc:date>2023-03-08T22:30:39Z</dc:date>
    </item>
    <item>
      <title>Re: PROC MIXED THE LAST INTERACTION TERMS WAS NOT CALCULATED</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-mixed-the-last-interaction-terms-was-not-calculated/m-p/863086#M42675</link>
      <description>&lt;P&gt;Hi Jill,&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thank you so much for your helpful reply!&amp;nbsp;It's very informative.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Best,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Jess&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 08 Mar 2023 22:41:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Proc-mixed-the-last-interaction-terms-was-not-calculated/m-p/863086#M42675</guid>
      <dc:creator>YYK273</dc:creator>
      <dc:date>2023-03-08T22:41:32Z</dc:date>
    </item>
  </channel>
</rss>

