[R-sig-ME] Mixed model specification (control for location and repeated sampling of same location through time)

Brian Gill br|@ng|||phd @end|ng |rom gm@||@com
Mon Oct 31 18:51:24 CET 2022


I have three locations (Sites) where I repeatedly measured a number of
environmental variables (X1, X2, X3) and a response (Y; normally
distributed) over time. That is, I have data on each environmental variable
and the response at many time points for each of 3 sites. For each
timepoints all three sites were sampled.

I want to model the response (Y) as a function of the environmental
variables (X1, X2, X3) while controlling for effects of Sites and Time. I
expect responses from the same site to be similar because they come from
the same location and responses measured at closer timepoints to be more
similar than those separated by more time.

Can people please advise on an appropriate model specification.

I've come up with the following so far:

Y ~ Site + X1 + X2 + X3 + (1 | Date)

Y ~ X1 + X2 + X3 + (1 | Site) + (1 | Date)

My hangups are that I think these models treat Date categorically
(controlling for variation from a particular date, but not how close or far
dates are from each other). Also, a model allowing both random intercepts
and slopes might be better as responses could vary significantly in
magnitude and direction among sites.

Any advice would be appreciated. Thanks!

	[[alternative HTML version deleted]]



More information about the R-sig-mixed-models mailing list