Reputation: 1
I have conducted a mesocosm experiment where I have a full factorial design combining two treatments, treatment 1 with 4 levels and treatment 2 with 2 levels. The treatments were organized in blocks (lines) replicated 4 times for a total of 32 mesocosms. I measured water temperature in these mesocosms for 117 consecutive days. Now I want to see the interactive and isolated effects of treat 1 and treat 2 on water temperature. I would like to include temporal autocorrelation in my model as the measures made at day t+1 are correlated with measured of day t.
I have modeled it like this in R using nlme function:
model_mean_temp <- lme(mean_temp ~ treat1 * treat2, random= list(~ 1|line), correlation = corAR1(form = ~ 1|day), data= data)
However I have this error: Error in Initialize.corAR1(X[[i]], ...) : covariate must have unique values within groups for "corAR1" objects
But it is obvious that within the lines block I have temperature measurements conducted in each one of the 8 mesocosms in the same day generating these non-unique values. How can I structure the temporal autocorrelation in my model?
Upvotes: 0
Views: 113