<?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: Logistic regression with GLIMMIX in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/Logistic-regression-with-GLIMMIX/m-p/208443#M11261</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc glimmix data = Simdata;&lt;/P&gt;&lt;P&gt;&amp;nbsp; class ID Group observation;&lt;/P&gt;&lt;P&gt;&amp;nbsp; model outcome(event='1') = Group / dist=binary solution;&lt;/P&gt;&lt;P&gt;&amp;nbsp; random observation/residual type=unr subject=ID;&lt;/P&gt;&lt;P&gt; lsmeans group/ilink;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This models observation as a repeated measure on each ID, with an unstructured correlation matrix as the covariance structure. &lt;/P&gt;&lt;P&gt;Steve Denham&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 22 Jul 2015 12:57:59 GMT</pubDate>
    <dc:creator>SteveDenham</dc:creator>
    <dc:date>2015-07-22T12:57:59Z</dc:date>
    <item>
      <title>Logistic regression with GLIMMIX</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Logistic-regression-with-GLIMMIX/m-p/208440#M11258</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a simulated data with the following structure:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" height="149" style="border: 1px solid #000000; width: 385px; height: 114px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;Subject ID&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;Observation&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;Outcome&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;Group&lt;/STRONG&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;1&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;1&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;1&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;T&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;1&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;2&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;1&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;T&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;2&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;1&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;1&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;C&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;2&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;2&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;0&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;C&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;3&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;1&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;0&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;T&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;3&lt;/TD&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;TD&gt;T&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;...&lt;/TD&gt;&lt;TD&gt;...&lt;/TD&gt;&lt;TD&gt;...&lt;/TD&gt;&lt;TD&gt;...&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or in words, I have subjects, with 2 observations each. Every observation is success / failure (1/0). There are two groups (Treatment / Control).&lt;/P&gt;&lt;P&gt;Since the data is simulated, I know the probability of '1' in the treatment group and I know the probability of '1' in the control group. I also know the correlation between the two observations within a subject.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now I want to model it, and to get estimates which will be as close as possible to the values I know (assume I have simulated correctly).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My questions are:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. How to set the GLIMMIX procedure to do what I want ?&lt;/P&gt;&lt;P&gt;2. How do I extract from the output the 2 probabilities (P(1|T) and P(1|C) and the correlation ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc glimmix data = Simdata;&lt;/P&gt;&lt;P&gt;&amp;nbsp; class ID Group;&lt;/P&gt;&lt;P&gt;&amp;nbsp; model outcome(event='1') = Group / dist=binary solution;&lt;/P&gt;&lt;P&gt;&amp;nbsp; random ID;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am not sure it's correct and not sure how to test my output (to extract the probabilities).&lt;/P&gt;&lt;P&gt;Should I have used a different estimation method ? (laplace)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you in advance !&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Jul 2015 09:16:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Logistic-regression-with-GLIMMIX/m-p/208440#M11258</guid>
      <dc:creator>BlueNose</dc:creator>
      <dc:date>2015-07-22T09:16:33Z</dc:date>
    </item>
    <item>
      <title>Re: Logistic regression with GLIMMIX</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Logistic-regression-with-GLIMMIX/m-p/208441#M11259</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You probably will want to shift to method=laplace (see Walt Stroup's book on generalized linear models) for this effort.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The solution here will give values on the logit scale.&amp;nbsp; To get probabilities, try adding an LSMEANS statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;lsmeans group/ilink;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This should give the marginal estimates on both the logit scale and the original scale, which would look like a probability.&amp;nbsp; Shifting to method=laplace would give the conditional estimates.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Steve Denham&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Jul 2015 12:48:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Logistic-regression-with-GLIMMIX/m-p/208441#M11259</guid>
      <dc:creator>SteveDenham</dc:creator>
      <dc:date>2015-07-22T12:48:27Z</dc:date>
    </item>
    <item>
      <title>Re: Logistic regression with GLIMMIX</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Logistic-regression-with-GLIMMIX/m-p/208442#M11260</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Steve. Your suggestion worked, I did get probabilities, which are close to what I began the simulation with.&lt;/P&gt;&lt;P&gt;The only problem I got left is the correlation. I have started with a correlation of 0.3 between two observations within a subject, I can't extract this number from the output. How shall I do that ?&lt;/P&gt;&lt;P&gt;The Covariance Parameter Estimates is 1.1381, if it helps.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Jul 2015 12:52:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Logistic-regression-with-GLIMMIX/m-p/208442#M11260</guid>
      <dc:creator>BlueNose</dc:creator>
      <dc:date>2015-07-22T12:52:40Z</dc:date>
    </item>
    <item>
      <title>Re: Logistic regression with GLIMMIX</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Logistic-regression-with-GLIMMIX/m-p/208443#M11261</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc glimmix data = Simdata;&lt;/P&gt;&lt;P&gt;&amp;nbsp; class ID Group observation;&lt;/P&gt;&lt;P&gt;&amp;nbsp; model outcome(event='1') = Group / dist=binary solution;&lt;/P&gt;&lt;P&gt;&amp;nbsp; random observation/residual type=unr subject=ID;&lt;/P&gt;&lt;P&gt; lsmeans group/ilink;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This models observation as a repeated measure on each ID, with an unstructured correlation matrix as the covariance structure. &lt;/P&gt;&lt;P&gt;Steve Denham&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Jul 2015 12:57:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Logistic-regression-with-GLIMMIX/m-p/208443#M11261</guid>
      <dc:creator>SteveDenham</dc:creator>
      <dc:date>2015-07-22T12:57:59Z</dc:date>
    </item>
  </channel>
</rss>

