From 02d4c3d5b4c570a60781586701353dd2f1c84014 Mon Sep 17 00:00:00 2001 From: francois <francois.rousset@umontpellier.fr> Date: Fri, 3 Mar 2023 15:23:24 +0000 Subject: [PATCH] Update README.md --- README.md | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 64d54a2..39f99cc 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ __spaMM__ is an R package originally designed for fitting ***spa***tial generalized linear ***M***ixed ***M***odels, particularly the so-called geostatistical model allowing prediction in continuous space. But it is now a more general-purpose package for fitting mixed models, spatial or not, and with efficient methods for both geostatistical and autoregressive models. It can fit models with non-gaussian random effects (e.g., Beta- or Gamma-distributed), structured dispersion models (including residual dispersion models with random effects), and implements several variants of Laplace and PQL approximations, including (but not limited to) those discussed in the _h_-likelihood literature (see References). Some non-GLM response families are now handled. It can also fit multivariate-response models, including some of interest in quantitative genetics. ## What to look for (or not) here ? -This repository provides whatever information I do not try to put into the R package, such as its vignette-like [gentle introduction](https://gitlab.mbb.univ-montp2.fr/francois/spamm-ref/-/blob/master/vignettePlus/spaMMintro.pdf) (latest version: 2022/11/19) and the [slides](https://gitlab.mbb.univ-montp2.fr/francois/spamm-ref/-/blob/master/vignettePlus/MixedModels_useR2021.pdf) from the presentation of spaMM at the [useR2021](https://user2021.r-project.org/) conference. +This repository provides whatever information I do not try to put into the R package, such as its vignette-like [gentle introduction](https://gitlab.mbb.univ-montp2.fr/francois/spamm-ref/-/blob/master/vignettePlus/spaMMintro.pdf) (latest version: 2023/03/03, in particular correcting outdated parts of the previous version) and the [slides](https://gitlab.mbb.univ-montp2.fr/francois/spamm-ref/-/blob/master/vignettePlus/MixedModels_useR2021.pdf) from the presentation of spaMM at the [useR2021](https://user2021.r-project.org/) conference. It might also be used to distribute development versions of `spaMM`. However, use a CRAN repository for standard installation of the package, and see the (unofficial) [CRAN github repository](https://github.com/cran/spaMM) for an archive of sources for all versions of spaMM previously published on CRAN. @@ -20,10 +20,11 @@ It might also be used to distribute development versions of `spaMM`. However, us The `spaMM` package was developed first to fit mixed-effect models with spatial correlations, which commonly occur in ecology, but it has since been developed into a more general package for inferences under models with or without spatially-correlated random effects, including multivariate-response models. To make it competitive to fit large data sets, `spaMM` has distinct algorithms for three cases: sparse precision, sparse correlation, and dense correlation matrices, and is efficient to fit geostatistical, autoregressive, and other mixed models on large data sets. Notable features include: -- Fitting spatial and non-spatial correlation models: **geostatistical** models with random-effect terms following the `Matern` as well as the much less known `Cauchy` correlation models, **autoregressive** models described by an `adjacency` matrix, AR(_p_) and ARMA(_p_,_q_) time-series models (`ARp` and `ARMA`), or an **arbitrary given** precision or correlation matrix (`corrMatrix`). Conditional spatial effects can be fitted, as in (say) `Matern(female|...) + Matern(male|...)` to fit distinct random effects for females and males (e.g., [Tonnabel et al., 2021](https://doi.org/10.1111/mec.15833)). Models for symmetric or antisymmetric **dyadic interactions** (accounting for the fact that the same individual would appear in each of two individual random effects; e.g., [Charpentier et al., 2022]( https://doi.org/10.7554/eLife.79417)) can also be fitted: see `diallel` or `antisym` documentation. Brave users can even define their own parametric correlation models, to be fitted as any other random effect (the `corrFamily` feature). +- Fitting spatial and non-spatial correlation models: **geostatistical** models with random-effect terms following the `Matern` as well as the much less known `Cauchy` correlation models, **autoregressive** models described by an `adjacency` matrix, AR(_p_) and ARMA(_p_,_q_) time-series models (`ARp` and `ARMA`), or an **arbitrary given** precision or correlation matrix (`corrMatrix`). Conditional spatial effects can be fitted, as in (say) `Matern(female|...) + Matern(male|...)` to fit distinct random effects for females and males (e.g., [Tonnabel et al., 2021](https://doi.org/10.1111/mec.15833)). Brave users can even define their own parametric correlation models, to be fitted as any other random effect (the `corrFamily` feature). - A further class of spatial correlation models, "Interpolated Markov Random Fields" (`IMRF`) covers widely publicized approximations of Matérn models ([Lindgren et al. 2011](http://doi.org/10.1111/j.1467-9868.2011.00777.x)) and the multiresolution model of [Nychka et al. 2015](https://doi.org/10.1080/10618600.2014.914946). +- Symmetric and antisymmetric **dyadic interaction** effects (such as considered in so-called Bradley-Terry models or in diallel experiments) can be fitted as fixed or as random effects (see e.g. `X.antisym`, see `diallel` or `antisym` documentations) - Allowed response families include zero-truncated variants of the Poisson, two negative binomial families, beta response family, and the Conway-Maxwell-Poisson (`COMPoisson`) family; -- All the above features combined in multivariate-response models. Previously, more experimental facilities have been available for handling multinomial data only; +- All the above features combined in multivariate-response models; - A replacement function for `glm`, useful when the latter (or even `glm2`) fails to fit a model; - A syntax close to that of `glm` or [`g`]`lmer`. It includes a growing list of extractor methods similar to those in `stats` or `nlme`/`lmer`, and functions for inference beyond the fits, such as `confint()` for confidence intervals of fixed-effect parameters, `predict()` and related functions for point prediction and prediction variances, and compatibility with functions from other packages such as `multcomp::glht()` and `lmerTest` procedures providing F tests using Satterthwaite method (see `` `post-fit` `` and `anova` documentation items); - Simple facilities for quickly drawing maps from model fits, using only base graphic functions. See [here](http://kimura.univ-montp2.fr/%7Erousset/spaMM/example_raster.html) for more elaborate examples of producing maps. The animated graphics on this page is from an application using the [`IsoriX` package](https://github.com/courtiol/IsoriX/blob/master/README.md). @@ -34,9 +35,9 @@ The performance of Laplace approximations used by `spaMM` was assessed for spati Rousset F., Ferdy J.-B. (2014) [Testing environmental and genetic effects in the presence of spatial autocorrelation](http://onlinelibrary.wiley.com/doi/10.1111/ecog.00566/abstract). Ecography, 37: 781-790. Also available here is the [Supplementary Appendix G](http://kimura.univ-montp2.fr/%7Erousset/spaMM/RoussetF14AppendixG.pdf) from that paper, including comparisons with a trick that has been uncritically used to constrain the functions `lmer` and `glmmPQL` to analyse spatial models. -For some substantial use of various features of `spaMM`, see e.g. the [IsoriX project](https://github.com/courtiol/IsoriX), or a story about [social dominance in hyaenas](https://doi.org/10.1038/s41559-018-0718-9), or [yet another depressing story about climate change](https://doi.org/10.1038/s41467-019-10924-4), or [the life-history of mothers of twins](https://doi.org/10.1038/s41467-022-30366-9), or a comparison of prediction by LMMs and by random-forest methods (in supplementary material of [a paper on protected area personnel](https://doi.org/10.1038/s41893-022-00970-0)). +For some substantial use of various features of `spaMM`, see e.g. the [IsoriX project](https://github.com/courtiol/IsoriX), or a story about [social dominance in hyaenas](https://doi.org/10.1038/s41559-018-0718-9), or [yet another depressing story about climate change](https://doi.org/10.1038/s41467-019-10924-4), or [the life-history of mothers of twins](https://doi.org/10.1038/s41467-022-30366-9), or a comparison of prediction by LMMs and by random-forest methods (in supplementary material of [a paper on protected area personnel](https://doi.org/10.1038/s41893-022-00970-0)) or [analyses of dyadic interactions in mandrills](https://doi.org/10.7554/eLife.79417). -Initial development drew inspiration from work by Lee and Nelder on _h_-likelihood (e.g. [Lee, Nelder & Pawitan](https://doi.org/10.1201/9781420011340), 2006; [Lee & Lee](http://dx.doi.org/10.1007/s11222-011-9265-9) 2012; see also [Molas and Lesaffre](http://dx.doi.org/10.1002/sim.3852), 2010), and it retains from that work several distinctive features, such as methods to fit models with non-gaussian random effects, structured dispersion models, and implementation of several variants of Laplace and PQL approximations. However, later versions have increasingly relied on additional insights. Notably, the default likelihood approximation now goes beyond those discussed in these works, and is the same Laplace approximation ([Skaug & Fournier, 2006](https://doi.org/10.1016/j.csda.2006.03.005)) as in [TMB](https://cran.r-project.org/web/packages/TMB) and packages based on TMB, in particular where this departs from what is discussed in the _h_-likelihood literature (i.e., for GLM families with non-canonical link, or response families not of the GLM class). +Initial development drew inspiration from work by Lee and Nelder on _h_-likelihood (e.g. [Lee, Nelder & Pawitan](https://doi.org/10.1201/9781420011340), 2006; [Lee & Lee](http://dx.doi.org/10.1007/s11222-011-9265-9) 2012; see also [Molas and Lesaffre](http://dx.doi.org/10.1002/sim.3852), 2010), and it retains from that work several distinctive features, such as specific methods to fit models with non-gaussian random effects, structured dispersion models, and implementation of several variants of Laplace and PQL approximations. However, later versions have increasingly relied on additional insights. Notably, the default likelihood approximation now goes beyond those discussed in these works, and is the same Laplace approximation ([Skaug & Fournier, 2006](https://doi.org/10.1016/j.csda.2006.03.005)) as in [TMB](https://cran.r-project.org/web/packages/TMB) and packages based on TMB, in particular where this departs from what is discussed in the _h_-likelihood literature (i.e., for GLM families with non-canonical link, or response families not of the GLM class). ## Credits Initial development was supported by a PEPS grant from the CNRS and University of Montpellier. -- GitLab