<?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 Difference_in_difference model(DID) with matched pair in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/Difference-in-difference-model-DID-with-matched-pair/m-p/469891#M24444</link>
    <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am running the DID regression model to estimate the treatment effect.&lt;/P&gt;&lt;P&gt;Prior to this, I have created the dataset using propensity score matching. So, I have matched pairs (each treated subject is matched to two nearest neighbours control subject).&lt;/P&gt;&lt;P&gt;I am using below code. However, this code does not account for the matched data.&lt;/P&gt;&lt;P&gt;Indeed, the matched pair should be the unit of analysis and I need to modify the below code to accout for the&amp;nbsp; matched pairs&lt;/P&gt;&lt;P&gt;To make it clear, the below code considers all treated subjects versus all control subjects while&amp;nbsp; I am looking for the differences between treated and control subject in each matched pair.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advanced&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;/*Repeated measure linear regression*/&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;PROC MIXED DATA = Long; /* long format*/&lt;BR /&gt;&lt;BR /&gt;CLASS A B;&lt;BR /&gt;&lt;BR /&gt;MODEL Y=A|B covariatesX1 X2..Xn / SOLUTION;&lt;BR /&gt;LSMEANS&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; A|B / DIFF;&lt;BR /&gt;ESTIMATE&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'D-I-D' A*&lt;STRONG&gt;B&lt;/STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1 -1 -1 1;&lt;BR /&gt;RANDOM &amp;nbsp; &amp;nbsp; Int/SUBJECT= &amp;nbsp; &amp;nbsp; TYPE=UN ;&lt;BR /&gt;RUN;&lt;/P&gt;</description>
    <pubDate>Wed, 13 Jun 2018 11:35:05 GMT</pubDate>
    <dc:creator>fama</dc:creator>
    <dc:date>2018-06-13T11:35:05Z</dc:date>
    <item>
      <title>Difference_in_difference model(DID) with matched pair</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Difference-in-difference-model-DID-with-matched-pair/m-p/469891#M24444</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am running the DID regression model to estimate the treatment effect.&lt;/P&gt;&lt;P&gt;Prior to this, I have created the dataset using propensity score matching. So, I have matched pairs (each treated subject is matched to two nearest neighbours control subject).&lt;/P&gt;&lt;P&gt;I am using below code. However, this code does not account for the matched data.&lt;/P&gt;&lt;P&gt;Indeed, the matched pair should be the unit of analysis and I need to modify the below code to accout for the&amp;nbsp; matched pairs&lt;/P&gt;&lt;P&gt;To make it clear, the below code considers all treated subjects versus all control subjects while&amp;nbsp; I am looking for the differences between treated and control subject in each matched pair.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advanced&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;/*Repeated measure linear regression*/&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;PROC MIXED DATA = Long; /* long format*/&lt;BR /&gt;&lt;BR /&gt;CLASS A B;&lt;BR /&gt;&lt;BR /&gt;MODEL Y=A|B covariatesX1 X2..Xn / SOLUTION;&lt;BR /&gt;LSMEANS&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; A|B / DIFF;&lt;BR /&gt;ESTIMATE&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'D-I-D' A*&lt;STRONG&gt;B&lt;/STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1 -1 -1 1;&lt;BR /&gt;RANDOM &amp;nbsp; &amp;nbsp; Int/SUBJECT= &amp;nbsp; &amp;nbsp; TYPE=UN ;&lt;BR /&gt;RUN;&lt;/P&gt;</description>
      <pubDate>Wed, 13 Jun 2018 11:35:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Difference-in-difference-model-DID-with-matched-pair/m-p/469891#M24444</guid>
      <dc:creator>fama</dc:creator>
      <dc:date>2018-06-13T11:35:05Z</dc:date>
    </item>
    <item>
      <title>Difference_in_difference model(DID) with matched pair</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Difference-in-difference-model-DID-with-matched-pair/m-p/469892#M24446</link>
      <description>&lt;DIV class="lia-message-body"&gt;&lt;DIV class="lia-message-body-content"&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am running the DID regression model to estimate the treatment effect.&lt;/P&gt;&lt;P&gt;Prior to this, I have created the dataset using propensity score matching. So, I have matched pairs (each treated subject is matched to two nearest neighbors control subject).&lt;/P&gt;&lt;P&gt;I am using below code. However, this code does not account for the matched data.&lt;/P&gt;&lt;P&gt;Indeed, the matched pair should be the unit of analysis and I need to modify the below code to account for the&amp;nbsp; matched pairs&lt;/P&gt;&lt;P&gt;To make it clear, the below code considers all treated subjects versus all control subjects while&amp;nbsp; I am looking for the differences between treated and control subject in each matched pair.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advanced&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;/*Repeated measure linear regression*/&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;PROC MIXED DATA = Long; /* long format*/&lt;BR /&gt;&lt;BR /&gt;CLASS A B;&lt;BR /&gt;&lt;BR /&gt;MODEL Y=A|B covariatesX1 X2..Xn / SOLUTION;&lt;BR /&gt;LSMEANS&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; A|B / DIFF;&lt;BR /&gt;ESTIMATE&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'D-I-D' A*&lt;STRONG&gt;B&lt;/STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1 -1 -1 1;&lt;BR /&gt;RANDOM &amp;nbsp; &amp;nbsp; Int/SUBJECT= &amp;nbsp; &amp;nbsp; TYPE=UN ;&lt;BR /&gt;RUN;&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 13 Jun 2018 11:37:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Difference-in-difference-model-DID-with-matched-pair/m-p/469892#M24446</guid>
      <dc:creator>fama</dc:creator>
      <dc:date>2018-06-13T11:37:27Z</dc:date>
    </item>
  </channel>
</rss>

