BookmarkSubscribeRSS Feed
alotaibifm
Calcite | Level 5

Hi everyone, 

 

I would like to get help with calculation the trend over time. I have read different solutions, but I'm confused what is perfect with the data I have. I want to look if there is a trend (decreasing/increasing/no change) in the infection type over 6 years from 2012-2017. So the type of data I have is 

 

ID   Age    Race      Infection_Type     Year 

1     66     White    1-UTI                   2012

2     70    Asian     2-URI                  2013

3     80    White     3-Skin Infection  2015 

 

and so on .. So my research question that I would like to answer is what is the trend for (1-UTI, 2-URI, and 3-Skin Infection) over the 6 years span. 

 

I would appreciate your help. 

Thanks, 

 

 

5 REPLIES 5
PaigeMiller
Diamond | Level 26

Trend implies some measure of time on the X-axis, I assume that would be your variable YEAR. It also implies some continuous variable on the Y-axis, but you show no such value in your sample data. So, it's not clear at this time how to advise you.

 

Furthermore, finding a "trend" can really mean a lot of different things, and could make use of a lot of different statistical methods. Again, from the little you have shown us, there's no way we can advise you. In fact, probably the best thing you could do right now is to consult with a data analyst or statistician at your company or university who can sit down with you, and ask you a lot of questions about your data and what you mean by "trend", and advise you on an appropriate method.

--
Paige Miller
alotaibifm
Calcite | Level 5

From the data I have, I would be able to calculate the frequency and percentage for each infectious disease in each specific year. I would assume if I am able to calculate the Freq, I would be able to test if there is a trend over the years or not?  Does it make sense to you? 

 

Attached the snap from the data I have and don't worry about the year showing only 2012, it just sorted that way. 

Thanks @PaigeMiller

PaigeMiller
Diamond | Level 26

That's fine, percentages can be trended over time. But you still haven't explained what type of trend you want to estimate or test.

--
Paige Miller
alotaibifm
Calcite | Level 5

I want to test if the rate of infectious diseases is different from one year to another. I want to see if the infectious diseases are decreasing/increasing over time and if so, is it statistically significant or not. I hope I answer your question. 

PaigeMiller
Diamond | Level 26

There are many ways to do this.

 

One approach is a regression approach where you fit a straight line through the data, and if the slope is positive and statistically significant, then you conclude that the percent with the infection is increasing.

--
Paige Miller

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 5 replies
  • 1180 views
  • 0 likes
  • 2 in conversation