<?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: How to test parallel trend before using longitudinal D-I-D? in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-test-parallel-trend-before-using-longitudinal-D-I-D/m-p/921984#M45820</link>
    <description>&lt;P&gt;If you are interested in trend and parallelism, then there should be a continuous predictor which can have a linear effect (a slope) in each group and then those slopes can be compared. The basic idea is discussed in &lt;A href="http://support.sas.com/kb/24177" target="_self"&gt;this note&lt;/A&gt;. In your case, you presumably would treat TIME as continuous rather than as a CLASS variable. Then in the following model, the test of the ADRS*TIME interaction is a test of equal slopes (trends).&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc genmod data=tmp.ss;
class id adrs / ref=first;
model dmt = adrs time adrs*time;
repeated subject=id(adrs);
run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Note that unless your ID values repeat in each ADRS level (like ID=1,2,3,... in each ADRS level), then you probably just need to specify SUBJECT=ID. See &lt;A href="http://support.sas.com/kb/24200" target="_self"&gt;this note&lt;/A&gt;.&lt;/P&gt;</description>
    <pubDate>Wed, 27 Mar 2024 15:11:20 GMT</pubDate>
    <dc:creator>StatDave</dc:creator>
    <dc:date>2024-03-27T15:11:20Z</dc:date>
    <item>
      <title>How to test parallel trend before using longitudinal D-I-D?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-test-parallel-trend-before-using-longitudinal-D-I-D/m-p/921920#M45816</link>
      <description>&lt;P&gt;I was doing a research that needs &lt;STRONG&gt;longitudinal D-I-D&lt;/STRONG&gt; method for pre-1 year and post -1 year, post-2 year and post-3 year. i followed the code from the sas support (&lt;A href="https://support.sas.com/kb/61/830.html" target="_blank" rel="noopener"&gt;https://support.sas.com/kb/61/830.html&lt;/A&gt;), I am not sure if the following codes are correct&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am also wondering how to test the &lt;STRONG&gt;parallel trend&lt;/STRONG&gt; before using D-I-D model.&amp;nbsp;&lt;BR /&gt;"adrs" (0 1 ) is the treatment variable; "time" is the time variable&amp;nbsp; (0 1&amp;nbsp; 2 ); outcome variable is "dmt" which is a binary variable (0 1)&lt;BR /&gt;&lt;BR /&gt;proc genmod data=tmp. ss;&lt;BR /&gt;class id adrs time / ref=first;&lt;BR /&gt;model dmt = adrs time adrs*time;&lt;BR /&gt;repeated subject=id(adrs);&lt;BR /&gt;estimate "DID Post2(E-U)-Pre(E-U)" adrs*time 0 1 -1 0 -1 1;&lt;BR /&gt;estimate "DID Post1(E-U)-Pre(E-U)" adrs*time 1 0 -1 -1 0 1;&lt;BR /&gt;lsmeans adrs*time;&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Need SAS experts or statistic experts please !!!!&lt;/P&gt;&lt;P&gt;Thank you so much&lt;/P&gt;</description>
      <pubDate>Wed, 27 Mar 2024 06:23:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-to-test-parallel-trend-before-using-longitudinal-D-I-D/m-p/921920#M45816</guid>
      <dc:creator>vivian_h</dc:creator>
      <dc:date>2024-03-27T06:23:18Z</dc:date>
    </item>
    <item>
      <title>Re: How to test parallel trend before using longitudinal D-I-D?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-test-parallel-trend-before-using-longitudinal-D-I-D/m-p/921984#M45820</link>
      <description>&lt;P&gt;If you are interested in trend and parallelism, then there should be a continuous predictor which can have a linear effect (a slope) in each group and then those slopes can be compared. The basic idea is discussed in &lt;A href="http://support.sas.com/kb/24177" target="_self"&gt;this note&lt;/A&gt;. In your case, you presumably would treat TIME as continuous rather than as a CLASS variable. Then in the following model, the test of the ADRS*TIME interaction is a test of equal slopes (trends).&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc genmod data=tmp.ss;
class id adrs / ref=first;
model dmt = adrs time adrs*time;
repeated subject=id(adrs);
run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Note that unless your ID values repeat in each ADRS level (like ID=1,2,3,... in each ADRS level), then you probably just need to specify SUBJECT=ID. See &lt;A href="http://support.sas.com/kb/24200" target="_self"&gt;this note&lt;/A&gt;.&lt;/P&gt;</description>
      <pubDate>Wed, 27 Mar 2024 15:11:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-to-test-parallel-trend-before-using-longitudinal-D-I-D/m-p/921984#M45820</guid>
      <dc:creator>StatDave</dc:creator>
      <dc:date>2024-03-27T15:11:20Z</dc:date>
    </item>
    <item>
      <title>Re: How to test parallel trend before using longitudinal D-I-D?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-test-parallel-trend-before-using-longitudinal-D-I-D/m-p/922456#M45841</link>
      <description>&lt;P&gt;Hii,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you so much for replying.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So I would like to clarify if I need to test for parallel trend before the intervention:&lt;/P&gt;&lt;P&gt;my TIME variable stands for Pre-1 year, Pre-2 year, Pre-3 year&lt;BR /&gt;I can just fix the "TIME" variable as you showed in the solution&lt;/P&gt;&lt;PRE&gt;proc genmod data=tmp.ss;
class id adrs / ref=first;
model dmt = adrs time adrs*time;
repeated subject=id(adrs);
run;&lt;/PRE&gt;&lt;P&gt;To interpret, if the p-value of the interaction term "ADRS*TIME" is not less then 0.05 in each year then I can say it meets the&amp;nbsp;parallel trend assumption&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Am I correct?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I really appreciate your help!!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;**and yes, in my case there will be repeated "ID"&lt;/P&gt;</description>
      <pubDate>Mon, 01 Apr 2024 15:28:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-to-test-parallel-trend-before-using-longitudinal-D-I-D/m-p/922456#M45841</guid>
      <dc:creator>vivian_h</dc:creator>
      <dc:date>2024-04-01T15:28:37Z</dc:date>
    </item>
    <item>
      <title>Re: How to test parallel trend before using longitudinal D-I-D?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-test-parallel-trend-before-using-longitudinal-D-I-D/m-p/922467#M45842</link>
      <description>No, if the test of the interaction is significant (less than 0.5, or whatever criterion you want to use) then that indicates that the slopes are different and are not parallel.</description>
      <pubDate>Mon, 01 Apr 2024 16:19:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-to-test-parallel-trend-before-using-longitudinal-D-I-D/m-p/922467#M45842</guid>
      <dc:creator>StatDave</dc:creator>
      <dc:date>2024-04-01T16:19:36Z</dc:date>
    </item>
    <item>
      <title>Re: How to test parallel trend before using longitudinal D-I-D?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-test-parallel-trend-before-using-longitudinal-D-I-D/m-p/922470#M45843</link>
      <description>Okay, I got it.&lt;BR /&gt;Thank you so much for clarifying!!!</description>
      <pubDate>Mon, 01 Apr 2024 16:46:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-to-test-parallel-trend-before-using-longitudinal-D-I-D/m-p/922470#M45843</guid>
      <dc:creator>vivian_h</dc:creator>
      <dc:date>2024-04-01T16:46:38Z</dc:date>
    </item>
  </channel>
</rss>

