<?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 'aggregate' differences in LSMeans (i.e., differences in differences in LS Means) in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Obtain-aggregate-differences-in-LSMeans-i-e-differences-in/m-p/632744#M187611</link>
    <description>&lt;P&gt;Thanks Paige - I think I figured it out. It looks like SAS generates what I think of as the differences in differences of my example table (i.e., [a - b] - [c - d]) in its&amp;nbsp;&lt;SPAN&gt;Analysis Of Maximum Likelihood Parameter Estimates output. I was using GENMOD. I worked it out by hand and am coming up with the same answer that is being generated in the Parameter Estimates.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 17 Mar 2020 17:39:07 GMT</pubDate>
    <dc:creator>N8</dc:creator>
    <dc:date>2020-03-17T17:39:07Z</dc:date>
    <item>
      <title>Obtain 'aggregate' differences in LSMeans (i.e., differences in differences in LS Means)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Obtain-aggregate-differences-in-LSMeans-i-e-differences-in/m-p/632709#M187594</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;I have a fairly straightforward question about subtracting differences in LS Means. I'm pretty sure there is a built in function in SAS to do this, but don't know what it is. Basic need is the following and I'll explain using a table.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What I want to do is calculate differences in LS Means between two comparisons, or essentially a differences in differences. For example, say I want to look at differences in deaths between people with and w/out insurance. Running LS Means to obtain (a - b) and (c - d) is pretty straight forward using the "lsmeans insurance*death / diff cl function". But what I want to get is the aggregate disparity, which i need to do via subtraction + get the associated confidence interval and p value. I'm pretty sure I can just do this by hand using Z test, but it would be way easier if SAS had built in function to obtain what essentially is a differences in differences problem. I've tried using the 'slice by' function, but I'm getting what i normally would get by using the contrast/estimate coding. Thank you for your help.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Disparity Event Table&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Alive &lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;Dead &lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;Disparity&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; No Insurance &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;a&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;b&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&amp;nbsp; &lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;a-b&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Insurance &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;c&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;d&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;c-d&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Aggregate Disparity&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;(a-b)–(c-d) &amp;nbsp;* this is what I need&lt;/P&gt;</description>
      <pubDate>Tue, 17 Mar 2020 15:59:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Obtain-aggregate-differences-in-LSMeans-i-e-differences-in/m-p/632709#M187594</guid>
      <dc:creator>N8</dc:creator>
      <dc:date>2020-03-17T15:59:10Z</dc:date>
    </item>
    <item>
      <title>Re: Obtain 'aggregate' differences in LSMeans (i.e., differences in differences in LS Means)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Obtain-aggregate-differences-in-LSMeans-i-e-differences-in/m-p/632740#M187608</link>
      <description>&lt;P&gt;What SAS PROC are you using?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Some SAS PROCs have the LSMESTIMATE statement, this is what you need.&lt;/P&gt;</description>
      <pubDate>Tue, 17 Mar 2020 17:32:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Obtain-aggregate-differences-in-LSMeans-i-e-differences-in/m-p/632740#M187608</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2020-03-17T17:32:21Z</dc:date>
    </item>
    <item>
      <title>Re: Obtain 'aggregate' differences in LSMeans (i.e., differences in differences in LS Means)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Obtain-aggregate-differences-in-LSMeans-i-e-differences-in/m-p/632744#M187611</link>
      <description>&lt;P&gt;Thanks Paige - I think I figured it out. It looks like SAS generates what I think of as the differences in differences of my example table (i.e., [a - b] - [c - d]) in its&amp;nbsp;&lt;SPAN&gt;Analysis Of Maximum Likelihood Parameter Estimates output. I was using GENMOD. I worked it out by hand and am coming up with the same answer that is being generated in the Parameter Estimates.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 17 Mar 2020 17:39:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Obtain-aggregate-differences-in-LSMeans-i-e-differences-in/m-p/632744#M187611</guid>
      <dc:creator>N8</dc:creator>
      <dc:date>2020-03-17T17:39:07Z</dc:date>
    </item>
  </channel>
</rss>

