[R-sig-ME] spaMM::fitme() - a glmm for longitudinal data that accounts for spatial autocorrelation

Thierry Onkelinx th|erry@onke||nx @end|ng |rom |nbo@be
Mon Jul 13 20:56:04 CEST 2020


Dear Sarah,

I don't know the spaMM package.

Have a look at the inlabru package. It has several tutorials on its website
(inlabru.org). Or the INLA package (r-inla.org). The same models but
inlabru has a more user friendly interface. I can recommend Zuur et al
(2017) Spatial, Temporal and Spatial-Temporal Ecological Data Analysis with
R-INLA

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 13 jul. 2020 om 20:31 schreef Sarah Chisholm <schis023 using uottawa.ca>:

> Hello,
>
> I'm trying to fit a GLMM that accounts for spatial autocorrelation (SAC)
> using the spaMM::fitme() function in R. I have a longitudinal data set
> where observations were collected repeatedly from a number of sites over 13
> years. I'm interested in understanding what the effect of time (year) is on
> the dependent variable (y), as well as the fixed effect of a categorical
> variable (class) while accounting for the random factors biome, continent,
> and ID (a unique ID for each site sampled). My full data set contains ~ 180
> 000 rows and attached is a subset of these data ('sampleDF'). My current
> fitme() model looks like this:
>
> library(spaMM)
>
> M1 <- fitme(y ~ year + class + (1|biome) + (1|continent) + (1|ID) +
> Matern(1|long + lat), data = df, family = "gaussian", method = "REML")
> I have two questions:
>
> 1) I'm uncertain if this is an appropriate way of applying the
> spaMM::fitme() function to longitudinal data. I have some experience with
> fitting GLS models that account for SAC to a longitudinal data set where I
> had to group the data set by year using the nlme::groupedData() function
> before fitting the model. Does a similar method need to be used in the case
> of spaMM:fitme() and longitudinal data?
>
> 2) Is there another R package out there that can create a similar model (a
> GLMM that accounts for SAC)?. I've found very few resources explaining the
> use of functions in the spaMM package other than the user guide (F.
> Rousset, 2020. An introduction to the spaMM package for mixed models) and
> I'm not quite getting the help that I need from it. I'm wondering if
> there's another approach to modeling these data that has a broader user
> base and thus more easily accessible resources / online help (ex. stack
> exchange / cross validated Qs and As).
>
> Thank you!
> Sarah
> _______________________________________________
> 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