# How to account for yearly variation in data both between and within individuals in R (lme4)?

I'll try to make this as brief as possible. I am working with binomial attendance data (0 = absent, 1 = present) for seabirds at a breeding colony. There are ~300 birds that contribute ~60 days of data for each breeding season, and there are 4 breeding seasons in total. Most birds are present more than once throughout these 4 years, and will therefore contribute seasons of attendance data. For example, a given bird might breed 3 out of 4 years, and will therefore contribute 3 sets of ~60 days of 0s and 1s.

We are looking at what factors influence attendance throughout the breeding season. So, in addition to the fixed effects in my model, we have two random effects: "Year", to account for variation in attendance due to the breeding season; and "ID", to account for variation between individual birds (because we have repeated measurements of individuals).

However, we have reason to suspect that attendance patterns will vary not just between individual birds, but also that individuals themselves will vary in their attendance patterns from year to year. We are therefore trying to incorporate random effects that will account for three sources of variation in the data:

1. Variation between years ("Year")

2. Variation between individuals ("ID")

3. Variation between years for a given individual (Not included in the model)

I am struggling to understand whether or not we are currently taking care of point 3 with the two random effects. In the current model, this is the code:

Attendance ~ Fixed effects + (1|Year) + (1|ID)


I am wondering if I need to nest one random effect within another, or if I need another random effect entirely? One thought I had was keeping "Year" the same, and changing "ID" to include both the individual and the year (so it would look like "Bird153Year1", "Bird153Year2", etc., instead of just "Bird153", to account for the yearly variation for each individual bird).

Please let me know if I'm overthinking this and how I might go about structuring my model set. Thanks!

edit: Here's another question that's basically the same as mine:

Interactions between random effects

Attendance ~ Fixed effects + (1|Year) + (1|ID) + (1|Year:ID)