I collected my data (insect biomass) fortnightly from the same trees (six trees) from February to August. The biomass curve looks like Gaussian density curve. I know that I can use optim() to fit the data. However, As I sampled the same tree repeatedly, to account for the lack of independence of the observations, I want to include 'tree id' as random effect. How can I fit the data? nlme or any other regression?
Any advice will be appreciated. Thanks for your time and help.