<?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 Adjusted Predictive Probabilities from Glimmix with random effects in Mixed in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/Adjusted-Predictive-Probabilities-from-Glimmix-with-random/m-p/714691#M34557</link>
    <description>&lt;P&gt;I'm working on a longitudinal model with subjects nested in&amp;nbsp;different&amp;nbsp;treatment methods looking at a binary endpoint for completion.&amp;nbsp;&amp;nbsp;I'd like to adjust them for some baseline factors (age, gender) but then I'd like to get an overall completion probability for each treatment alone and each treatment at each time point because there is an interaction.&amp;nbsp; Because of the nesting I've modeled&amp;nbsp;the adjusted predictive probabilities&amp;nbsp;in proc mixed using the same random effects for the overall by treatment&amp;nbsp;and added the time to the model outputting the LS means for each time point.&amp;nbsp; I've seen this done when there are no random effects with proc logistic and then modeling the predictive values in proc means, but are there any assumptions I'm violating by using this process with Glimmix and Mixed?&amp;nbsp; I haven't been able to find anything in the literature to outline this process.&amp;nbsp; Thanks in advance for your help.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Example data&lt;/P&gt;&lt;P&gt;Fullid&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; method&amp;nbsp;&amp;nbsp;&amp;nbsp; age_cat&amp;nbsp;&amp;nbsp;&amp;nbsp; sex&amp;nbsp; time&amp;nbsp;&amp;nbsp; value_miss&lt;/P&gt;&lt;P&gt;88&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Electronic&amp;nbsp;&amp;nbsp;&amp;nbsp; 35-44&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; M&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&lt;/P&gt;&lt;P&gt;88&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Electronic&amp;nbsp;&amp;nbsp;&amp;nbsp; 35-44&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; M&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0&lt;/P&gt;&lt;P&gt;88&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Electronic&amp;nbsp;&amp;nbsp;&amp;nbsp; 35-44&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; M&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;3&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&lt;/P&gt;&lt;P&gt;77&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Paper&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 25-34&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;F&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&lt;/P&gt;&lt;P&gt;77&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Paper&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 25-34&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;F&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&lt;/P&gt;&lt;P&gt;77&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Paper&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 25-34&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;F&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;3&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2" color="#000080"&gt;&lt;STRONG&gt;proc&lt;/STRONG&gt;&lt;/FONT&gt; &lt;STRONG&gt;&lt;FONT face="Courier New" size="2" color="#000080"&gt;glimmix&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT face="Courier New" size="2" color="#0000ff"&gt;data&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;=full;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2" color="#0000ff"&gt;where&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; method in (&lt;/FONT&gt;&lt;FONT face="Courier New" size="2" color="#800080"&gt;"Electronic"&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;, &lt;/FONT&gt;&lt;FONT face="Courier New" size="2" color="#800080"&gt;"Paper"&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2" color="#0000ff"&gt;format&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; age_cat &lt;/FONT&gt;&lt;FONT face="Courier New" size="2" color="#008080"&gt;age_cat.&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2" color="#0000ff"&gt;class&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; age_cat(ref=&lt;/FONT&gt;&lt;FONT face="Courier New" size="2" color="#800080"&gt;"35-44"&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;) sex time value_miss method full_id;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2" color="#0000ff"&gt;model&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; value_miss= age_cat sex time method method*time/&lt;/FONT&gt;&lt;FONT face="Courier New" size="2" color="#0000ff"&gt;cl&lt;/FONT&gt; &lt;FONT face="Courier New" size="2" color="#0000ff"&gt;oddsratio&lt;/FONT&gt; &lt;FONT face="Courier New" size="2" color="#0000ff"&gt;dist&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;=binary &lt;/FONT&gt;&lt;FONT face="Courier New" size="2" color="#0000ff"&gt;s&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2" color="#0000ff"&gt;random&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; intercept /&lt;/FONT&gt;&lt;FONT face="Courier New" size="2" color="#0000ff"&gt;subject&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;= full_id(method) ;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2" color="#0000ff"&gt;output&lt;/FONT&gt; &lt;FONT face="Courier New" size="2" color="#0000ff"&gt;out&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;=pred_elec_full pred(&lt;/FONT&gt;&lt;FONT face="Courier New" size="2" color="#0000ff"&gt;blup&lt;/FONT&gt; &lt;FONT face="Courier New" size="2" color="#0000ff"&gt;ilink&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;)=pred_val;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2" color="#0000ff"&gt;lsmeans&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; method/ &lt;/FONT&gt;&lt;FONT face="Courier New" size="2" color="#0000ff"&gt;cl&lt;/FONT&gt; &lt;FONT face="Courier New" size="2" color="#0000ff"&gt;or&lt;/FONT&gt; &lt;FONT face="Courier New" size="2" color="#0000ff"&gt;diff&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2" color="#0000ff"&gt;lsmeans&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; method*time /&lt;/FONT&gt;&lt;FONT face="Courier New" size="2" color="#0000ff"&gt;cl&lt;/FONT&gt; &lt;FONT face="Courier New" size="2" color="#0000ff"&gt;or&lt;/FONT&gt; &lt;FONT face="Courier New" size="2" color="#0000ff"&gt;diff&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2" color="#000080"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;/*to get the overall predictive probability by method*/&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2" color="#000080"&gt;&lt;STRONG&gt;proc&lt;/STRONG&gt;&lt;/FONT&gt; &lt;STRONG&gt;&lt;FONT face="Courier New" size="2" color="#000080"&gt;sort&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT face="Courier New" size="2" color="#0000ff"&gt;data&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;=pred_elec_full; &lt;/FONT&gt;&lt;FONT face="Courier New" size="2" color="#0000ff"&gt;by&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; method;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2" color="#0000ff"&gt;ods&lt;/FONT&gt; &lt;FONT face="Courier New" size="2" color="#0000ff"&gt;table&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; solutionf=e_pred_full4;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2" color="#000080"&gt;&lt;STRONG&gt;proc&lt;/STRONG&gt;&lt;/FONT&gt; &lt;STRONG&gt;&lt;FONT face="Courier New" size="2" color="#000080"&gt;mixed&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT face="Courier New" size="2" color="#0000ff"&gt;data&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;=pred_elec_full;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2" color="#0000ff"&gt;by&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; method;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2" color="#0000ff"&gt;class&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; full_id method;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2" color="#0000ff"&gt;model&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; pred_val=/&lt;/FONT&gt;&lt;FONT face="Courier New" size="2" color="#0000ff"&gt;s&lt;/FONT&gt; &lt;FONT face="Courier New" size="2" color="#0000ff"&gt;cl&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2" color="#0000ff"&gt;random&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; intercept /&lt;/FONT&gt;&lt;FONT face="Courier New" size="2" color="#0000ff"&gt;subject&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;= full_id(method) ;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2" color="#000080"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;/*to get the predictive probability by method for each time point*/&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2" color="#0000ff"&gt;ods&lt;/FONT&gt; &lt;FONT face="Courier New" size="2" color="#0000ff"&gt;table&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; lsmeans=e_pred_fullbytime;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2" color="#000080"&gt;&lt;STRONG&gt;proc&lt;/STRONG&gt;&lt;/FONT&gt; &lt;STRONG&gt;&lt;FONT face="Courier New" size="2" color="#000080"&gt;mixed&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT face="Courier New" size="2" color="#0000ff"&gt;data&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;=pred_elec_full;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2" color="#0000ff"&gt;by&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; method ;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2" color="#0000ff"&gt;class&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; full_id method time;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2" color="#0000ff"&gt;model&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; pred_val=time/&lt;/FONT&gt;&lt;FONT face="Courier New" size="2" color="#0000ff"&gt;s&lt;/FONT&gt; &lt;FONT face="Courier New" size="2" color="#0000ff"&gt;cl&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2" color="#0000ff"&gt;random&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; intercept /&lt;/FONT&gt;&lt;FONT face="Courier New" size="2" color="#0000ff"&gt;subject&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;= full_id(method) ;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2" color="#0000ff"&gt;lsmeans&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; time/ &lt;/FONT&gt;&lt;FONT face="Courier New" size="2" color="#0000ff"&gt;cl&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2" color="#000080"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 27 Jan 2021 18:10:58 GMT</pubDate>
    <dc:creator>Rae_</dc:creator>
    <dc:date>2021-01-27T18:10:58Z</dc:date>
    <item>
      <title>Adjusted Predictive Probabilities from Glimmix with random effects in Mixed</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Adjusted-Predictive-Probabilities-from-Glimmix-with-random/m-p/714691#M34557</link>
      <description>&lt;P&gt;I'm working on a longitudinal model with subjects nested in&amp;nbsp;different&amp;nbsp;treatment methods looking at a binary endpoint for completion.&amp;nbsp;&amp;nbsp;I'd like to adjust them for some baseline factors (age, gender) but then I'd like to get an overall completion probability for each treatment alone and each treatment at each time point because there is an interaction.&amp;nbsp; Because of the nesting I've modeled&amp;nbsp;the adjusted predictive probabilities&amp;nbsp;in proc mixed using the same random effects for the overall by treatment&amp;nbsp;and added the time to the model outputting the LS means for each time point.&amp;nbsp; I've seen this done when there are no random effects with proc logistic and then modeling the predictive values in proc means, but are there any assumptions I'm violating by using this process with Glimmix and Mixed?&amp;nbsp; I haven't been able to find anything in the literature to outline this process.&amp;nbsp; Thanks in advance for your help.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Example data&lt;/P&gt;&lt;P&gt;Fullid&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; method&amp;nbsp;&amp;nbsp;&amp;nbsp; age_cat&amp;nbsp;&amp;nbsp;&amp;nbsp; sex&amp;nbsp; time&amp;nbsp;&amp;nbsp; value_miss&lt;/P&gt;&lt;P&gt;88&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Electronic&amp;nbsp;&amp;nbsp;&amp;nbsp; 35-44&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; M&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&lt;/P&gt;&lt;P&gt;88&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Electronic&amp;nbsp;&amp;nbsp;&amp;nbsp; 35-44&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; M&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0&lt;/P&gt;&lt;P&gt;88&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Electronic&amp;nbsp;&amp;nbsp;&amp;nbsp; 35-44&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; M&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;3&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&lt;/P&gt;&lt;P&gt;77&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Paper&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 25-34&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;F&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&lt;/P&gt;&lt;P&gt;77&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Paper&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 25-34&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;F&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&lt;/P&gt;&lt;P&gt;77&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Paper&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 25-34&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;F&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;3&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2" color="#000080"&gt;&lt;STRONG&gt;proc&lt;/STRONG&gt;&lt;/FONT&gt; &lt;STRONG&gt;&lt;FONT face="Courier New" size="2" color="#000080"&gt;glimmix&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT face="Courier New" size="2" color="#0000ff"&gt;data&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;=full;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2" color="#0000ff"&gt;where&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; method in (&lt;/FONT&gt;&lt;FONT face="Courier New" size="2" color="#800080"&gt;"Electronic"&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;, &lt;/FONT&gt;&lt;FONT face="Courier New" size="2" color="#800080"&gt;"Paper"&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2" color="#0000ff"&gt;format&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; age_cat &lt;/FONT&gt;&lt;FONT face="Courier New" size="2" color="#008080"&gt;age_cat.&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2" color="#0000ff"&gt;class&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; age_cat(ref=&lt;/FONT&gt;&lt;FONT face="Courier New" size="2" color="#800080"&gt;"35-44"&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;) sex time value_miss method full_id;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2" color="#0000ff"&gt;model&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; value_miss= age_cat sex time method method*time/&lt;/FONT&gt;&lt;FONT face="Courier New" size="2" color="#0000ff"&gt;cl&lt;/FONT&gt; &lt;FONT face="Courier New" size="2" color="#0000ff"&gt;oddsratio&lt;/FONT&gt; &lt;FONT face="Courier New" size="2" color="#0000ff"&gt;dist&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;=binary &lt;/FONT&gt;&lt;FONT face="Courier New" size="2" color="#0000ff"&gt;s&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2" color="#0000ff"&gt;random&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; intercept /&lt;/FONT&gt;&lt;FONT face="Courier New" size="2" color="#0000ff"&gt;subject&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;= full_id(method) ;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2" color="#0000ff"&gt;output&lt;/FONT&gt; &lt;FONT face="Courier New" size="2" color="#0000ff"&gt;out&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;=pred_elec_full pred(&lt;/FONT&gt;&lt;FONT face="Courier New" size="2" color="#0000ff"&gt;blup&lt;/FONT&gt; &lt;FONT face="Courier New" size="2" color="#0000ff"&gt;ilink&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;)=pred_val;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2" color="#0000ff"&gt;lsmeans&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; method/ &lt;/FONT&gt;&lt;FONT face="Courier New" size="2" color="#0000ff"&gt;cl&lt;/FONT&gt; &lt;FONT face="Courier New" size="2" color="#0000ff"&gt;or&lt;/FONT&gt; &lt;FONT face="Courier New" size="2" color="#0000ff"&gt;diff&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2" color="#0000ff"&gt;lsmeans&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; method*time /&lt;/FONT&gt;&lt;FONT face="Courier New" size="2" color="#0000ff"&gt;cl&lt;/FONT&gt; &lt;FONT face="Courier New" size="2" color="#0000ff"&gt;or&lt;/FONT&gt; &lt;FONT face="Courier New" size="2" color="#0000ff"&gt;diff&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2" color="#000080"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;/*to get the overall predictive probability by method*/&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2" color="#000080"&gt;&lt;STRONG&gt;proc&lt;/STRONG&gt;&lt;/FONT&gt; &lt;STRONG&gt;&lt;FONT face="Courier New" size="2" color="#000080"&gt;sort&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT face="Courier New" size="2" color="#0000ff"&gt;data&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;=pred_elec_full; &lt;/FONT&gt;&lt;FONT face="Courier New" size="2" color="#0000ff"&gt;by&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; method;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2" color="#0000ff"&gt;ods&lt;/FONT&gt; &lt;FONT face="Courier New" size="2" color="#0000ff"&gt;table&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; solutionf=e_pred_full4;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2" color="#000080"&gt;&lt;STRONG&gt;proc&lt;/STRONG&gt;&lt;/FONT&gt; &lt;STRONG&gt;&lt;FONT face="Courier New" size="2" color="#000080"&gt;mixed&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT face="Courier New" size="2" color="#0000ff"&gt;data&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;=pred_elec_full;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2" color="#0000ff"&gt;by&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; method;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2" color="#0000ff"&gt;class&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; full_id method;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2" color="#0000ff"&gt;model&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; pred_val=/&lt;/FONT&gt;&lt;FONT face="Courier New" size="2" color="#0000ff"&gt;s&lt;/FONT&gt; &lt;FONT face="Courier New" size="2" color="#0000ff"&gt;cl&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2" color="#0000ff"&gt;random&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; intercept /&lt;/FONT&gt;&lt;FONT face="Courier New" size="2" color="#0000ff"&gt;subject&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;= full_id(method) ;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2" color="#000080"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;/*to get the predictive probability by method for each time point*/&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2" color="#0000ff"&gt;ods&lt;/FONT&gt; &lt;FONT face="Courier New" size="2" color="#0000ff"&gt;table&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; lsmeans=e_pred_fullbytime;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2" color="#000080"&gt;&lt;STRONG&gt;proc&lt;/STRONG&gt;&lt;/FONT&gt; &lt;STRONG&gt;&lt;FONT face="Courier New" size="2" color="#000080"&gt;mixed&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT face="Courier New" size="2" color="#0000ff"&gt;data&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;=pred_elec_full;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2" color="#0000ff"&gt;by&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; method ;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2" color="#0000ff"&gt;class&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; full_id method time;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2" color="#0000ff"&gt;model&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; pred_val=time/&lt;/FONT&gt;&lt;FONT face="Courier New" size="2" color="#0000ff"&gt;s&lt;/FONT&gt; &lt;FONT face="Courier New" size="2" color="#0000ff"&gt;cl&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2" color="#0000ff"&gt;random&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; intercept /&lt;/FONT&gt;&lt;FONT face="Courier New" size="2" color="#0000ff"&gt;subject&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;= full_id(method) ;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2" color="#0000ff"&gt;lsmeans&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; time/ &lt;/FONT&gt;&lt;FONT face="Courier New" size="2" color="#0000ff"&gt;cl&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2" color="#000080"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 27 Jan 2021 18:10:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Adjusted-Predictive-Probabilities-from-Glimmix-with-random/m-p/714691#M34557</guid>
      <dc:creator>Rae_</dc:creator>
      <dc:date>2021-01-27T18:10:58Z</dc:date>
    </item>
    <item>
      <title>Re: Adjusted Predictive Probabilities from Glimmix with random effects in Mixed</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Adjusted-Predictive-Probabilities-from-Glimmix-with-random/m-p/714971#M34575</link>
      <description>&lt;P&gt;This looks to me to be a lot like what the %NLmeans macro is meant for.&amp;nbsp; Calling&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13633"&gt;@StatDave&lt;/a&gt;&amp;nbsp; as he seems to be the guru in this area.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;SteveDenham&lt;/P&gt;</description>
      <pubDate>Thu, 28 Jan 2021 13:21:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Adjusted-Predictive-Probabilities-from-Glimmix-with-random/m-p/714971#M34575</guid>
      <dc:creator>SteveDenham</dc:creator>
      <dc:date>2021-01-28T13:21:23Z</dc:date>
    </item>
    <item>
      <title>Re: Adjusted Predictive Probabilities from Glimmix with random effects in Mixed</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Adjusted-Predictive-Probabilities-from-Glimmix-with-random/m-p/715042#M34582</link>
      <description>&lt;P&gt;Your stated goal of estimating "overall" probabilities for the treatments suggests that a population-averaged model, such as a GEE model, might be more suitable than the subject-specific random effects model you have used. If you take that approach, you could fit the model in PROC GENMOD or PROC GEE with a REPEATED statement and then use either the &lt;A href="http://support.sas.com/kb/63038" target="_self"&gt;Margins macro&lt;/A&gt; (if you want predictive margins to allow some predictors to not be fixed) or the &lt;A href="http://support.sas.com/kb/62362" target="_self"&gt;NLMeans macro&lt;/A&gt; (if all predictors are fixed as with LS-means). Either will provide estimates of population means (probabilities in this case) and can compare them. You can see both in the example in &lt;A href="http://support.sas.com/kb/46997" target="_self"&gt;this note&lt;/A&gt;. More examples of using these macros are in their documentation using the links above.&lt;/P&gt;</description>
      <pubDate>Thu, 28 Jan 2021 16:12:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Adjusted-Predictive-Probabilities-from-Glimmix-with-random/m-p/715042#M34582</guid>
      <dc:creator>StatDave</dc:creator>
      <dc:date>2021-01-28T16:12:57Z</dc:date>
    </item>
  </channel>
</rss>

