<?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 Absorb Fixed Effects and Cluster Standard Errors in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Absorb-Fixed-Effects-and-Cluster-Standard-Errors/m-p/226371#M54022</link>
    <description>&lt;P&gt;Is there a SAS equivalent to Stata's areg command? Specifically, I'm looking for a procedure that will replicate the following Stata command:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;areg depvar indvar, absorb(id1) cluster(id2)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In this case id1 is nested within id2.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;The proc genmod below clusters the standard errors at the id2 level, but is not able to absorb id1.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;proc genmod;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; class id2;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; model depvar = indvar;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; repeated subject=id2 / type=ind;&lt;/DIV&gt;&lt;DIV&gt;run;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;The proc glm below absorbs id1 but cannot cluster the standard errors at the id2 level.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;proc glm;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; absorb id1;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; model depvar = indvar / solution noint;&lt;/DIV&gt;&lt;DIV&gt;run;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Is there a simple way to both absorb id1 and cluster on id2?&lt;/DIV&gt;</description>
    <pubDate>Fri, 18 Sep 2015 18:32:10 GMT</pubDate>
    <dc:creator>econjoe</dc:creator>
    <dc:date>2015-09-18T18:32:10Z</dc:date>
    <item>
      <title>Absorb Fixed Effects and Cluster Standard Errors</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Absorb-Fixed-Effects-and-Cluster-Standard-Errors/m-p/226371#M54022</link>
      <description>&lt;P&gt;Is there a SAS equivalent to Stata's areg command? Specifically, I'm looking for a procedure that will replicate the following Stata command:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;areg depvar indvar, absorb(id1) cluster(id2)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In this case id1 is nested within id2.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;The proc genmod below clusters the standard errors at the id2 level, but is not able to absorb id1.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;proc genmod;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; class id2;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; model depvar = indvar;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; repeated subject=id2 / type=ind;&lt;/DIV&gt;&lt;DIV&gt;run;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;The proc glm below absorbs id1 but cannot cluster the standard errors at the id2 level.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;proc glm;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; absorb id1;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; model depvar = indvar / solution noint;&lt;/DIV&gt;&lt;DIV&gt;run;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Is there a simple way to both absorb id1 and cluster on id2?&lt;/DIV&gt;</description>
      <pubDate>Fri, 18 Sep 2015 18:32:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Absorb-Fixed-Effects-and-Cluster-Standard-Errors/m-p/226371#M54022</guid>
      <dc:creator>econjoe</dc:creator>
      <dc:date>2015-09-18T18:32:10Z</dc:date>
    </item>
    <item>
      <title>Re: Absorb Fixed Effects and Cluster Standard Errors</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Absorb-Fixed-Effects-and-Cluster-Standard-Errors/m-p/227319#M54174</link>
      <description>&lt;P&gt;I am not real sure, but would some sort of hierarchical model, such as GLIMMIX work for what you want?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc glimmix data=have;&lt;/P&gt;&lt;P&gt;class id1 id2;&lt;/P&gt;&lt;P&gt;model depvar=indvar;&lt;/P&gt;&lt;P&gt;random intercept/subject=id1;&lt;/P&gt;&lt;P&gt;random _residual_/subject=id2(id1) type=vc;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Steve Denham&lt;/P&gt;</description>
      <pubDate>Fri, 25 Sep 2015 17:48:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Absorb-Fixed-Effects-and-Cluster-Standard-Errors/m-p/227319#M54174</guid>
      <dc:creator>SteveDenham</dc:creator>
      <dc:date>2015-09-25T17:48:40Z</dc:date>
    </item>
  </channel>
</rss>

