0
$\begingroup$

I have count data on three groups of sites, sampled annually over 6 years.

Group1 = target group

Group2= control (untreated group) and

Group3 = treated group (started the same as Group2).

My hypothesis is that OVER TIME Group3 will become less like Group2 and more like Group1. I want to show in which year this occurs:

Example result:

In year 1, Group3 is NS from Group2 but is sig dif from Group1. But in year 3, Group3 is sig dif from Group2 and NS from Group1.)

So how do I test for significance between all groups, with year as an interaction? Since Im comparing both Group1 and 2 to Group3, I thought to use Group3 as the reference (i.e. intercept) and Group1 and 2 as the independent 'treatments' using a poisson glm regression :

glm(count ~ group * year, dat ,family ="poisson") 

If I set year as a factor will this test each group_year combo as a categorical interaction? (note the 6 years are not continuous: 2010:2013,2016,2017)

Is this the best way to test for differences between groups or is there a more elegant way? (note Im not particularly interested in the difference between groups 1 and 2, more in the transition of group 3).

$\endgroup$
0
$\begingroup$

To get the type of result shown in your example (e.g. In year 1, Group3 is NS from Group2 but is sig dif from Group1. But in year 3, Group3 is sig dif from Group2 and NS from Group1) could you not just remove year from the model, and carry out separate tests for each year?

For example, subset your data into different years (dat_2010, dat_2011 etc), and use the formula

glm(count ~ group, dat_2010, family="poisson")

etc....

If you relevel your "group" variable so that Group 3 is the reference group that should give you the desired results - telling you whether Groups 1 and 2 differ significantly from Group 3 for each year of your experiment.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.