<?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: Using 2 or more Subject IDs in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-mixed-Using-2-or-more-Subject-IDs/m-p/648846#M31308</link>
    <description>&lt;P&gt;I am using a dataset with both household and person identifiers. For example the household ID may have 5 or so numeric values (00001) and then there would be a personal identifier in the household (1). How can I load both identifiers into my models?&amp;nbsp; I have tried to add the variables or simply list both but could not figure out how to properly use both in my model.&lt;/P&gt;
&lt;P&gt;proc mixed data=hrs noclprint covtest;&lt;BR /&gt;class HHID PN;&lt;BR /&gt;model age=&lt;BR /&gt;/solution ddfm=bw;&lt;BR /&gt;random intercept / subject= HHID PN;&lt;BR /&gt;run;&lt;/P&gt;</description>
    <pubDate>Sat, 30 May 2020 11:20:15 GMT</pubDate>
    <dc:creator>alothary11</dc:creator>
    <dc:date>2020-05-30T11:20:15Z</dc:date>
    <item>
      <title>Proc mixed: Using 2 or more Subject IDs</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-mixed-Using-2-or-more-Subject-IDs/m-p/648846#M31308</link>
      <description>&lt;P&gt;I am using a dataset with both household and person identifiers. For example the household ID may have 5 or so numeric values (00001) and then there would be a personal identifier in the household (1). How can I load both identifiers into my models?&amp;nbsp; I have tried to add the variables or simply list both but could not figure out how to properly use both in my model.&lt;/P&gt;
&lt;P&gt;proc mixed data=hrs noclprint covtest;&lt;BR /&gt;class HHID PN;&lt;BR /&gt;model age=&lt;BR /&gt;/solution ddfm=bw;&lt;BR /&gt;random intercept / subject= HHID PN;&lt;BR /&gt;run;&lt;/P&gt;</description>
      <pubDate>Sat, 30 May 2020 11:20:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Proc-mixed-Using-2-or-more-Subject-IDs/m-p/648846#M31308</guid>
      <dc:creator>alothary11</dc:creator>
      <dc:date>2020-05-30T11:20:15Z</dc:date>
    </item>
    <item>
      <title>Re: Proc mixed: Using 2 or more Subject IDs</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-mixed-Using-2-or-more-Subject-IDs/m-p/651958#M31309</link>
      <description>&lt;P&gt;Re-titled and moved to stat procedures.&lt;/P&gt;</description>
      <pubDate>Sat, 30 May 2020 11:21:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Proc-mixed-Using-2-or-more-Subject-IDs/m-p/651958#M31309</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2020-05-30T11:21:22Z</dc:date>
    </item>
    <item>
      <title>Re: Proc mixed: Using 2 or more Subject IDs</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-mixed-Using-2-or-more-Subject-IDs/m-p/651960#M31312</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/329731"&gt;@alothary11&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;I am using a dataset with both household and person identifiers. For example the household ID may have 5 or so numeric values (00001) and then there would be a personal identifier in the household (1). How can I load both identifiers into my models?&amp;nbsp; I have tried to add the variables or simply list both but could not figure out how to properly use both in my model.&lt;/P&gt;
&lt;P&gt;proc mixed data=hrs noclprint covtest;&lt;BR /&gt;class HHID PN;&lt;BR /&gt;model age=&lt;BR /&gt;/solution ddfm=bw;&lt;BR /&gt;random intercept / subject= HHID PN;&lt;BR /&gt;run;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;What happens when you do it this way? Do you get an error? What error?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You could modify the input data set to concatenate HHID and PN into a single variable.&lt;/P&gt;</description>
      <pubDate>Sat, 30 May 2020 11:29:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Proc-mixed-Using-2-or-more-Subject-IDs/m-p/651960#M31312</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2020-05-30T11:29:29Z</dc:date>
    </item>
    <item>
      <title>Re: Proc mixed: Using 2 or more Subject IDs</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-mixed-Using-2-or-more-Subject-IDs/m-p/651976#M31314</link>
      <description>&lt;P&gt;Thank you, that is what I ended up doing. I had to concatenate the variables and then use the input function to create a numeric value.&amp;nbsp;&lt;/P&gt;&lt;P&gt;data ex;set ex.exall;&lt;BR /&gt;ID_all = cats(HHID,PN);&lt;BR /&gt;run;&lt;BR /&gt;data ex2; set ex.exall;&lt;BR /&gt;ID= input(ID_all, 8.);&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Just posting what I found so others might be able to search and find it. Thanks for the replies!&lt;/P&gt;</description>
      <pubDate>Sat, 30 May 2020 13:38:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Proc-mixed-Using-2-or-more-Subject-IDs/m-p/651976#M31314</guid>
      <dc:creator>alothary11</dc:creator>
      <dc:date>2020-05-30T13:38:39Z</dc:date>
    </item>
    <item>
      <title>Re: Proc mixed: Using 2 or more Subject IDs</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-mixed-Using-2-or-more-Subject-IDs/m-p/652229#M31325</link>
      <description>&lt;P&gt;That would enable you to model a single variance component based on the composite variable.&amp;nbsp; However, if you wish to model a 2 level design, where person is nested within household, you might try:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc mixed data=hrs noclprint ;
class HHID PN;
model age=
/solution ;
random intercept HHID/ subject= PN;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I removed the covtest option from the PROC MIXED statement, as it depends on a Wald test that is really not a good test given the distribution of variances, and also removed the ddfm=bw, as you now want a containment hierarchy for the variance components.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you truly need to test whether the variance components are non-zero I would recommend changing to PROC GLIMMIX and using the options under the COVTEST statement, which give likelihood ratio based tests that are more appropriate.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;SteveDenham&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 01 Jun 2020 12:23:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Proc-mixed-Using-2-or-more-Subject-IDs/m-p/652229#M31325</guid>
      <dc:creator>SteveDenham</dc:creator>
      <dc:date>2020-06-01T12:23:37Z</dc:date>
    </item>
  </channel>
</rss>

