<?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 Need help with time trend analysis in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Need-help-with-time-trend-analysis/m-p/667645#M79083</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I am trying to do an analysis using SAS University on data very similar to the sample data attached. The goal of the analysis is to show the change in the number_people by year for each project of each org_id or org_name (in organized tables like the ones shown in the sample data files and, if possible, a graph). I'm not sure how to do this on SAS, so I really appreciate all your help!&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 08 Jul 2020 07:48:25 GMT</pubDate>
    <dc:creator>strugglingwsas</dc:creator>
    <dc:date>2020-07-08T07:48:25Z</dc:date>
    <item>
      <title>Need help with time trend analysis</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Need-help-with-time-trend-analysis/m-p/667645#M79083</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I am trying to do an analysis using SAS University on data very similar to the sample data attached. The goal of the analysis is to show the change in the number_people by year for each project of each org_id or org_name (in organized tables like the ones shown in the sample data files and, if possible, a graph). I'm not sure how to do this on SAS, so I really appreciate all your help!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 08 Jul 2020 07:48:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Need-help-with-time-trend-analysis/m-p/667645#M79083</guid>
      <dc:creator>strugglingwsas</dc:creator>
      <dc:date>2020-07-08T07:48:25Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with time trend analysis</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Need-help-with-time-trend-analysis/m-p/667646#M79084</link>
      <description>&lt;P&gt;I forgot to mention that I did try to use proc freq to look at the number of times an observation was used for a specific project, but did not get the desired result (I'm pretty new to data analysis using SAS, I apologize!).&lt;/P&gt;</description>
      <pubDate>Wed, 08 Jul 2020 07:52:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Need-help-with-time-trend-analysis/m-p/667646#M79084</guid>
      <dc:creator>strugglingwsas</dc:creator>
      <dc:date>2020-07-08T07:52:21Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with time trend analysis</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Need-help-with-time-trend-analysis/m-p/667648#M79085</link>
      <description>&lt;P&gt;please try the below code&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
input year org_name$ project$ number_people;
cards;
2015 ab ef 3
2015 ab gh 5
2015 ac hi 7
2016 ab ef 4
2016 ab gh 5
2016 ac hi 8
2016 ad jk 2

;

proc sort data=have;
by org_name project;
run;

proc transpose data=have out=want;
by org_name project;
id year;
var number_people;
run;


PROC REPORT DATA=WORK.WANT LS=132 PS=60  SPLIT="/" CENTER ;
COLUMN  org_name project _2015 _2016;

DEFINE  org_name / group FORMAT= $8. WIDTH=8     SPACING=2   LEFT "org_name" ;
DEFINE  project / group FORMAT= $8. WIDTH=8     SPACING=2   LEFT "project" ;
DEFINE  _2015 / SUM FORMAT= BEST9. WIDTH=9     SPACING=2   RIGHT "2015" ;
DEFINE  _2016 / SUM FORMAT= BEST9. WIDTH=9     SPACING=2   RIGHT "2016" ;
break after org_name/skip;
RUN;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 309px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/46990i30DB878DB24A2254/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 08 Jul 2020 08:05:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Need-help-with-time-trend-analysis/m-p/667648#M79085</guid>
      <dc:creator>Jagadishkatam</dc:creator>
      <dc:date>2020-07-08T08:05:14Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with time trend analysis</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Need-help-with-time-trend-analysis/m-p/668218#M79095</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;Thank you for your response. This helped a lot. Is there some way to graphically do this same thing?&lt;/P&gt;</description>
      <pubDate>Thu, 09 Jul 2020 23:46:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Need-help-with-time-trend-analysis/m-p/668218#M79095</guid>
      <dc:creator>strugglingwsas</dc:creator>
      <dc:date>2020-07-09T23:46:55Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with time trend analysis</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Need-help-with-time-trend-analysis/m-p/668311#M79110</link>
      <description>&lt;P&gt;You may try the below code&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
input year org_name$ project$ number_people;
cards;
2015 ab ef 3
2015 ab gh 5
2015 ac hi 7
2016 ab ef 4
2016 ab gh 5
2016 ac hi 8
2016 ad jk 2
;

data want;
set have;
groups=catx('_',org_name,project);
run;

proc sgplot data=want;
vbar year / response=number_people group=groups;
run;&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;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 633px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/47050iF9CAC65526C6E8EF/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 10 Jul 2020 10:01:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Need-help-with-time-trend-analysis/m-p/668311#M79110</guid>
      <dc:creator>Jagadishkatam</dc:creator>
      <dc:date>2020-07-10T10:01:08Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with time trend analysis</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Need-help-with-time-trend-analysis/m-p/668911#M79164</link>
      <description>&lt;P&gt;Thank you! This worked. I really appreciate your help!&lt;/P&gt;</description>
      <pubDate>Mon, 13 Jul 2020 18:31:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Need-help-with-time-trend-analysis/m-p/668911#M79164</guid>
      <dc:creator>strugglingwsas</dc:creator>
      <dc:date>2020-07-13T18:31:02Z</dc:date>
    </item>
  </channel>
</rss>

