|
Background: I have twoyears(Year) field survey data, each year surveyed three different fields(Site), each field we have three blocks (Repetition), and in each field each year threesamplings were carried out (Date). (a theoretical dataset in the attachment
Table.xlsx
(11.36 KB)
Question: I want to use GLMMmodel to investigate effects of explanatory variables on response variables. However,I am not sure how to deal with the random factor when fit the GLMM model. If just use one of thethree samplings data for analysis, the formula be GLMM.1< - glmer (Responsevariable ~ explanatory variable + (1|factor(Year)/factor(Site)), family=…,data=…) There the Year and Repetition (nested withineach site and year) were included as random factors. Indicating that there is adependence on each year and, within each year, between the three repetitionstaken at each site. But if I want to takethe three samplings data into analysis, what should I do and how can I writethe formula, and should consider about the correlations between dates whetheror not.
|