<?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: Obtain Correct Marginal Predictions for Mixed Model with Categorical Outcome in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/Obtain-Correct-Marginal-Predictions-for-Mixed-Model-with/m-p/893018#M44242</link>
    <description>&lt;P&gt;Have you looked at Stroup &amp;amp; Claassen's 2020 paper?&amp;nbsp; &amp;nbsp;&amp;lt;PAYWALL&amp;gt; Stroup, W., Claassen, E. Pseudo-Likelihood or Quadrature? What We Thought We Knew, What We Think We Know, and What We Are Still Trying to Figure Out.&amp;nbsp;&lt;I&gt;JABES&lt;/I&gt;&amp;nbsp;&lt;STRONG&gt;25&lt;/STRONG&gt;, 639–656 (2020). &lt;A href="https://doi.org/10.1007/s13253-020-00402-6" target="_blank"&gt;https://doi.org/10.1007/s13253-020-00402-6&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There is a tremendous amount of simulation involved and much discussion of bias and how it might be overcome. I may be misinterpreting your aims, but if you haven't read this paper you are missing out.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;SteveDenham&lt;/P&gt;</description>
    <pubDate>Wed, 06 Sep 2023 18:38:07 GMT</pubDate>
    <dc:creator>SteveDenham</dc:creator>
    <dc:date>2023-09-06T18:38:07Z</dc:date>
    <item>
      <title>Obtain Correct Marginal Predictions for Mixed Model with Categorical Outcome</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Obtain-Correct-Marginal-Predictions-for-Mixed-Model-with/m-p/892382#M44226</link>
      <description>&lt;P&gt;I think it is relatively well known that simply scoring a mixed effects model over fixed effects produces biased marginal prediction when the outcome is binary.&amp;nbsp; See Pavlou (2015) for an excellent summary of the problem and solutions:&amp;nbsp;&lt;A href="https://bmcmedresmethodol.biomedcentral.com/articles/10.1186/s12874-015-0046-6" target="_blank" rel="noopener"&gt;https://bmcmedresmethodol.biomedcentral.com/articles/10.1186/s12874-015-0046-6&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;SAS does not currently have a way to remove the bias outside of settling for GEE in place of random effects model.&amp;nbsp; GEE has drawbacks.&amp;nbsp; Feature request is in with SAS.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can anyone direct me to existing SAS code or give pointers on what to use and how to develop an efficient integration solution.&amp;nbsp; I am working with large datasets and thousands of random effects levels.&lt;BR /&gt;&lt;BR /&gt;I've written the code to apply Zeger approximation (sharing below) but want to be exact.&amp;nbsp; &lt;BR /&gt;&lt;BR /&gt;To whom it may concern, in a sample with event rate in low single digits, as expected, Observed/Expected ratios based on native SAS PredProbs for full sample were substantially biased upwards (OE&amp;gt;1.00) due to under-predicted risk.&amp;nbsp; Bias was in excess of 10%.&amp;nbsp; After applying Zeger correction, the O/E ratios were much closer to 1.00 but the correction slightly over-estimates risk (OE&amp;lt;1.00 with bias around ~2%) .&amp;nbsp; I am hoping that integration approch proposed in Pavlou (2015) will get me closer to ideal OE = 1.00.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;PRE&gt;%macro ZegerC(mPredProb, S2);
* &amp;amp;mPredProb = variable with biased marginal predicted probabilities from mixed model with binary outcome *&lt;BR /&gt;* &amp;amp;S2        = variance of random intercepts                                                              ;&lt;BR /&gt;
data Zeger;
set DataHave;

    CAF          = sqrt(.345843*&amp;amp;S2 + 1);
    XB           = log( &amp;amp;mPredProb./(1-&amp;amp;mPredProb.) );
    XBc          = XB / CAF ;
    &amp;amp;mPredProb.C = ( exp(-XBc) + 1 )**-1;
&lt;BR /&gt;    drop CAF XB XBc;&lt;BR /&gt;run;&lt;BR /&gt;
%mend ZegerC;&lt;/PRE&gt;</description>
      <pubDate>Fri, 01 Sep 2023 20:35:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Obtain-Correct-Marginal-Predictions-for-Mixed-Model-with/m-p/892382#M44226</guid>
      <dc:creator>Haris</dc:creator>
      <dc:date>2023-09-01T20:35:46Z</dc:date>
    </item>
    <item>
      <title>Re: Obtain Correct Marginal Predictions for Mixed Model with Categorical Outcome</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Obtain-Correct-Marginal-Predictions-for-Mixed-Model-with/m-p/893018#M44242</link>
      <description>&lt;P&gt;Have you looked at Stroup &amp;amp; Claassen's 2020 paper?&amp;nbsp; &amp;nbsp;&amp;lt;PAYWALL&amp;gt; Stroup, W., Claassen, E. Pseudo-Likelihood or Quadrature? What We Thought We Knew, What We Think We Know, and What We Are Still Trying to Figure Out.&amp;nbsp;&lt;I&gt;JABES&lt;/I&gt;&amp;nbsp;&lt;STRONG&gt;25&lt;/STRONG&gt;, 639–656 (2020). &lt;A href="https://doi.org/10.1007/s13253-020-00402-6" target="_blank"&gt;https://doi.org/10.1007/s13253-020-00402-6&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There is a tremendous amount of simulation involved and much discussion of bias and how it might be overcome. I may be misinterpreting your aims, but if you haven't read this paper you are missing out.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;SteveDenham&lt;/P&gt;</description>
      <pubDate>Wed, 06 Sep 2023 18:38:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Obtain-Correct-Marginal-Predictions-for-Mixed-Model-with/m-p/893018#M44242</guid>
      <dc:creator>SteveDenham</dc:creator>
      <dc:date>2023-09-06T18:38:07Z</dc:date>
    </item>
    <item>
      <title>Re: Obtain Correct Marginal Predictions for Mixed Model with Categorical Outcome</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Obtain-Correct-Marginal-Predictions-for-Mixed-Model-with/m-p/893174#M44252</link>
      <description>Thank you Steve.  I was not looking to deliberate between PL and Quadrature approaches but this is certainly a relevant topic.  Thanks for sharing!</description>
      <pubDate>Thu, 07 Sep 2023 15:31:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Obtain-Correct-Marginal-Predictions-for-Mixed-Model-with/m-p/893174#M44252</guid>
      <dc:creator>Haris</dc:creator>
      <dc:date>2023-09-07T15:31:12Z</dc:date>
    </item>
  </channel>
</rss>

