I have put individual ID as a random variable in my model, but some individuals only have 1 record and others have 19 records.

Does this mean that individual ID shouldn't be a random variable?

Here's the context: I have birds visiting a feeder and want to know if the length of a visit is determined by species (3 options), site (3 options), and indiviudal ID.

The model I'm running currently is

lenght ~ species + site + (1|id)

  • $\begingroup$ No, it does not mean that. $\endgroup$ – user2974951 Oct 3 '19 at 14:01
  • 1
    $\begingroup$ Unless you tell us more about what is your data and what are you trying to achieve, this is impossible to answer. $\endgroup$ – Tim Oct 3 '19 at 14:15
  • $\begingroup$ @Tim, sorry! I'll add some context. $\endgroup$ – Rachael Oct 3 '19 at 14:56
  • $\begingroup$ @user2974951 thank you for your response $\endgroup$ – Rachael Oct 3 '19 at 14:56
  • 1
    $\begingroup$ Thanks, I think it is already answered in here: stats.stackexchange.com/questions/242821/… is it? $\endgroup$ – Tim Oct 3 '19 at 15:35