We want to model flowering time (y) as a function of replicate, donor taxon, inv4m genotype, and a random effect of donor plant.
The model equation is:
\[ y_{ijk\ell} = \mu + \text{Rep}_i + \text{DonorTaxa}_j + \text{Inv4mGenotype}_k + u_{\ell} + \varepsilon_{ijk\ell} \]
Where:
library(lme4)
# Example model (assuming your dataset is called df)
mod_lmer <- lmer(
y ~ Rep + donor_taxa + inv4m_genotype + (1 | donor_plant),
data = df
)
summary(mod_lmer)
library(nlme)
mod_lme <- lme(
fixed = y ~ Rep + donor_taxa + inv4m_genotype,
random = ~ 1 | donor_plant,
data = df
)
summary(mod_lme)