BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
yubaraj
Fluorite | Level 6

Hi All

I have a 15 year data for incidence of head injuries expressed as  (number of injuries/100,000 population) for 4 age categories. (10-20 years, 20-40 years, 40-65 year, and 65 year and above). I have 4 separate lines showing the incidence trend over time.

I was asked to test the signifcance of trends between groups. In other words, is the incidence trend in 10-20 years age category is different to incidence trend in 20-40 year. 

I looked at the sources and there is a discussion about assessing significance of trend in one group over time.

Is it correct to use proc genmod when testing for ... - SAS Support Communities

Proc genmod for time trends - correct interpretation? (researchgate.net)

But I was wondering if it is possible to do the test for trend difference between groups (4 categories of age or between make and female).

I am using SAS 9.4 

Thank you

Yuba 

1 ACCEPTED SOLUTION

Accepted Solutions
StatDave
SAS Super FREQ

You should include the TYPE3 option in the MODEL statement. That will give you a single test of the interaction which is a test of whether all of the group slopes are equal. With 4 groups, the TYPE3 test for the interaction should have 3 degrees of freedom. If that test is not significant, then you might conclude that the group slopes do not differ. If it is significant, then the tests of the individual parameters in the interaction compare the slopes in each group against the slope in the reference group.

View solution in original post

3 REPLIES 3
StatDave
SAS Super FREQ

See the discussion and the Poisson example in this note. As shown there, you need a model with age group as a CLASS variable and a year variable (best coded simply as 1, 2, 3, ... , 15 rather than the actual year values), and the interaction of those two. You should create a variable that is the log of your population size (in 100,000) and use it in the OFFSET= option. 

yubaraj
Fluorite | Level 6

Thank you this works.

Just to confirm, I created four variables: year (1-15, which repeat for each age groups), age group, count(incidence of injuries) and population (100,000).

My codes are as follows: 

data head_inj1;set head_inj;

logp =log(population); run;

 

proc genmod data=head_inj1;

class age_group (ref="10-19");

model count =age_group year age_group*year/dist=poisson offset=logp;run;

 

 

So, I will look at the p value for year*age to see which age category has a different trend compared to reference age category.

By default, highest age category is the reference category but I can assign reference category in the class statement. 

Thank you @StatDave .

Yuba 

 

StatDave
SAS Super FREQ

You should include the TYPE3 option in the MODEL statement. That will give you a single test of the interaction which is a test of whether all of the group slopes are equal. With 4 groups, the TYPE3 test for the interaction should have 3 degrees of freedom. If that test is not significant, then you might conclude that the group slopes do not differ. If it is significant, then the tests of the individual parameters in the interaction compare the slopes in each group against the slope in the reference group.

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 3 replies
  • 534 views
  • 0 likes
  • 2 in conversation