<?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: DID in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/DID/m-p/927231#M46130</link>
    <description>&lt;P&gt;This is the same question as posted in the programming board.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Home &amp;gt; Programming &amp;gt; Programming &amp;gt; Difference-in-difference&lt;BR /&gt;&lt;A href="https://communities.sas.com/t5/SAS-Programming/Difference-in-difference/m-p/927128" target="_blank"&gt;https://communities.sas.com/t5/SAS-Programming/Difference-in-difference/m-p/927128&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Please do not duplicate your question on multiple boards.&lt;/P&gt;
&lt;P&gt;Also take the right board. I will move this one to "Statistical Procedures"-board in a minute.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Koen&lt;/P&gt;</description>
    <pubDate>Mon, 06 May 2024 20:55:05 GMT</pubDate>
    <dc:creator>sbxkoenk</dc:creator>
    <dc:date>2024-05-06T20:55:05Z</dc:date>
    <item>
      <title>DID</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/DID/m-p/927130#M46129</link>
      <description>&lt;P&gt;I am currently analyzing the impact of an intervention on medication numbers using difference-in-difference analysis, but I have encountered several challenges.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Following the SAS support instructions, I conducted the difference-in-difference analysis. However, I noticed a discrepancy between my results and SAS's example &lt;FONT size="1 2 3 4 5 6 7"&gt;(&lt;/FONT&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;Usage Note&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;I&gt;61830:&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/I&gt;Estimating the difference in differences of means)&lt;/FONT&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In the example, the value of 'Mean Estimate' in 'Contrast Estimate Results' is identical to the 'Estimate' in 'Least Squares Means Estimate'. However, in my case, these values were different. I suspect this could be due to my use of the negative binomial distribution with a log link, resulting in exponential values. Consequently, I am unsure whether to rely on the 'Mean Estimate' in 'Contrast Estimate Results' or the 'Estimate' in 'Least Squares Means Estimate', and how to interpret the results."&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Contrast Estimate Results&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Label&lt;/TD&gt;&lt;TD&gt;Mean Estimate&lt;/TD&gt;&lt;TD&gt;&lt;SPAN&gt;Mean Confidence Limits&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD&gt;&lt;SPAN&gt;L'Beta Estimate&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD&gt;&lt;SPAN&gt;Standard Error&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;diff in diff&lt;/TD&gt;&lt;TD&gt;1.51&lt;/TD&gt;&lt;TD&gt;1.49&lt;/TD&gt;&lt;TD&gt;0.41&lt;/TD&gt;&lt;TD&gt;0.0051&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;a*b Least Squares Means&lt;/SPAN&gt;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;a&lt;/TD&gt;&lt;TD&gt;b&lt;/TD&gt;&lt;TD&gt;&lt;SPAN&g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&lt;TD&gt;Standard Error&lt;/TD&gt;&lt;TD&gt;z value&lt;/TD&gt;&lt;TD&gt;Pr &amp;gt; |z|&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;time*hospitalize&lt;/TD&gt;&lt;TD&gt;diff in diff&lt;/TD&gt;&lt;TD&gt;0.41&lt;/TD&gt;&lt;TD&gt;0.00509&lt;/TD&gt;&lt;TD&gt;81.01&lt;/TD&gt;&lt;TD&gt;&amp;lt;.0001&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;</description>
      <pubDate>Mon, 06 May 2024 06:50:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/DID/m-p/927130#M46129</guid>
      <dc:creator>Emily_Chi</dc:creator>
      <dc:date>2024-05-06T06:50:30Z</dc:date>
    </item>
    <item>
      <title>Re: DID</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/DID/m-p/927231#M46130</link>
      <description>&lt;P&gt;This is the same question as posted in the programming board.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Home &amp;gt; Programming &amp;gt; Programming &amp;gt; Difference-in-difference&lt;BR /&gt;&lt;A href="https://communities.sas.com/t5/SAS-Programming/Difference-in-difference/m-p/927128" target="_blank"&gt;https://communities.sas.com/t5/SAS-Programming/Difference-in-difference/m-p/927128&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Please do not duplicate your question on multiple boards.&lt;/P&gt;
&lt;P&gt;Also take the right board. I will move this one to "Statistical Procedures"-board in a minute.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Koen&lt;/P&gt;</description>
      <pubDate>Mon, 06 May 2024 20:55:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/DID/m-p/927231#M46130</guid>
      <dc:creator>sbxkoenk</dc:creator>
      <dc:date>2024-05-06T20:55:05Z</dc:date>
    </item>
    <item>
      <title>Re: DID</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/DID/m-p/927246#M46131</link>
      <description>Reread the text at the beginning of the "Generalized Linear Models with a Non-Identity Link" section - this section, and not the first section on a normal response, applies to your log-linked model. As stated there:&lt;BR /&gt;&lt;BR /&gt;"Because this is not a linear combination of the model parameters or of the LS-means, you cannot use the ESTIMATE or LSMESTIMATE statements to estimate the difference in differences of means. "</description>
      <pubDate>Mon, 06 May 2024 22:20:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/DID/m-p/927246#M46131</guid>
      <dc:creator>StatDave</dc:creator>
      <dc:date>2024-05-06T22:20:10Z</dc:date>
    </item>
    <item>
      <title>Re: DID</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/DID/m-p/927263#M46134</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Thank you for providing clarification on this issue! &lt;/SPAN&gt;It's really helpful for me.&lt;/P&gt;</description>
      <pubDate>Tue, 07 May 2024 05:03:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/DID/m-p/927263#M46134</guid>
      <dc:creator>Emily_Chi</dc:creator>
      <dc:date>2024-05-07T05:03:46Z</dc:date>
    </item>
    <item>
      <title>Re: DID</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/DID/m-p/927329#M46143</link>
      <description>Note that when you use the ESTIMATE statement in PROC GENMOD, the results automatically include a "Mean Estimate" which, in your case, is 1.51. But this is a mean only when the contrast specified in the statement defines one population and not a comparison of populations such as a difference in difference contrast. The Mean estimate just applies the inverse of the link function to the computed contrast and is often meaningless. For the difference in difference contrast (1 -1 -1 1) in a log linked model, the Mean estimate is exp[log(mean_11)-log(mean_10)-log(mean_01)+log(mean_00)] which, when simplified is the ratio of mean ratios rather than the difference of mean differences: (mean_11/mean_10)/(mean_01/mean_00).</description>
      <pubDate>Tue, 07 May 2024 15:29:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/DID/m-p/927329#M46143</guid>
      <dc:creator>StatDave</dc:creator>
      <dc:date>2024-05-07T15:29:25Z</dc:date>
    </item>
    <item>
      <title>Re: DID</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/DID/m-p/927479#M46153</link>
      <description>&lt;P&gt;If the outcome is not binary, I cannot use logistic regression in DID, right?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The outcome of my study is the number of medications, which is not the binary outcome. The&amp;nbsp;outcome&amp;nbsp;is continuous, however, it is a gamma distribution, so I used a log link to address the right-skew problem. I think&amp;nbsp;that it&amp;nbsp;could not use the DID with normal distribution, is&amp;nbsp;there any suggestion for analysis of gamma distribution outcome in DID? Thank you.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 08 May 2024 08:24:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/DID/m-p/927479#M46153</guid>
      <dc:creator>Emily_Chi</dc:creator>
      <dc:date>2024-05-08T08:24:24Z</dc:date>
    </item>
    <item>
      <title>Re: DID</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/DID/m-p/927480#M46154</link>
      <description>&lt;P&gt;&lt;A href="https://communities.sas.com/t5/Statistical-Procedures/Difference-in-difference-for-gamma-distribution/td-p/623102" target="_blank"&gt;https://communities.sas.com/t5/Statistical-Procedures/Difference-in-difference-for-gamma-distribution/td-p/623102&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;For difference in difference analysis with non-normal responses, see&amp;nbsp;&lt;/SPAN&gt;&lt;A href="http://support.sas.com/kb/61830" target="_self" rel="nofollow noopener noreferrer"&gt;this note&lt;/A&gt;&lt;SPAN&gt;.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Koen&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 08 May 2024 08:32:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/DID/m-p/927480#M46154</guid>
      <dc:creator>sbxkoenk</dc:creator>
      <dc:date>2024-05-08T08:32:37Z</dc:date>
    </item>
    <item>
      <title>Re: DID</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/DID/m-p/927589#M46163</link>
      <description>If your response is a count of medications, then it is a discrete, categorical variable which is typically modeled using either the Poisson or negative binomial distribution. The "Generalized Linear Models with a Non-Identity Link" section of the note that you mentioned (61830) deals with the range of generalized linear models which includes many response distributions including Poisson, negative binomial, gamma and others, not just binary response models. The note just uses a binary response model as an example, but the methods discussed in that section apply to the range of models.</description>
      <pubDate>Wed, 08 May 2024 20:05:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/DID/m-p/927589#M46163</guid>
      <dc:creator>StatDave</dc:creator>
      <dc:date>2024-05-08T20:05:15Z</dc:date>
    </item>
    <item>
      <title>Re: DID</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/DID/m-p/927807#M46177</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Thanks for your response.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 10 May 2024 05:13:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/DID/m-p/927807#M46177</guid>
      <dc:creator>Emily_Chi</dc:creator>
      <dc:date>2024-05-10T05:13:44Z</dc:date>
    </item>
  </channel>
</rss>

