I have a problem with the statistical evaluation of an agricultural field trial. The experiment took place at three locations, as a randomized complete block design (four blocks) and with 17 variables. I would like to use the statistical program R to evaluate the trial across all three locations.
Mixed linear model:
y = location + treatment + location:block+ location:treatment+ mistake
Data record in excel: first column: Location, second column: Block, then several columns with e.g. grain yield, crude protein content, crude protein yield, all data are in a common Excel table.
I want to solve the whole thing with the lme function from the nlme package. I have entered this in R:
lme(response ~ place + Trt ,random =list(one = pdBlocked( pdIdent(~ 0 + Trt:place), pdIdent(~ 0 + Block:place))))
but I get the error message:
form must be a list
How can I change the whole thing so that it works?