Linear Mixed Models non-independent data with unbalanced design and non-independent data? I am new in trying to set up a mixed model and I would like some input concerning my model design.
I have been reconstructing the age of some plants and in each year I have been measuring their productivity. So I have a design which includes 580 plants, each plant has an age (varies from 4-25 years) and within each year I have a productivity measurement. I would like to see how the productivity relate to temperature changes.
So with this experimental design I am facing two main problems:

*

*Within each plant, the measurements between the years are non -independent

*Each plant has a different time range (4 minimum, 25 maxmimum)

I started by trying an LMM model, fitting the variable "plant" as random effect to account for the non-independence of data within each plant.
So my model had the form:
model1 <- lmer(Productivity ~ Temperature + (1|Plant), data=data)

As a second step I wanted somehow to include the fact that each plant has a different time range … So, I included the factor Year nested in Plant.
So the second model had the form:
model2 <-lmer(Productivity ~ Temperature + (1|Plant:Year),  
              data=data)

The results between these models are really different, so I am not sure which one better encapsulates my experimental design. I am not quite sure about the nested factor, as Years between plants in some cases coincide …
 A: You say that

the factor Year nested in Plant

If Year is nested within Plant. In that case, the moel should be
lmer(Productivity~Temperature +(1|Plant/Year),data = data)

or eqivalently:
lmer(Productivity~Temperature +(1|Plant) + (1|Plant:Year),data = data)

So, just to clarify, this means that each Year belongs to one and only one Plant. So year 1 could belong to plant 1, and year 2 could also belong to plant 1, which means that for each year, one and only 1 plant was measured. For year 3, for example, this could belong to plant 2 (but not plant 1). The nested structure looks like
        Plant1             Plant2             Plant3
       /     \            /      \            /     \
    Year1  Year2        Year3  Year4        Year5  Year6



Edit: It appears from the comments that the design is partially crossed (partially nested). This might look something like
        Plant1     Plant2   Plant3
          /\      /  \   \ / \  
         /  \    /    \   X   \         
        /    \  /      \ / \   \
    Year1    Year2   Year3  Year4


In that case, the appropriate random structure is:
lmer(Productivity~Temperature + (1|Plant) + (1|Year), data = data)

More detail about nested and crossed random effects is here:
Crossed vs nested random effects: how do they differ and how are they specified correctly in lme4?
