Skip to content

Random slope specification with interactions in fixed effects

3 messages · Melanie Dickie, Thierry Onkelinx, João Veríssimo

#
Hello,

I am attempting to evaluate the influence of two main continuous
independent variables (?winter severity? aka WinterSeverity and ?% habitat
alteration? aka Alteration), and their interaction, on a continuous
dependent variable (?density?, measured as #animals/km2). I have reason to
suspect the impact of these two variables also depends on the underlying
habitat context (measured using a continuous variable, let?s say the
Normalized Difference Vegetation Index ?NDVI?). From this, my base model is:

Density ~ NDVI*Alteration + NDVI*WinterSeverity + Alteration*WinterSeverity

Density is sampled in quadrats, with multiple quadrats clumped together in
?clusters?; such that the ?cluster? is the true sample unit, if you will,
and the quadrats are replicated samples of each ?cluster?.

One complicating twist is that the independent variables are all measured
at each ?cluster?, such that there is no variation in the independent
variables within each cluster, but there is variation among clusters. Each
of the quadrats within each cluster have different density values, but the
same value for winter severity, % habitat alteration, and NDVI.

Putting the twist aside for a moment, my understanding is that I should be
using a random slope model to gain inference at the cluster level. The
random effects would allow the covariate effects to vary among clusters and
the fixed effects would capture the average effect of each covariate across
clusters. From this, the full specification of the model is (with
appropriate specification of the family and link):

Density ~ NDVI*Alteration + NDVI*WinterSeverity + Alteration*WinterSeverity
+ ( NDVI*Alteration  |Cluster) + ( NDVI*WinterSeverity  |Cluster) + (
NDVI*WinterSeverity  |Cluster)

This model, however, appears to be too complex for my data and will not
converge. To that end, I have also considered the following reduced model
that does not include the interactions in the random effect structure (this
model converges):

Density ~ NDVI*Alteration + NDVI*WinterSeverity + Alteration*WinterSeverity
+ (0+NDVI|Cluster) + (0+Alteration|Cluster) + (0+WinterSeverity|Cluster)

I have two main questions:

1.       For the simplified model, I am unsure of the interpretation of the
beta coefficients for the fixed-effect interactions if only the independent
variables with no interactions are specified as random slopes. Do the fixed
coefficients still yield inferences at the cluster level?

2.       Is the lack of variation in independent variables within each
cluster problematic? Is there an alternative way to model this that I am
missing?
Thank you for your help,
Melanie
#
Dear Melanie,

Fitting random slopes requires a range of values within each unit. Since
your covariates remain constant within the cluster, you can't estimate the
slope within each cluster. Hence the model should be
Density ~ NDVI*Alteration + NDVI*WinterSeverity + Alteration*WinterSeverity +
(1|Cluster)

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 at 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 di 22 aug 2023 om 15:13 schreef Melanie Dickie <mvezina at ualberta.ca>:

  
  
#
On 22/08/2023 00:52, Melanie Dickie wrote:
This means that by-cluster random slopes should not be included, since 
you cannot estimate their within-cluster effect.

If I'm seeing this correctly, the model that you're looking for is simply:
Density ~ NDVI*Alteration + NDVI*WinterSeverity + 
Alteration*WinterSeverity + (1|Cluster)

Jo?o