[R-sig-Geo] Combining random effects with a spatial autocorrelation structure in gamm

Patrick Lawrence plawrencenw at gmail.com
Sat May 23 00:43:51 CEST 2015


This may be more appropriate in the SIG-mixed-models list, but given the
spatial component I thought I'd try here first.

I have an agricultural dataset that contains lattice data spread out in 4
non-contiguous fields.  Each field has the approximate dimensions of 43 x
43 cells.  My model is trying to explain yields as a function of several
continuous spatial covariates and one temporal covariate (the dataset spans
multiple years).

Given the spatiotemporal structure, I have correlation within years,
correlation within fields, and then sub-field correlations.  Ideally, I
could use a Conditional Autoregressive structure that was nested within
fields along with a year random effect, however there doesn't appear to be
an easy way to do this.  Therefore, I'm trying to use the year and field
random effects (crossed) plus a variogram-like correlation structure.
Within the gamm function (in mgcv), I can do this, although it takes ~ 46
hrs per run on a 64 gb ram machine.  This isn't ideal, but my main concern
is whether, when I have multiple random effects *and *such a correlation
structure, the output from the gamm function is reliable.

Can anyone speak to the reliability of gamm with all these added components
or possibly suggest an alternative?

Thanks,
Patrick

	[[alternative HTML version deleted]]



More information about the R-sig-Geo mailing list