<?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 Help with Interrupted time series analysis: Code Optimization in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/Help-with-Interrupted-time-series-analysis-Code-Optimization/m-p/968426#M48689</link>
    <description>&lt;P&gt;&lt;SPAN&gt;Hello SAS experts,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I used the SAS code recommended in this link to perform an ITS analysis.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;A href="https://support.sas.com/kb/70/498.html" target="_blank" rel="noopener"&gt;https://support.sas.com/kb/70/498.html&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;If I want to take the ITS code for a one-group, one-stage design with a binary response, and modify it to a&amp;nbsp; one-group, two-stage and two-group, two-stage design, how should I change it? &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;If I also want to include covariates (categorical variables), where in the syntax should I place those variables?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thank you very much for your help!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=""&gt;/*one-group, one-stage, Binary Response*/
original month1-6
iv1=0/1 (at month3)
iv2=0/1 (at month5)&lt;BR /&gt;
original month1= month1 
original month2= month2
original month3= month3 
original month4= month1
original month5= month2
original month6= month3

proc gee data=a; 
        class id iv1;
        model y(event="1") = iv1 month iv1*month / dist=bin noint;
        repeated subject=id;
        run;
proc gee data=a; 
        class id iv1;
        model y(event="1") = iv1 iv1*month / dist=bin noint;
        repeated subject=id;
        effectplot fit(x=month plotby(pack)=iv1) / clm;
        effectplot fit(x=month plotby(pack)=iv1) / link clm;
        estimate 'm3 log odds' iv1 1 0 iv1*month 3 0 / ilink;
        estimate 'm4 log odds' iv1 0 1 iv1*month 0 1 / ilink;
        estimate 'm3 to m4 odds ratio' iv1 -1 1 iv1*month -3 1 / exp cl;
        store gee;
        run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Mon, 09 Jun 2025 08:16:10 GMT</pubDate>
    <dc:creator>tina_ting</dc:creator>
    <dc:date>2025-06-09T08:16:10Z</dc:date>
    <item>
      <title>Help with Interrupted time series analysis: Code Optimization</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Help-with-Interrupted-time-series-analysis-Code-Optimization/m-p/968426#M48689</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Hello SAS experts,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I used the SAS code recommended in this link to perform an ITS analysis.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;A href="https://support.sas.com/kb/70/498.html" target="_blank" rel="noopener"&gt;https://support.sas.com/kb/70/498.html&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;If I want to take the ITS code for a one-group, one-stage design with a binary response, and modify it to a&amp;nbsp; one-group, two-stage and two-group, two-stage design, how should I change it? &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;If I also want to include covariates (categorical variables), where in the syntax should I place those variables?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thank you very much for your help!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=""&gt;/*one-group, one-stage, Binary Response*/
original month1-6
iv1=0/1 (at month3)
iv2=0/1 (at month5)&lt;BR /&gt;
original month1= month1 
original month2= month2
original month3= month3 
original month4= month1
original month5= month2
original month6= month3

proc gee data=a; 
        class id iv1;
        model y(event="1") = iv1 month iv1*month / dist=bin noint;
        repeated subject=id;
        run;
proc gee data=a; 
        class id iv1;
        model y(event="1") = iv1 iv1*month / dist=bin noint;
        repeated subject=id;
        effectplot fit(x=month plotby(pack)=iv1) / clm;
        effectplot fit(x=month plotby(pack)=iv1) / link clm;
        estimate 'm3 log odds' iv1 1 0 iv1*month 3 0 / ilink;
        estimate 'm4 log odds' iv1 0 1 iv1*month 0 1 / ilink;
        estimate 'm3 to m4 odds ratio' iv1 -1 1 iv1*month -3 1 / exp cl;
        store gee;
        run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 09 Jun 2025 08:16:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Help-with-Interrupted-time-series-analysis-Code-Optimization/m-p/968426#M48689</guid>
      <dc:creator>tina_ting</dc:creator>
      <dc:date>2025-06-09T08:16:10Z</dc:date>
    </item>
  </channel>
</rss>

