<?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 GenMod/HLM questions in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-GenMod-HLM-questions/m-p/643315#M30853</link>
    <description>&lt;P&gt;Hi everyone. I am trying to teach myself about Proc Genmod/Proc Glimmix and the intricacies of higher level models. I am using online resources almost primarily and ran into some walls. I was hoping this forum would help me get some more information or know what to look into to help myself.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is a multilevel analysis to look at whether trial retention (RETENTION) is predicted by intervention condition (CONDITION), attendance at an orientation session (IMPLEMENTATION), controlling for study intervention group – there were 8 of these (STUDYGROUP).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am working through some code and figured out how to do a two-level model, but I want to add one more layer.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;procgenmoddata=AOOF.INTACT_LONGdescending;

 class ID visit(desc) CONDITION (desc) IMPLEMENTATION (desc);

 model RETENTION = visit CONDITION IMPLEMENTATION/dist=binomiallink=logtype3;

 repeatedsubject=id;

run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I’ll need to add an additional level of STUDYGROUP. I was reading a few different things and one of the ways I could handle this was using GEE framework something like:&lt;/P&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc genmod data=AOOF.INTACT_LONG descending;
  class ID visit(desc) CONDITION (desc) IMPLEMENTATION (desc)STUDYGROUP;
  model RETENTION = visit CONDITION IMPLEMENTATION CONDITION*IMPLEMENTATION /dist=binomial link=log type3;
  repeated subject=id(studygroup);
  lsmeans CONDITION*IMPLEMENTATION / &lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;exp&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;CL ilink&lt;/SPAN&gt;;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;DIV&gt;I can't seem to find a way to get the following which I believe to be the main reporting statistics usually for this type of model (please forgive me if I'm being ignorant or looking over something):&lt;/DIV&gt;&lt;DIV&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; -adjusted estimates, CIs&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; -estimated differences&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; -ORs with &amp;nbsp;CI&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How would I achieve these or are there other main reporting statistics that I am overlooking?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;One other question I had was how exactly do you represent a nested structure in genmod?&amp;nbsp;&lt;SPAN&gt;&amp;nbsp;I want to model repeated measures for people who are within study groups for one outcome (retention). For another outcome (attendance) there isn’t a repeated measure but people are still without study group.&lt;/SPAN&gt;&lt;/P&gt;&lt;/DIV&gt;</description>
    <pubDate>Mon, 27 Apr 2020 15:06:59 GMT</pubDate>
    <dc:creator>joebacon</dc:creator>
    <dc:date>2020-04-27T15:06:59Z</dc:date>
    <item>
      <title>Proc GenMod/HLM questions</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-GenMod-HLM-questions/m-p/643315#M30853</link>
      <description>&lt;P&gt;Hi everyone. I am trying to teach myself about Proc Genmod/Proc Glimmix and the intricacies of higher level models. I am using online resources almost primarily and ran into some walls. I was hoping this forum would help me get some more information or know what to look into to help myself.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is a multilevel analysis to look at whether trial retention (RETENTION) is predicted by intervention condition (CONDITION), attendance at an orientation session (IMPLEMENTATION), controlling for study intervention group – there were 8 of these (STUDYGROUP).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am working through some code and figured out how to do a two-level model, but I want to add one more layer.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;procgenmoddata=AOOF.INTACT_LONGdescending;

 class ID visit(desc) CONDITION (desc) IMPLEMENTATION (desc);

 model RETENTION = visit CONDITION IMPLEMENTATION/dist=binomiallink=logtype3;

 repeatedsubject=id;

run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I’ll need to add an additional level of STUDYGROUP. I was reading a few different things and one of the ways I could handle this was using GEE framework something like:&lt;/P&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc genmod data=AOOF.INTACT_LONG descending;
  class ID visit(desc) CONDITION (desc) IMPLEMENTATION (desc)STUDYGROUP;
  model RETENTION = visit CONDITION IMPLEMENTATION CONDITION*IMPLEMENTATION /dist=binomial link=log type3;
  repeated subject=id(studygroup);
  lsmeans CONDITION*IMPLEMENTATION / &lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;exp&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;CL ilink&lt;/SPAN&gt;;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;DIV&gt;I can't seem to find a way to get the following which I believe to be the main reporting statistics usually for this type of model (please forgive me if I'm being ignorant or looking over something):&lt;/DIV&gt;&lt;DIV&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; -adjusted estimates, CIs&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; -estimated differences&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; -ORs with &amp;nbsp;CI&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How would I achieve these or are there other main reporting statistics that I am overlooking?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;One other question I had was how exactly do you represent a nested structure in genmod?&amp;nbsp;&lt;SPAN&gt;&amp;nbsp;I want to model repeated measures for people who are within study groups for one outcome (retention). For another outcome (attendance) there isn’t a repeated measure but people are still without study group.&lt;/SPAN&gt;&lt;/P&gt;&lt;/DIV&gt;</description>
      <pubDate>Mon, 27 Apr 2020 15:06:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Proc-GenMod-HLM-questions/m-p/643315#M30853</guid>
      <dc:creator>joebacon</dc:creator>
      <dc:date>2020-04-27T15:06:59Z</dc:date>
    </item>
    <item>
      <title>Re: Proc GenMod/HLM questions</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-GenMod-HLM-questions/m-p/643385#M30854</link>
      <description>&lt;P&gt;You have an LSMEANS statement, with exp, CL and ilink options.&amp;nbsp; You should add a diff option on there, and I think you will get what you are looking for.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The other question raises some theoretical issues - do you want marginal responses (averaged over the random effects) or conditional responses (values conditional on the random estimates)?&amp;nbsp; For the first, look at PROC GEE (or try PROC GENMOD with a REPEATED statement).&amp;nbsp; For the latter, use PROC GLIMMIX.&amp;nbsp; There you would have two RANDOM statements - the first would cover any clustering variables while the second would cover the repeated variable.&amp;nbsp; And then you have to decide whether to make that variable R-side (residual option) or G-side.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I would really recommend getting a copy of Walt Stroup's book:&amp;nbsp;&lt;SPAN&gt;Generalized Linear Mixed Models: Modern Concepts, Methods and Applications.&amp;nbsp; It has a lot of really good examples in SAS and covers both applied and theoretical considerations.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;SteveDenham&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 27 Apr 2020 17:47:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Proc-GenMod-HLM-questions/m-p/643385#M30854</guid>
      <dc:creator>SteveDenham</dc:creator>
      <dc:date>2020-04-27T17:47:27Z</dc:date>
    </item>
    <item>
      <title>Re: Proc GenMod/HLM questions</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-GenMod-HLM-questions/m-p/643687#M30862</link>
      <description>&lt;P&gt;See other posts in this community by&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13633"&gt;@StatDave&lt;/a&gt;&amp;nbsp; regarding macros to get differences and CL's on the original scale.&amp;nbsp; My mind has been greatly expanded today.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;SteveDenham&lt;/P&gt;</description>
      <pubDate>Tue, 28 Apr 2020 17:38:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Proc-GenMod-HLM-questions/m-p/643687#M30862</guid>
      <dc:creator>SteveDenham</dc:creator>
      <dc:date>2020-04-28T17:38:17Z</dc:date>
    </item>
    <item>
      <title>Re: Proc GenMod/HLM questions</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-GenMod-HLM-questions/m-p/643725#M30864</link>
      <description>&lt;P&gt;GENMOD cannot be used for multilevel models. It does not allow for random effects. See &lt;A href="http://support.sas.com/kb/24200" target="_self"&gt;this note&lt;/A&gt; regarding nested correlation structures. The SUBJECT= effect is not part of the model specification - it is only used to determine which observations are in a cluster.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 28 Apr 2020 20:51:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Proc-GenMod-HLM-questions/m-p/643725#M30864</guid>
      <dc:creator>StatDave</dc:creator>
      <dc:date>2020-04-28T20:51:52Z</dc:date>
    </item>
    <item>
      <title>Re: Proc GenMod/HLM questions</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-GenMod-HLM-questions/m-p/644522#M30916</link>
      <description>&lt;P&gt;Steve,&lt;/P&gt;&lt;P&gt;Thank you for taking the time to suggest some literature and help with my model. I ended up going with Genmod with a repeated statement and the diff option. I have the book ordered and will definitely give it a read- it looks to have good reviews across the board.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks again,&lt;/P&gt;&lt;P&gt;Joe&lt;/P&gt;</description>
      <pubDate>Fri, 01 May 2020 14:18:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Proc-GenMod-HLM-questions/m-p/644522#M30916</guid>
      <dc:creator>joebacon</dc:creator>
      <dc:date>2020-05-01T14:18:56Z</dc:date>
    </item>
  </channel>
</rss>

