spaMM reference page
a standard R package distributed
on CRAN. It was
originally designed for
generalized linear mixed models (GLMMs),
but is now a more general-purpose package for fitting mixed models, spatial or not.
- It deals with several random effects with different distributions (one of which may be a Gaussian spatial effect). For example, a mixed-model with a random effect R affecting a negative binomial response can be fitted as a model with Poisson response, a gamma-distributed random effect, and the random effect R;
- Genetic, phylogenetic, or other given correlations are easily taken into account using the corrMatrix argument of the HLCor function;
- It fits nested effects; it fits random-slope models including the covariation between intercept and slope effects if these are Gaussian;
- It includes the Beta binomial, negative binomial, or GLMs with structured dispersion as special cases;
- It includes a growing list of extractor methods derived from those in stats or nlme/lmer, and functions for inference beyond the fits, such as confint for confidence intervals of fixed-effect parameters;
- It includes facilities for drawing maps (as shown on the right);
- It includes facilities for handling multinomial data.
The syntax is close to that of glm or [g]lmer. You can download a gentle introduction (latest version 2014/10/20) to the package.
The version available here (latest version 1.3.10; see installation notes below) corrects glitches of the current CRAN version and includes a few further improvements (for random-slope models and prediction variances).
in active development both in terms of better interface and of
alternative algorithms (e.g., stochastic algorithms for estimation of likelihood) or models.
Rousset F., Ferdy J.-B. (2014) Testing environmental and genetic effects in the presence of spatial autocorrelation. Ecography, 37: 781-790.
Also available here is the Supplementary Appendix G from that paper, including comparisons with a trick commonly used to constrain the functions lmer and glmmPQL to analyse spatial models.
Installing versions obtained from this page:Run install.packages with the highlighted options:
> install.packages(<archive name>,type="source",repos=NULL)
If this fails and you are a Windows user, then it is likely that you have not (fully) installed the Rtools. If you think you have installed the Rtools but this fails, then you probably have
not set the PATH variable in the Windows environment variables (cf "Edit the path variable" here). To check that you have fully installed the Rtools, make a test with the archive of another package that requires compilation, e.g. on the downloaded archive of the lpSolveAPI package.
Funding: spaMM development benefitted from a PEPS grant from CNRS and universities Montpellier 1 & 2 and is currently hosted within the IBC.
spaMM (C) François Rousset (CNRS & University Montpellier 2) & Jean-Baptiste Ferdy (University of Toulouse) 2013-present.
This page (C) F. Rousset 2013-present