<?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: Glimmix and predictive margins in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/Glimmix-and-predictive-margins/m-p/233407#M12303</link>
    <description>&lt;P&gt;Thank you all for your advice and help! I guess there is no easy way to do this - but I did not expect that either.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Anders&lt;/P&gt;</description>
    <pubDate>Fri, 06 Nov 2015 11:21:19 GMT</pubDate>
    <dc:creator>AJJ</dc:creator>
    <dc:date>2015-11-06T11:21:19Z</dc:date>
    <item>
      <title>Glimmix and predictive margins</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Glimmix-and-predictive-margins/m-p/233075#M12277</link>
      <description>&lt;P&gt;Hello all&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My current work involves profiling of hospital performance regarding a specific binary quality indicator (Patients are nested within hospitals, i.e. 2-level data)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Performance will be adjusted for various risk factors, e.g. age, diagnosis etc.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My intention is then to use a random hospital intercept binary logit model (a&amp;nbsp;fixed effect model &amp;nbsp;- estimating intercepts for each hospital using dummies - could perhaps &amp;nbsp;be an alternative ) ,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As a risk adjusted measure of hospital performance I would use so called "predictive margins"; i.e.:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1. Estimate the random intercept model including the empirical bayesian estimates (BLUPs) of the hospital specific intercepts&lt;/P&gt;&lt;P&gt;2. Assume all patients belong to hospital 1 - values on risk factors remain unchanged&lt;/P&gt;&lt;P&gt;&lt;SPAN style="line-height: 20px;"&gt;3. calculate the predicted&amp;nbsp;&lt;/SPAN&gt;probability using the estimated fixed parameters and BLUP for hospital 1 for each patient and average over patients&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Do 2 and 3 for every hospital.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Questions:&lt;/P&gt;&lt;P&gt;1. This is a build in command in stata (the margins command), but I guess i could obtain the same results using "store" in glimmix and proc plm?&lt;/P&gt;&lt;P&gt;2. the margins command in Stata uses the delta method to obtain standard errors of the predictive margins. Is there some way I could get the standard errors in SAS without having to bootstrap (time consuming since &amp;gt; 100 hospitals)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Anders&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 04 Nov 2015 14:19:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Glimmix-and-predictive-margins/m-p/233075#M12277</guid>
      <dc:creator>AJJ</dc:creator>
      <dc:date>2015-11-04T14:19:55Z</dc:date>
    </item>
    <item>
      <title>Re: Glimmix and predictive margins</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Glimmix-and-predictive-margins/m-p/233119#M12280</link>
      <description>&lt;P&gt;A general SAS observation when you say you want to "do the same thing for each hospita"l: BY processing. Sort the data by the variable(s) of interest and then add a BY statement to the procedure. You will get output for each level of the variable, or combination of variables, specified.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There are few exceptions but generally the BY group processsing is the preferred approach.&lt;/P&gt;</description>
      <pubDate>Wed, 04 Nov 2015 17:08:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Glimmix-and-predictive-margins/m-p/233119#M12280</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2015-11-04T17:08:53Z</dc:date>
    </item>
    <item>
      <title>Re: Glimmix and predictive margins</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Glimmix-and-predictive-margins/m-p/233141#M12282</link>
      <description>&lt;P&gt;Does this example in the PROC HPLMIXED&amp;nbsp;documentation help in any way (Example 9.1 Computing BLUPs for a Large Number of Subjects)? &amp;nbsp;You would need to "know" the covariance parameters, but approximate values might be obtained from a preliminary analysis using PROC MIXED/GLIMMIX. &amp;nbsp;I realize the HPLMIXED is for a normal variate, and yours is binomial, but it sure looks like the right starting point to me.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Steve Denham&lt;/P&gt;</description>
      <pubDate>Wed, 04 Nov 2015 19:08:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Glimmix-and-predictive-margins/m-p/233141#M12282</guid>
      <dc:creator>SteveDenham</dc:creator>
      <dc:date>2015-11-04T19:08:23Z</dc:date>
    </item>
    <item>
      <title>Re: Glimmix and predictive margins</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Glimmix-and-predictive-margins/m-p/233186#M12292</link>
      <description>&lt;P&gt;You can get the EBLUPs easy enough with a solution option on a random statement:&lt;/P&gt;
&lt;P&gt;random hospital / s;&lt;/P&gt;
&lt;P&gt;You could store these with the approrpriate ODS OUTPUT statement (look up the name for the random effect predictions). You can get the inverse link for each subject using ESTIMATE statements. For instance, assume you have one predictor variable X, the EBLUP for hospital one and three are :&lt;/P&gt;
&lt;P&gt;class hospital .....&amp;lt;&lt;EM&gt;other terms&lt;/EM&gt;&amp;gt; ...;&lt;/P&gt;
&lt;P&gt;model y = X / dist=binomial link=logit;&lt;/P&gt;
&lt;P&gt;random hospital / s;&lt;/P&gt;
&lt;P&gt;estimate 'x 1 hosp 1' int 1 X 1 | hospital 1 / ilink;&lt;/P&gt;
&lt;P&gt;estimate 'x 1 hosp 2' int 1 X 1 | hospital 0 0 1 / ilink;&lt;/P&gt;
&lt;P&gt;My code gets the EBLUP for X=1 (if X is continuous) or the first level of X if it is a factor.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The ILINK option uses the delta method for the SEs. I have never heard of predictive margins, and have no idea why one assumes that all observations belong, in turn, to each subject. I assume there are good reasons. But based on what you wrote, you would need to write code in a data step (or multiple data steps) to do what you want. It would take some time.&lt;/P&gt;</description>
      <pubDate>Wed, 04 Nov 2015 23:06:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Glimmix-and-predictive-margins/m-p/233186#M12292</guid>
      <dc:creator>lvm</dc:creator>
      <dc:date>2015-11-04T23:06:55Z</dc:date>
    </item>
    <item>
      <title>Re: Glimmix and predictive margins</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Glimmix-and-predictive-margins/m-p/233407#M12303</link>
      <description>&lt;P&gt;Thank you all for your advice and help! I guess there is no easy way to do this - but I did not expect that either.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Anders&lt;/P&gt;</description>
      <pubDate>Fri, 06 Nov 2015 11:21:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Glimmix-and-predictive-margins/m-p/233407#M12303</guid>
      <dc:creator>AJJ</dc:creator>
      <dc:date>2015-11-06T11:21:19Z</dc:date>
    </item>
  </channel>
</rss>

