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

Thierry Onkelinx th|erry@onke||nx @end|ng |rom |nbo@be
Thu Nov 3 14:45:01 CET 2022


Dear Brian,

You have only 3 sites. That is too few to use as a random effect.

Look into glmmTMB and INLA. They provide correlated random effects. Which
is relevant for your Date variable.

The glmmTMB formula might look like this: Y ~ Site + X1 + X2 + X3 +
ar1(Date | Site)
The INLA formula: Y ~ Site + X1 + X2 + X3 + f(Date, model = "rw1",
replicate = as.integer(Site))

Best regards,

ir. Thierry Onkelinx
Statisticus / Statistician

Vlaamse Overheid / Government of Flanders
INSTITUUT VOOR NATUUR- EN BOSONDERZOEK / RESEARCH INSTITUTE FOR NATURE AND
FOREST
Team Biometrie & Kwaliteitszorg / Team Biometrics & Quality Assurance
thierry.onkelinx using inbo.be
Havenlaan 88 bus 73, 1000 Brussel
www.inbo.be

///////////////////////////////////////////////////////////////////////////////////////////
To call in the statistician after the experiment is done may be no more
than asking him to perform a post-mortem examination: he may be able to say
what the experiment died of. ~ Sir Ronald Aylmer Fisher
The plural of anecdote is not data. ~ Roger Brinner
The combination of some data and an aching desire for an answer does not
ensure that a reasonable answer can be extracted from a given body of data.
~ John Tukey
///////////////////////////////////////////////////////////////////////////////////////////

<https://www.inbo.be>


Op ma 31 okt. 2022 om 18:55 schreef Brian Gill <briangillphd using gmail.com>:

> 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]]
>
> _______________________________________________
> R-sig-mixed-models using r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
>

	[[alternative HTML version deleted]]



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