Learn R Programming

⚠️There's a newer version (4.5.0) of this package.Take me there.

spaMM (version 4.4.16)

Mixed-Effect Models, with or without Spatial Random Effects

Description

Inference based on models with or without spatially-correlated random effects, multivariate responses, or non-Gaussian random effects (e.g., Beta). Variation in residual variance (heteroscedasticity) can itself be represented by a mixed-effect model. Both classical geostatistical models (Rousset and Ferdy 2014 ), and Markov random field models on irregular grids (as considered in the 'INLA' package, ), can be fitted, with distinct computational procedures exploiting the sparse matrix representations for the latter case and other autoregressive models. Laplace approximations are used for likelihood or restricted likelihood. Penalized quasi-likelihood and other variants discussed in the h-likelihood literature (Lee and Nelder 2001 ) are also implemented.

Copy Link

Version

Install

install.packages('spaMM')

Monthly Downloads

1,913

Version

4.4.16

License

CeCILL-2

Maintainer

Franois Rousset

Last Published

December 20th, 2023

Functions in spaMM (4.4.16)

Gryphon

Gryphon data
HLCor

Fits a (spatially) correlated mixed model, for given correlation parameters
DoF

Degrees of freedom extractor
HLfit

Fit mixed models with given correlation matrix
multIMRF

Interpolated Markov Random Field models
spaMM_glm.fit

Fitting generalized linear models without initial-value or divergence headaches
COMPoisson

Conway-Maxwell-Poisson (COM-Poisson) GLM family
CauchyCorr

Cauchy correlation function and Cauchy formula term
MaternIMRFa

corrFamily constructor for Interpolated Markov Random Field (IMRF) covariance structure approximating a 2D Matern correlation model.
pseudoR2

Pseudo R-squared
WinterWheat

Example of yield stability analysis
Leuca

Leucadendron data
MSFDR

Multiple-Stage False Discovery Rate procedure
PLS-internals

Internal functions for procedure using the ((I,0),(Z,X)) block-order
MaternCorr

Matern correlation function and Matern formula term.
Loaloa

Loa loa prevalence in North Cameroon, 1991-2001
ARp

Random effect with AR(p) (autoregressive of order p) or ARMA(p,q) structure.
AIC

Extractors for information criteria such as AIC
ZAXlist

S4 classes for structured matrices
LRT

ANOVA tables, and likelihood ratio tests of fixed and random effects.
algebra

Control of matrix-algebraic methods
arabidopsis

Arabidopsis genetic and climatic data
as_LMLT

Conversion to input for procedures from lmerTest package
adjlg

Simulated data set for testing sparse-precision code
composite-ranef

Composite random effects
clinics

Toy dataset for binomial response
corr_family

corr_family objects
corrMatrix

Using a corrMatrix argument
control.HLfit

Control parameters of the HLfit fitting algorithm
confint.HLfit

Confidence intervals
beta_resp

Beta-response family object
autoregressive

Fitting autoregressive models
convergence

Assessing convergence for fitted models
corMatern

Matern Correlation Structure as a corSpatial object
betabin

Beta-binomial family object
extreme_eig

Utilities for regularization of a matrix
blackcap

Genetic polymorphism in relation to migration in the blackcap
extractors

Functions to extract various components of a fit.
corrFamily-definition

corrFamily definition
X.GCA

Fixed-effect terms for dyadic interactions
corrFamily

Using corrFamily constructors and descriptors.
corrHLfit

Fits a mixed model, typically a spatial GLMM.
corrFamily-design

Designing new corrFamily descriptors for parametric correlation families
dofuture

Interface for parallel computations
div_info

Information about numerical problems
drop1.HLfit

Drop all possible single fixed-effect terms from a model
dopar

Interface for parallel computations
fix_predVar

Prediction from models with nearly-singular covariance matrices
fixed

Fixing some parameters
get_ranPars

Operations on lists of parameters
get_inits_from_fit

Initiate a fit from another fit
eval_replicate

Evaluating bootstrap replicates
covStruct

Specifying correlation structures
fitme

Fitting function for fixed- and mixed-effect models with GLM response.
fixedLRT

Likelihood ratio test of fixed effects.
diallel

Random-effect structures for diallel experiments and other dyadic interactions
get_matrix

Extract matrices from a fit
freight

Freight dataset
get_RLRsim_args

Extractors of arguments for functions from package RLRsim
good-practice

Clear and trustworthy formulas and prior weights
is_separated

Checking for (quasi-)separation in binomial-response model.
external-libraries

Installing external libraries
llm.fit

Link-linear regression models (LLMs)
lev2bool

Conversion of factor to 0/1 variable
fitmv

Fitting multivariate responses
get_cPredVar

Estimation of prediction variance with bootstrap correction
multinomial

Analyzing multinomial data
hatvalues.HLfit

Leverage extractor for HLfit objects
how

Extract information about how an object was obtained
mat_sqrt

Computation of “square root” of symmetric positive definite matrix
method

Fitting methods (objective functions maximized)
make_scaled_dist

Scaled distances between unique locations
options

spaMM options settings
numInfo

Information matrix
pedigree

Fit mixed-effects models incorporating pedigrees
mapMM

Colorful plots of predictions in two-dimensional space.
inits

Controlling optimization strategy through initial values
phi-resid.model

Residual dispersion model for gaussian and Gamma response
random-effects

Structure of random effects
mv

Virtual factor for multivariate responses
predict

Prediction from a model fit
predVar

Prediction and response variances
inverse.Gamma

Distribution families for Gamma and inverse Gamma-distributed random effects
negbin1

Alternative negative-binomial family
seaMask

Masks of seas or lands
plot_effects

Partial-dependence effects and plots
negbin

Family function for negative binomial “2” response (including truncated variant).
residVar

Residual variance extractor
seeds

Seed germination data
summary.HLfit

Summary and print methods for fit and test results.
plot.HLfit

Model checking plots for mixed models
spaMM.filled.contour

Level (Contour) Plots with better aspect ratio control (for geographical maps, at least)
setNbThreads

Parallel computations in fits
vcov

Extract covariance or correlation components from a fitted model object
residuals.HLfit

Extract model residuals
spaMM_boot

Parametric bootstrap
simulate.HLfit

Simulate realizations of a fitted model.
verbose

Tracking progress of fits
rankinfo

Checking the rank of the fixed-effects design matrix
Poisson

Family function for GLMs and mixed models with Poisson and zero-truncated Poisson response.
spaMM-conventions

spaMM conventions and differences from related fitting procedures
salamander

Salamander mating data
spaMM-S3

S3 methods of generics defined in other packages
update.HLfit

Updates a fit
welding

Welding data set
wafers

Data from a resistivity experiment for semiconductor materials.
wrap_parallel

Selecting interfaces for parallelisation
scotlip

Lip cancer in Scotland 1975 - 1980
spaMM-internal

Internal spaMM Functions
spaMM

Inference in mixed models, in particular spatial GLMMs
spaMM.colors

A flashy color palette.
register_cF

Declare corrFamily constructor for use in formula
resid.model

Structured dispersion models
post-fit

Applying post-fit procedures on spaMM results
stripHLfit

Reduce the size of fitted objects