<?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: Time Series- How to get slope and % change in Y-axis? in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Time-Series-How-to-get-slope-and-change-in-Y-axis/m-p/475708#M71185</link>
    <description>&lt;P&gt;Hi Rick,&lt;/P&gt;&lt;P&gt;Thanks for the response. I tried the proc autoreg. DO you think this is a good option for testing effect of intervention and time on a rate?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; Proc autoreg data = TimeSeries;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; model Cult_Per_1000pts= time Intervention/ method=ml nlag=13;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Sat&lt;/P&gt;</description>
    <pubDate>Thu, 05 Jul 2018 15:52:13 GMT</pubDate>
    <dc:creator>sms1891</dc:creator>
    <dc:date>2018-07-05T15:52:13Z</dc:date>
    <item>
      <title>Time Series- How to get slope and % change in Y-axis?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Time-Series-How-to-get-slope-and-change-in-Y-axis/m-p/474478#M71097</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;&lt;/P&gt;&lt;P&gt;Thank you very much!&lt;/P&gt;</description>
      <pubDate>Fri, 29 Jun 2018 15:43:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Time-Series-How-to-get-slope-and-change-in-Y-axis/m-p/474478#M71097</guid>
      <dc:creator>sms1891</dc:creator>
      <dc:date>2018-06-29T15:43:09Z</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-Procedures/Time-Series-How-to-get-slope-and-change-in-Y-axis/m-p/475232#M71134</link>
      <description>&lt;P&gt;Assuming that these monthly&amp;nbsp;data are independent, you can use either PROC GLM to perform a one-way ANOVA or PROC TTEST to perform a t test. The results are equivalent.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data Have;
input Intervention	Cult_Per_1000pts	Time;
datalines;
0	40.33691	1
0	39.72401	2
0	38.94887	3
0	37.35858	4
0	36.58583	5
0	36.81972	6
0	35.34335	7
0	32.54884	8
0	28.9988	9
0	30.66459	10
0	32.36462	11
0	33.03502	12
0	35.60342	13
0	26.70872	14
0	29.83492	15
0	29.66548	16
1	26.24441	17
1	22.24681	18
1	19.59343	19
1	21.7832	20
1	21.06327	21
1	19.05045	22
1	15.48585	23
1	16.79496	24
1	16.57914	25
1	16.95194	26
1	17.04799	27
1	15.95765	28
1	16.1363	29
1	18.44075	30
1	17.60312	31
1	16.881	32
1	13.90606	33
1	16.62039	34
;

proc glm data=Have;
   class Intervention;
   model Cult_Per_1000pts = Intervention;
   lsmeans Intervention / pdiff;
run;&lt;BR /&gt;&lt;BR /&gt;proc ttest data=Have;&lt;BR /&gt; class Intervention;&lt;BR /&gt; var Cult_Per_1000pts;&lt;BR /&gt;run;&lt;BR /&gt;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;IMHO, the t test&amp;nbsp;approach is easier and more familiar for&amp;nbsp;most people.&amp;nbsp;&lt;A href="http://go.documentation.sas.com/?docsetId=statug&amp;amp;docsetTarget=statug_ttest_gettingstarted02.htm&amp;amp;docsetVersion=14.3&amp;amp;locale=en" target="_self"&gt;The TTEST doc has an example that explains the output.&amp;nbsp;&lt;/A&gt;The documentation for PROC GLM has &lt;A href="http://go.documentation.sas.com/?docsetId=statug&amp;amp;docsetTarget=statug_glm_gettingstarted01.htm&amp;amp;docsetVersion=14.3&amp;amp;locale=en" target="_self"&gt;a Getting Started example that discusses ANOVA.&lt;/A&gt;&amp;nbsp;and you can Google for other examples.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The test statistic for the ANOVA (F=164.51) is equivalent to the test statistic for the t test&amp;nbsp;(t=12.83) because t^2 = F.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 03 Jul 2018 15:24:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Time-Series-How-to-get-slope-and-change-in-Y-axis/m-p/475232#M71134</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2018-07-03T15:24:27Z</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-Procedures/Time-Series-How-to-get-slope-and-change-in-Y-axis/m-p/475708#M71185</link>
      <description>&lt;P&gt;Hi Rick,&lt;/P&gt;&lt;P&gt;Thanks for the response. I tried the proc autoreg. DO you think this is a good option for testing effect of intervention and time on a rate?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; Proc autoreg data = TimeSeries;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; model Cult_Per_1000pts= time Intervention/ method=ml nlag=13;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Sat&lt;/P&gt;</description>
      <pubDate>Thu, 05 Jul 2018 15:52:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Time-Series-How-to-get-slope-and-change-in-Y-axis/m-p/475708#M71185</guid>
      <dc:creator>sms1891</dc:creator>
      <dc:date>2018-07-05T15:52:13Z</dc:date>
    </item>
  </channel>
</rss>

