I'm not sure this question is better suited for Cross Validated or Stack Overflow, please don't hesitate to tell me if I ask it on the wrong forum. I'd appreciate some help interpreting what shows the result of plot.gam on a GAM object with random effects, obtained with gamm4. I'll try to give a reproductible example.

I'll take an invented example : we have several species of rabbits in several forests (ecologist spotted). We'd juste like to visualize what is the evolution of rabbit size in time, averaged on all forests and on all species. In other words, we'd like to see if there is a global pattern in the evolution of size, independently of location or species.

Let's generate a dataset :


We get a data set with sizes for 3 species (X,Y,Z), between 1991 and 2008, in six forests (A,B,C,D,E,F).


We get this graph from plot.gam :

Result from plot.gam

Intuitively, I'd like to say that this plot plot represents the "average" evolution of rabbit size in time, when we remove forest and species effect. Though, I'm totally new to GAM and GAMM. So my question is : is it really what this is about ? Or am I wrong to use this approach ? I was wondering so because here, my goal is more to visualize the data than to make inferences, so I'm not sure if this is a good idea to use this method.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.