<?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 LSMEANS in time series in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/LSMEANS-in-time-series/m-p/690736#M33313</link>
    <description>&lt;P&gt;Hello!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I fitted piecewise linear regression. The model specification is as follows...&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="_MooMoo_4-1602365044316.png" style="width: 999px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/50540i0833A708ABCABB48/image-size/large?v=v2&amp;amp;px=999" role="button" title="_MooMoo_4-1602365044316.png" alt="_MooMoo_4-1602365044316.png" /&gt;&lt;/span&gt;,where&amp;nbsp;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="_MooMoo_6-1602365044322.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/50542iED01E0F11BA4387E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="_MooMoo_6-1602365044322.png" alt="_MooMoo_6-1602365044322.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Intervention was being in effect right after block 24. Through this model, my ultimate goal is to check whether the rate has changed from pre-intervention to post-intervention. The reason why I chose piecewise model is because I also wanted to check how rate change overtime before and after intervention.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To check the ultimate goal, I ran following code...&lt;/P&gt;
&lt;P&gt;proc glm data=X;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp;class intervention;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp;model rate=intervention block spline;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp;&lt;STRONG&gt;lsmeans intervention/cl;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;However, LSMEANS statement wouldn't give me the answer I want. Actually, LSMEANS statement would give me pre-intervention and post-intervention rate when block variable and spline variable were set to its mean value. This is not what I wanted.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Does anyone has an idea how to output the mean rate of pre-intervention and mean rate of post-intervention from the model?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank in advance!&lt;/P&gt;</description>
    <pubDate>Sat, 10 Oct 2020 21:37:34 GMT</pubDate>
    <dc:creator>_MooMoo</dc:creator>
    <dc:date>2020-10-10T21:37:34Z</dc:date>
    <item>
      <title>LSMEANS in time series</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/LSMEANS-in-time-series/m-p/690736#M33313</link>
      <description>&lt;P&gt;Hello!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I fitted piecewise linear regression. The model specification is as follows...&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="_MooMoo_4-1602365044316.png" style="width: 999px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/50540i0833A708ABCABB48/image-size/large?v=v2&amp;amp;px=999" role="button" title="_MooMoo_4-1602365044316.png" alt="_MooMoo_4-1602365044316.png" /&gt;&lt;/span&gt;,where&amp;nbsp;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="_MooMoo_6-1602365044322.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/50542iED01E0F11BA4387E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="_MooMoo_6-1602365044322.png" alt="_MooMoo_6-1602365044322.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Intervention was being in effect right after block 24. Through this model, my ultimate goal is to check whether the rate has changed from pre-intervention to post-intervention. The reason why I chose piecewise model is because I also wanted to check how rate change overtime before and after intervention.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To check the ultimate goal, I ran following code...&lt;/P&gt;
&lt;P&gt;proc glm data=X;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp;class intervention;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp;model rate=intervention block spline;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp;&lt;STRONG&gt;lsmeans intervention/cl;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;However, LSMEANS statement wouldn't give me the answer I want. Actually, LSMEANS statement would give me pre-intervention and post-intervention rate when block variable and spline variable were set to its mean value. This is not what I wanted.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Does anyone has an idea how to output the mean rate of pre-intervention and mean rate of post-intervention from the model?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank in advance!&lt;/P&gt;</description>
      <pubDate>Sat, 10 Oct 2020 21:37:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/LSMEANS-in-time-series/m-p/690736#M33313</guid>
      <dc:creator>_MooMoo</dc:creator>
      <dc:date>2020-10-10T21:37:34Z</dc:date>
    </item>
    <item>
      <title>Re: LSMEANS in time series</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/LSMEANS-in-time-series/m-p/691256#M33336</link>
      <description>&lt;P&gt;Question 1: What is 'spline' doing here?&lt;/P&gt;
&lt;P&gt;Question 2: Isn't 'intervention' completely confounded with Block (i.e., Intervention=pre when Block&amp;lt;24, intervention=post when Block &amp;gt;=24?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Perhaps you could fit the segmented model without 'intervention' in the model.&amp;nbsp; Then when you get to the GLM phase, use an ESTIMATE or LSMESTIMATE to get the marginal means for intervention pre and intervention post.&amp;nbsp; I still don't know how to get around the spline issue - perhaps an AT option could be used in the LSMESTIMATE statement.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;SteveDenham&lt;/P&gt;</description>
      <pubDate>Tue, 13 Oct 2020 13:50:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/LSMEANS-in-time-series/m-p/691256#M33336</guid>
      <dc:creator>SteveDenham</dc:creator>
      <dc:date>2020-10-13T13:50:49Z</dc:date>
    </item>
  </channel>
</rss>

