1

I have been struggling to fit a model using gamm4.

context of my study

I'm trying to fit a 'gamm binomial' to model the probability of having a new component in a group. In my data, components are measured in intervals of time within groups.
I believe that this probability of observing a new compoenent, and the number of components, they are both dependent on space and on the measurement intervals. I have been studying papers and the book of Wood, but it is not totally explained how to account for spatial and time correlation in GAM models. So, my questions are below:

Model I fitted using gamm4:

y ~ var 1 + var 2 + var 3 + s(lat, long) + 
random(=~1|measurement)

a) Is this model accounting for spatial/temporal correlation? What is the advantage of a GAM to a GLM? Why not just use (lat, long and measurement) as random effects in a GLM? From the output, where should I look to understand the effect of lat, long and measurement in y? b) I read something related to the spatial correlation of the residuals. I'm not sure if I well understood. In case yes, I would use the model as follows:

y ~ var 1 + var 2 + var 3 + s(lat, long) + 
random(=~1|measurement), corExp(form=~ lat + long)

What does the 'corExp' do?

c) I have no idea how to interpret results coming from a gamm4. I'm at the same level of this post here:

Interpreting and reporting gamm4 result

How should I look for an index of the spatial correlation in GAM? Is that the random effect in the lmer?

d) Should I maybe include my measurements as a smoother? Such as:

y ~ var 1 + var 2 + var 3 + s(lat, long, k = 14) + 
s(measurement)
kjetil b halvorsen
  • 63,378
  • 26
  • 142
  • 467
Mario
  • 11
  • 1

0 Answers0