<?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 Segmented regression interrupted time series analysis in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Segmented-regression-interrupted-time-series-analysis/m-p/860325#M339872</link>
    <description>&lt;P&gt;Hello&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am using single ITS for one of my projects to assess the impact of a policy intervention on medication use.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SSK_011523_0-1677110930387.png" style="width: 263px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/80736i4E3563D88BB11237/image-dimensions/263x50?v=v2" width="263" height="50" role="button" title="SSK_011523_0-1677110930387.png" alt="SSK_011523_0-1677110930387.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Outcome&lt;/STRONG&gt;: Medication use (defined as aggregated means)&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Exposure&lt;/STRONG&gt;: Policy intervention&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For the ITS model, I have defined the following parameters:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;U&gt;Time (beta1)&lt;/U&gt;: quarterly data (a total of 31 quarters).&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;U&gt;Intervention (beta2)&lt;/U&gt;:&amp;nbsp;The intervention was introduced in 12th quarter. I have defined intervention as three segments to take into account lagged effect. 0 indicates pre-intervention, 1 indicates transition/lagged period and 2 indicates post-intervention.&lt;/P&gt;&lt;P&gt;&lt;U&gt;Time after intervention (beta 3)&lt;/U&gt;: defined as 0 before the intervention 0 and intervention 1 and then as (1,2,3..19)&lt;/P&gt;&lt;P&gt;Since autocorrelation was detected in my data, I decided to use PROC AUTOREG. I used the following code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;********************************&lt;/P&gt;&lt;P&gt;PROC AUTOREG data = have;&lt;/P&gt;&lt;P&gt;model outcome = time intervention time_after_intervention/method = ml backstep nlag=5 dw=12 dwprob loglikl;&lt;/P&gt;&lt;P&gt;output out=want p =predicted r = residual;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;******************************&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;OUTPUT:&lt;/STRONG&gt;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Variable&lt;/TD&gt;&lt;TD&gt;Estimate&lt;/TD&gt;&lt;TD&gt;Approx Pr &amp;gt; t&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;time&lt;/TD&gt;&lt;TD&gt;0.8&lt;/TD&gt;&lt;TD&gt;&amp;lt;0.0001&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;intervention&lt;/TD&gt;&lt;TD&gt;-2.9&lt;/TD&gt;&lt;TD&gt;&amp;lt;0.0002&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;time after intervention&lt;/TD&gt;&lt;TD&gt;-1.1&lt;/TD&gt;&lt;TD&gt;&amp;lt;0.0003&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Interpretation:&lt;/P&gt;&lt;P&gt;I am not sure how to interpret 'intervention' as I have defined it as three segments (pre-intervention, lagged period, and post-intervention). Do I interpret it in the same way if two segments were used to define intervention?&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried using class statement thinking I would get separate estimates for each segment but it did nit work.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help on this would be appreciated. Thanks!&lt;/P&gt;</description>
    <pubDate>Thu, 23 Feb 2023 00:11:35 GMT</pubDate>
    <dc:creator>SSK_011523</dc:creator>
    <dc:date>2023-02-23T00:11:35Z</dc:date>
    <item>
      <title>Segmented regression interrupted time series analysis</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Segmented-regression-interrupted-time-series-analysis/m-p/860325#M339872</link>
      <description>&lt;P&gt;Hello&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am using single ITS for one of my projects to assess the impact of a policy intervention on medication use.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SSK_011523_0-1677110930387.png" style="width: 263px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/80736i4E3563D88BB11237/image-dimensions/263x50?v=v2" width="263" height="50" role="button" title="SSK_011523_0-1677110930387.png" alt="SSK_011523_0-1677110930387.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Outcome&lt;/STRONG&gt;: Medication use (defined as aggregated means)&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Exposure&lt;/STRONG&gt;: Policy intervention&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For the ITS model, I have defined the following parameters:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;U&gt;Time (beta1)&lt;/U&gt;: quarterly data (a total of 31 quarters).&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;U&gt;Intervention (beta2)&lt;/U&gt;:&amp;nbsp;The intervention was introduced in 12th quarter. I have defined intervention as three segments to take into account lagged effect. 0 indicates pre-intervention, 1 indicates transition/lagged period and 2 indicates post-intervention.&lt;/P&gt;&lt;P&gt;&lt;U&gt;Time after intervention (beta 3)&lt;/U&gt;: defined as 0 before the intervention 0 and intervention 1 and then as (1,2,3..19)&lt;/P&gt;&lt;P&gt;Since autocorrelation was detected in my data, I decided to use PROC AUTOREG. I used the following code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;********************************&lt;/P&gt;&lt;P&gt;PROC AUTOREG data = have;&lt;/P&gt;&lt;P&gt;model outcome = time intervention time_after_intervention/method = ml backstep nlag=5 dw=12 dwprob loglikl;&lt;/P&gt;&lt;P&gt;output out=want p =predicted r = residual;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;******************************&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;OUTPUT:&lt;/STRONG&gt;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Variable&lt;/TD&gt;&lt;TD&gt;Estimate&lt;/TD&gt;&lt;TD&gt;Approx Pr &amp;gt; t&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;time&lt;/TD&gt;&lt;TD&gt;0.8&lt;/TD&gt;&lt;TD&gt;&amp;lt;0.0001&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;intervention&lt;/TD&gt;&lt;TD&gt;-2.9&lt;/TD&gt;&lt;TD&gt;&amp;lt;0.0002&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;time after intervention&lt;/TD&gt;&lt;TD&gt;-1.1&lt;/TD&gt;&lt;TD&gt;&amp;lt;0.0003&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Interpretation:&lt;/P&gt;&lt;P&gt;I am not sure how to interpret 'intervention' as I have defined it as three segments (pre-intervention, lagged period, and post-intervention). Do I interpret it in the same way if two segments were used to define intervention?&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried using class statement thinking I would get separate estimates for each segment but it did nit work.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help on this would be appreciated. Thanks!&lt;/P&gt;</description>
      <pubDate>Thu, 23 Feb 2023 00:11:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Segmented-regression-interrupted-time-series-analysis/m-p/860325#M339872</guid>
      <dc:creator>SSK_011523</dc:creator>
      <dc:date>2023-02-23T00:11:35Z</dc:date>
    </item>
  </channel>
</rss>

