<?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: Variance estimation in multilevel models [glimmix] in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Variance-estimation-in-multilevel-models-glimmix/m-p/180003#M45917</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yeah, good catch on the subject= option.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OK, with &amp;gt;100,000 households, I suspect you are going to have to collapse the data (or work on a larger system).&amp;nbsp; However, if house is a numeric variable, you might be able to get this to work if you remove house from the CLASS statement.&amp;nbsp; I know the RANDOM statement and the subject= option will take continuous variables.&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>Thu, 17 Jul 2014 11:55:55 GMT</pubDate>
    <dc:creator>SteveDenham</dc:creator>
    <dc:date>2014-07-17T11:55:55Z</dc:date>
    <item>
      <title>Variance estimation in multilevel models [glimmix]</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Variance-estimation-in-multilevel-models-glimmix/m-p/180000#M45914</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a question about robust variance estimation with multilevel models.&amp;nbsp; &lt;/P&gt;&lt;P&gt;Some context - I am using survey data - there are 50 strata [varname: region]; household clusters were randomly selected within strata [varname: house] and all household members were surveyed.&amp;nbsp; Region is an interesting variable that I would like to model as a random effect.&amp;nbsp; Households are a nuisance variable. My outcome is binary [varname:&amp;nbsp; outcome].&amp;nbsp;&amp;nbsp; For simplicity sake, I have one independent variable, [varname: var1].&amp;nbsp; Weighting is not important.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here's what I have so far:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc glimmix;&lt;/P&gt;&lt;P&gt;class region house var1;&lt;/P&gt;&lt;P&gt;model outcome=var1/dist=binary link=logit;&lt;/P&gt;&lt;P&gt;random intercept /id=region;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I cannot figure out how to model the clustering within households.&amp;nbsp; I understand that I can include the 'empirical' command to the proc statement to generate robust sandwich estimators - is this what I want?&amp;nbsp; Or am I off base?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Jul 2014 15:08:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Variance-estimation-in-multilevel-models-glimmix/m-p/180000#M45914</guid>
      <dc:creator>DocHP</dc:creator>
      <dc:date>2014-07-15T15:08:04Z</dc:date>
    </item>
    <item>
      <title>Re: Variance estimation in multilevel models [glimmix]</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Variance-estimation-in-multilevel-models-glimmix/m-p/180001#M45915</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If house is nested in region (seems a logical assumption to me), then the following might work:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc glimmix method=laplace empirical;&lt;/P&gt;&lt;P&gt;class region house var1;&lt;/P&gt;&lt;P&gt;model outcome=var1/dist=binary link=logit;&lt;/P&gt;&lt;P&gt;random intercept region/id=house;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This will result in outcome being conditional on the random effects.&amp;nbsp; Be sure to sort the data by region and house. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If this runs into convergence problems, you may want to convert from binary to binomial, by going to the events/trial syntax per house.&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, 16 Jul 2014 12:00:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Variance-estimation-in-multilevel-models-glimmix/m-p/180001#M45915</guid>
      <dc:creator>SteveDenham</dc:creator>
      <dc:date>2014-07-16T12:00:10Z</dc:date>
    </item>
    <item>
      <title>Re: Variance estimation in multilevel models [glimmix]</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Variance-estimation-in-multilevel-models-glimmix/m-p/180002#M45916</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks - I assume you mean subject=house instead of id=house? [it doesn't run otherwise]&amp;nbsp; &lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;Replacing id with subject, the code works, &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc glimmix data=events oddsratio method=laplace empirical;&lt;/P&gt;&lt;P&gt;class region house var1 ;&lt;/P&gt;&lt;P&gt;model hcf4/n=var1 /dist=binomial link=logit;&lt;/P&gt;&lt;P&gt;random intercept region /subject=house;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;BUT.....&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;I get an error message&amp;nbsp; - even using the events/trials syntax.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; ERROR: Model is too large to be fit by PROC GLIMMIX in a reasonable amount of time on this system. Consider changing your model.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is a pretty big data set with &amp;gt; 100,000 households. Other suggestions?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Jul 2014 23:09:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Variance-estimation-in-multilevel-models-glimmix/m-p/180002#M45916</guid>
      <dc:creator>DocHP</dc:creator>
      <dc:date>2014-07-16T23:09:52Z</dc:date>
    </item>
    <item>
      <title>Re: Variance estimation in multilevel models [glimmix]</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Variance-estimation-in-multilevel-models-glimmix/m-p/180003#M45917</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yeah, good catch on the subject= option.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OK, with &amp;gt;100,000 households, I suspect you are going to have to collapse the data (or work on a larger system).&amp;nbsp; However, if house is a numeric variable, you might be able to get this to work if you remove house from the CLASS statement.&amp;nbsp; I know the RANDOM statement and the subject= option will take continuous variables.&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>Thu, 17 Jul 2014 11:55:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Variance-estimation-in-multilevel-models-glimmix/m-p/180003#M45917</guid>
      <dc:creator>SteveDenham</dc:creator>
      <dc:date>2014-07-17T11:55:55Z</dc:date>
    </item>
  </channel>
</rss>

