[R-sig-ME] time-series analysis: how to deal with 'nuisance' factors influencing a trend?

Giancarlo Sadoti gcsadoti at yahoo.com
Thu Dec 16 06:50:32 CET 2010

Greetings list,

I'm examining longitudinal data of counts [COUNT] of a species across three years [YEAR] and across 40 sites [SITE].  My primary interest is in the coefficient of YEAR to determine if there is a trend across the three years.  Counts fit a poisson distribution.  I can't cite this, but it is my understanding that three years is inadequate for the inclusion of a temporal correlation structure, so I am not including it.  Thus, my basic model is:


However, based on exploratory analysis, it appears the per-site trend is correlated with the general size of the per-site population such that smaller populations tend to decline while larger populations tend to increase.  Because, again, my main interest is in the trend (more-or-less) independent of population size, I would consider this 'nuisance variance'.  Unfortunately, I'm not sure where to account for this variance in a mixed model.

Without any clear way (to me) to treat this as a random effect*, I'm considering adding a YEAR:MEAN_COUNT (interaction) fixed effect (where MEAN_COUNT = the average count across the three site visits [within each site]).  This model would appear as:

lmer(COUNT~YEAR+YEAR:MEAN_COUNT+(1|SITE),family=poisson, data=data)

If the resulting 95% CIs of the YEAR effect do not include zero (after accounting for the YEAR:MEAN_COUNT interaction), I would conclude that there is a trend in the counts across the three years, while a significant YEAR:MEAN_COUNT term would indicate a relationship (as expected) between trend and population size.

Does this sound reasonable, or can anyone offer any suggestions?

Many thanks,


*Including MEAN_COUNT per site as a random effect (1|MEAN_COUNT) explains the same variance as (1|SITE) while neither (YEAR|SITE) or (YEAR|MEAN_COUNT) (correlated random coefficients) nor (1|SITE)+(0+YEAR|SITE) (uncorrelated random coefficient/intercept) seem to address the issue.

More information about the R-sig-mixed-models mailing list