<?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 Time series- How to get slope and % change in Y-axis in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Time-series-How-to-get-slope-and-change-in-Y-axis/m-p/474484#M285919</link>
    <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;I have a time series data with rate of blood cultures per 1000 pts for 34 months (before and after intervention, indicated by Variable "Intervention" - 0=before intervention, 1= after intervention). Month variable is recorded from Jan 2015 through Oct 2017. I want to see if intervention made a difference in rate of blood cultures (i.e. decrease in the blood culture rate). How do I test this to show a significant difference (with p-value)? Also please explain me how to get the % change in Y-axis for the blood culture rates and slope.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;I have no clue how to test this in SAS. Any help with is much appreciated. I am attaching the data (excel sheet) below with the variables.&lt;/P&gt;&lt;P&gt;&amp;nbsp;Data Variables:&lt;/P&gt;&lt;P&gt;1. Cult_Per_1000pts&lt;/P&gt;&lt;P&gt;2. Month (jan2015 to Oct 2017)&lt;/P&gt;&lt;P&gt;3. Intervention (0/ 1 - 0 for months before intervention, 1 for months after intervention)&lt;/P&gt;&lt;P&gt;4. Time (1- 34, indication months in order from beginning (jan2015) to end (oct2017)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you very much in advance!&lt;/P&gt;</description>
    <pubDate>Fri, 29 Jun 2018 16:15:15 GMT</pubDate>
    <dc:creator>sms1891</dc:creator>
    <dc:date>2018-06-29T16:15:15Z</dc:date>
    <item>
      <title>Time series- How to get slope and % change in Y-axis</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Time-series-How-to-get-slope-and-change-in-Y-axis/m-p/474484#M285919</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;I have a time series data with rate of blood cultures per 1000 pts for 34 months (before and after intervention, indicated by Variable "Intervention" - 0=before intervention, 1= after intervention). Month variable is recorded from Jan 2015 through Oct 2017. I want to see if intervention made a difference in rate of blood cultures (i.e. decrease in the blood culture rate). How do I test this to show a significant difference (with p-value)? Also please explain me how to get the % change in Y-axis for the blood culture rates and slope.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;I have no clue how to test this in SAS. Any help with is much appreciated. I am attaching the data (excel sheet) below with the variables.&lt;/P&gt;&lt;P&gt;&amp;nbsp;Data Variables:&lt;/P&gt;&lt;P&gt;1. Cult_Per_1000pts&lt;/P&gt;&lt;P&gt;2. Month (jan2015 to Oct 2017)&lt;/P&gt;&lt;P&gt;3. Intervention (0/ 1 - 0 for months before intervention, 1 for months after intervention)&lt;/P&gt;&lt;P&gt;4. Time (1- 34, indication months in order from beginning (jan2015) to end (oct2017)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you very much in advance!&lt;/P&gt;</description>
      <pubDate>Fri, 29 Jun 2018 16:15:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Time-series-How-to-get-slope-and-change-in-Y-axis/m-p/474484#M285919</guid>
      <dc:creator>sms1891</dc:creator>
      <dc:date>2018-06-29T16:15:15Z</dc:date>
    </item>
    <item>
      <title>Re: Time series- How to get slope and % change in Y-axis</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Time-series-How-to-get-slope-and-change-in-Y-axis/m-p/481892#M285920</link>
      <description>&lt;P&gt;I don't know if this is exactly what you're looking for.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods graphics on;
proc ucm data=Culture_Rates_for_SAS;
	irregular;
	slope plot=smooth;
	level plot=smooth;
	model cult_per_1000pts=intervention;
	estimate;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;This will show a negative, significant effect of intervention. But that does not get at a change in the slope.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you remove "=intervention", and then examine the slope plot, the slope doesn't change. Perhaps there is not a significant change in the slope, but the intervention is successful in achieving a one-time drop in the level.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To address the % change question:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data Culture_Rates_for_SAS;
	set Culture_Rates_for_SAS;
	log_cult=log(cult_per_1000pts);
ods graphics on;
proc ucm data=Culture_Rates_for_SAS;
	irregular;
	slope plot=smooth;
	level plot=smooth;
	model log_cult=intervention;
	estimate;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;If you log the culture variable, your interpretation of the intervention coefficient and the slope are now % change. Rather than a decrease of 4 units, intervention is -16.7% and the slope is about -2.2%. This would imply that the slope is getting flatter: 2.2% decreases will be of smaller nominal value as the culture level approaches zero.&lt;/P&gt;</description>
      <pubDate>Fri, 27 Jul 2018 15:14:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Time-series-How-to-get-slope-and-change-in-Y-axis/m-p/481892#M285920</guid>
      <dc:creator>cau83</dc:creator>
      <dc:date>2018-07-27T15:14:58Z</dc:date>
    </item>
  </channel>
</rss>

