<?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 How to use proc mixed for nonindependent data in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-use-proc-mixed-for-nonindependent-data/m-p/955241#M373073</link>
    <description>&lt;P&gt;Hello all,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a longitudinal study where participants come in for yearly visits and we assess metabolic outcomes and lifestyle factors as predictor variables. For example, how does sleep relate to BMI. I am trying to set up a proc mixed model but I am not sure how control for the fact that some participants contribute multiple observations to the dataset while others only contribute one. I am not interested in testing the effect of time, but rather how does sleep relate to BMI after controlling for some participants having multiple visits.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is an example of my code:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc mixed data=a;&lt;BR /&gt;class id sex visit;&lt;BR /&gt;model BMI=accel_sleep_duration sex visit child_age / solution;&lt;BR /&gt;random visit id;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any suggestions would be appreciated! Thanks!&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 06 Jan 2025 20:17:03 GMT</pubDate>
    <dc:creator>Jasminalves</dc:creator>
    <dc:date>2025-01-06T20:17:03Z</dc:date>
    <item>
      <title>How to use proc mixed for nonindependent data</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-use-proc-mixed-for-nonindependent-data/m-p/955241#M373073</link>
      <description>&lt;P&gt;Hello all,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a longitudinal study where participants come in for yearly visits and we assess metabolic outcomes and lifestyle factors as predictor variables. For example, how does sleep relate to BMI. I am trying to set up a proc mixed model but I am not sure how control for the fact that some participants contribute multiple observations to the dataset while others only contribute one. I am not interested in testing the effect of time, but rather how does sleep relate to BMI after controlling for some participants having multiple visits.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is an example of my code:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc mixed data=a;&lt;BR /&gt;class id sex visit;&lt;BR /&gt;model BMI=accel_sleep_duration sex visit child_age / solution;&lt;BR /&gt;random visit id;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any suggestions would be appreciated! Thanks!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 06 Jan 2025 20:17:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-use-proc-mixed-for-nonindependent-data/m-p/955241#M373073</guid>
      <dc:creator>Jasminalves</dc:creator>
      <dc:date>2025-01-06T20:17:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to use proc mixed for nonindependent data</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-use-proc-mixed-for-nonindependent-data/m-p/955268#M373084</link>
      <description>&lt;P&gt;That would be better to post it at Statistical Forum(let &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13633"&gt;@StatDave&lt;/a&gt;&amp;nbsp; &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13758"&gt;@lvm&lt;/a&gt;&amp;nbsp; &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/15363"&gt;@SteveDenham&lt;/a&gt;&amp;nbsp; see it):&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is the code I proposed.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc mixed data=a;
class id sex visit;
model BMI=accel_sleep_duration sex visit child_age / solution;
random int/subject= id;
repeated visit/subject= id;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 07 Jan 2025 02:03:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-use-proc-mixed-for-nonindependent-data/m-p/955268#M373084</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2025-01-07T02:03:03Z</dc:date>
    </item>
  </channel>
</rss>

