Package: spaMM 4.5.0

François Rousset

spaMM: Mixed-Effect Models, with or without Spatial Random Effects

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 <doi:10.1111/ecog.00566>), and Markov random field models on irregular grids (as considered in the 'INLA' package, <https://www.r-inla.org>), 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 <doi:10.1093/biomet/88.4.987>) are also implemented.

Authors:François Rousset [aut, cre, cph], Jean-Baptiste Ferdy [aut, cph], Alexandre Courtiol [aut]

spaMM_4.5.0.tar.gz
spaMM_4.5.0.tar.gz(r-4.5-noble)spaMM_4.5.0.tar.gz(r-4.4-noble)
spaMM_4.5.0.tgz(r-4.4-emscripten)spaMM_4.5.0.tgz(r-4.3-emscripten)
spaMM.pdf |spaMM.html
spaMM/json (API)
NEWS

# Install 'spaMM' in R:
install.packages('spaMM', repos = c('https://cran.r-universe.dev', 'https://cloud.r-project.org'))

Peer review:

Uses libs:
  • gsl– GNU Scientific Library (GSL)
  • c++– GNU Standard C++ Library v3
  • openmp– GCC OpenMP (GOMP) support library
Datasets:
  • Gryphon_A - Gryphon data
  • Gryphon_df - Gryphon data
  • Gryphon_pedigree - Gryphon data
  • Leuca - Leucadendron data
  • Loaloa - Loa loa prevalence in North Cameroon, 1991-2001
  • Nmatrix - Lip cancer in Scotland 1975 - 1980
  • adjlg - Simulated data set for testing sparse-precision code
  • adjlgMat - Simulated data set for testing sparse-precision code
  • arabidopsis - Arabidopsis genetic and climatic data
  • blackcap - Genetic polymorphism in relation to migration in the blackcap
  • clinics - Toy dataset for binomial response
  • freight - Freight dataset
  • landMask - Masks of seas or lands
  • salamander - Salamander mating data
  • scotlip - Lip cancer in Scotland 1975 - 1980
  • seaMask - Masks of seas or lands
  • seeds - Seed germination data
  • small_spde - Interpolated Markov Random Field models
  • wafers - Data from a resistivity experiment for semiconductor materials.
  • welding - Welding data set

This package does not link to any Github/Gitlab/R-forge repository. No issue tracker or development information is available.

5.17 score 5 packages 216 scripts 2.3k downloads 23 mentions 244 exports 25 dependencies

Last updated 6 months agofrom:5266384732. Checks:OK: 1 NOTE: 1. Indexed: no.

TargetResultDate
Doc / VignettesOKNov 07 2024
R-4.5-linux-x86_64NOTENov 07 2024

Exports:.calc_CARdispGammaGLM.calc_dispGammaGLM.crossprod.dispFn.dispInv.evalWrapper.HLfit_body_augZXy.is_spprec_fit.modify_list.NB_shapeFn.NB_shapeInv.nuFn.nuInv.rhoFn.rhoInv.safe_opt.setCluster.solve_IRLS_as_spprec.solve_IRLS_as_ZX.stripOffset.stripRanefs.tcrossprod.unloads4spaMM.wrap_Ltri_t_chol.ZWZtadjacencyAIC.HLfitanova.HLfitanova.LMLTantisymAR1ARMAARpas_LMLTas_precisionBetabeta_respbetabinbinomializeCauchyCauchyCorrCauchyCorr.defaultCauchyCorr.dgCMatrixCauchyCorr.dsCMatrixcoefcoef.corMaterncoef<-coef<-.corMaterncombineparCOMPoissonconfint.HLfitcorFactorcorFactor.corMaterncorMaterncorMatrixcorMatrix.corMaternCorrcorrFamilycorrHLfitcorrHLfit_bodycorrMatrixcorrMM.LRTdef_AUGI0_ZX_spprecdef_sXaug_EigenDense_QRP_Chol_scaleddef_sXaug_Matrix_CHM_H_scaleddef_sXaug_Matrix_QRP_CHM_scaleddev_residsdeviance.HLfitdf.residual.HLfitdialleldim.Kronfactodim.precisiondimnames.bigqdiv_infoDoFdofuturedopardrop1.HLfitdrop1.LMLTeval_replicateextractAIC.HLfitextreme_eigfamily.HLfitfilled.mapMMfitmefitme_bodyfitmvfitmv_bodyfitted.HLfitfitted.HLfitlistfixedLRTfixeffixef.HLfitformula.HLfitget_any_ICget_cPredVarget_fittedParsget_fixefVarget_from_MMEget_from_MME_defaultget_from_MME_default.matrixget_from_MME_default.Matrixget_from_MME.AUGI0_ZX_spprecget_from_MME.defaultget_from_MME.sparseMatrixget_from_MME.sXaug_EigenDense_QRP_Chol_scaledget_from_MME.sXaug_Matrix_CHM_H_scaledget_from_MME.sXaug_Matrix_QRP_CHM_scaledget_HLCorcallget_inits_from_fitget_intervalsget_matrixget_predCov_var_fixget_predVarget_rankinfoget_ranParsget_residVarget_respVarget_RLRsim_argsget_RLRTSim_argsget_ZALMatrixgetCall.HLfitgetCovariategetCovariate.corMaterngetDistMatglm.nodev.fitgridIMRFhatvalues.HLfitHLCorHLCor_bodyHLCor.objHLfitHLfit_bodyHLfit_body_oldHLfit.objhowhow.defaulthow.HLfithow.HLfitlistIMRFInitializeInitialize.corMaterninverse.Gammais_separatedis_separated.formulalev2boolllm.fitlogDetlogDet.corMaternlogLik.HLfitlogLik.HLfitlistLR2R2LRTmake_scaled_distmakeTicksmap_ranefmapMMmat_sqrtMaternMaternCorrMaternCorr.defaultMaternCorr.dgCMatrixMaternCorr.dsCMatrixMaternIMRFamodel.frame.HLfitmodel.matrix.HLfitmodel.matrix.LMLTslotsmodel.offset.HLfitMSFDRmultinegbinnegbin1negbin2niceLabelsnobs.HLfitnumInfoovercatpdep_effectsplot_effectsplot.HLfitPoissonpredict.HLfitPredictorpreprocess_fix_corrprint.arglistprint.bootci4printprint.corr_familyprint.fixedLRTprint.HLfitprint.HLfitlistprint.predictionsprint.predictorprint.ranefprint.singeigsprint.vcov.HLfitprojpathpseudoR2ranefranef.HLfitranGCArecalcrecalc.corMaternregister_cFregularizeremove_from_parlistresiduals.HLfitresidVarresponseSAR_WWtsimulate_ranefsimulate.HLfitsimulate.HLfitlistsimulate4bootspaMM_bootspaMM_GammaspaMM_glmspaMM_glm.fitspaMM.colorsspaMM.filled.contourspaMM.getOptionspaMM.optionsspaMM2bootspaMMplot2Dstr.inla.spde2stripHLfitsummary.fixedLRTsummary.HLfitsummary.HLfitlistt.ZAXlistterms.HLfitTnegbinTpoissonunregister_cFupdate_formulasupdate_respupdate.HLfitVarCorrVarCorr.HLfitVariogramVariogram.corMaternvcov.HLfitweights.HLfitX.antisymX.GCA

Dependencies:abindbackportsbootcheckmatecrayongeometrygmplatticelinproglpSolvemagicMASSMatrixminqanlmenloptrnumDerivpbapplyproxyRcppRcppEigenRcppProgressregistryROIslam

Readme and manuals

Help Manual

Help pageTopics
Simulated data set for testing sparse-precision codeadjlg adjlgMat
Extractors for information criteria such as AICAIC AIC.HLfit extractAIC extractAIC.HLfit get_any_IC
Control of matrix-algebraic methodsalgebra sparse_precision
Arabidopsis genetic and climatic dataarabidopsis
Random effect with AR(p) (autoregressive of order p) or ARMA(p,q) structure.ARMA ARp
Conversion to input for procedures from lmerTest packageas_LMLT class:LMLTslots LMLTslots LMLTslots-class model.matrix.LMLTslots
Fitting autoregressive modelsadjacency AR1 autoregressive CAR
Beta-response family objectbeta_resp
Beta-binomial family objectbetabin
Genetic polymorphism in relation to migration in the blackcapblackcap
Cauchy correlation function and Cauchy formula termCauchy CauchyCorr CauchyCorr.default CauchyCorr.dgCMatrix CauchyCorr.dsCMatrix
Toy dataset for binomial responseclinics
Conway-Maxwell-Poisson (COM-Poisson) GLM familyCOMPoisson geometric
Composite random effectscomposite-ranef
Confidence intervalsconfint confint.HLfit
Control parameters of the HLfit fitting algorithmcontrol.HLfit
Assessing convergence for fitted modelsconvergence
Matern Correlation Structure as a corSpatial objectcoef.corMatern coef<-.corMatern corFactor.corMatern corMatern corMatrix.corMatern getCovariate.corMatern Initialize.corMatern logDet.corMatern recalc.corMatern Variogram.corMatern
'corr_family' objectscorr_family print.corr_family SAR_WWt
Using corrFamily constructors and descriptors.corrFamily
corrFamily definitioncorrFamily-definition
Designing new corrFamily descriptors for parametric correlation familiescorrFamily-design
Fits a mixed model, typically a spatial GLMM.corrHLfit
Using a corrMatrix argumentcorrMatrix
Specifying correlation structuresas_precision covStruct Predictor
Random-effect structures for diallel experiments and other dyadic interactionsantisym diallel ranGCA
Information about numerical problemsdiagnose_conv div_info
Degrees of freedom extractorDoF
Interface for parallel computationsdofuture
Interface for parallel computationscombinepar dopar
Drop all possible single fixed-effect terms from a modeldrop1 drop1.HLfit drop1.LMLT
Evaluating bootstrap replicates.eval_replicate2 eval_replicate
Installing external librariesexternal-libraries
Functions to extract various components of a fit.deviance deviance.HLfit dev_resids df.residual df.residual.HLfit extractors family family.HLfit fitted fitted.HLfit fixef fixef.HLfit formula formula.HLfit getDistMat logLik logLik.HLfit model.frame.HLfit model.matrix.HLfit nobs nobs.HLfit print.ranef ranef ranef.HLfit response terms terms.HLfit weights weights.HLfit
Utilities for regularization of a matrixextreme_eig regularize
Fitting function for fixed- and mixed-effect models with GLM response.fitme
Fitting multivariate responsesfitmv X2X
Prediction from models with nearly-singular covariance matricesfix_predVar
Fixing some parameterscorrPars etaFix fixed keepInREML ranCoefs ranFix ranPars
Likelihood ratio test of fixed effects.fixedLRT
Freight datasetfreight
Estimation of prediction variance with bootstrap correctionget_cPredVar
Initiate a fit from another fitget_inits_from_fit
Extract matrices from a fitget_matrix get_ZALMatrix
Operations on lists of parametersget_fittedPars get_ranPars remove_from_parlist
Extractors of arguments for functions from package RLRsimget_RLRsim_args get_RLRTSim_args
Clear and trustworthy formulas and prior weightsformula_env good-practice
Gryphon dataGryphon Gryphon_A Gryphon_df Gryphon_pedigree
Leverage extractor for HLfit objectshatvalues hatvalues.HLfit
Fits a (spatially) correlated mixed model, for given correlation parametersHLCor
Fit mixed models with given correlation matrixBeta Beta-distribution-random-effects HLfit prior.weights REMLformula
Extract information about how an object was obtainedhow how.default how.HLfit how.HLfitlist
Controlling optimization strategy through initial valuesinits
Distribution families for Gamma and inverse Gamma-distributed random effectsGamma inverse.Gamma
Checking for (quasi-)separation in binomial-response model.is_separated is_separated.formula separation
Leucadendron dataLeuca
Conversion of factor to 0/1 variablelev2bool
Link-linear regression models (LLMs)LL-family llm.fit
Loa loa prevalence in North Cameroon, 1991-2001Loaloa
ANOVA tables, and likelihood ratio tests of fixed and random effects.anova anova.HLfit anova.LMLT LRT
Scaled distances between unique locationsEarth EarthChord make_scaled_dist rho.mapping
Colorful plots of predictions in two-dimensional space.filled.mapMM mapMM map_ranef spaMMplot2D
Computation of "square root" of symmetric positive definite matrixmat_sqrt
Matern correlation function and Matern formula term.Matern MaternCorr MaternCorr.default MaternCorr.dgCMatrix MaternCorr.dsCMatrix
corrFamily constructor for Interpolated Markov Random Field (IMRF) covariance structure approximating a 2D Matern correlation model.MaternIMRFa
Fitting methods (objective functions maximized)method obsInfo
Multiple-Stage False Discovery Rate procedureMSFDR
Interpolated Markov Random Field modelshyper IMRF inla.spde2.matern inla.spde2.pcmatern multIMRF small_spde str.inla.spde2
Analyzing multinomial databinomialize fitted.HLfitlist logLik.HLfitlist multi multinomial
Virtual factor for multivariate responsesmv
Family function for negative binomial "2" response (including truncated variant).negbin negbin2 Tnegbin
Alternative negative-binomial familynegbin1
Information matrixnumInfo print.singeigs
spaMM options settingsbarstyle LevenbergM spaMM.getOption spaMM.options
Fit mixed-effects models incorporating pedigreespedigree
Residual dispersion model for gaussian and Gamma responsephi-resid.model
Partial-dependence effects and plotspdep_effects plot_effects
Model checking plots for mixed modelsplot plot.HLfit `DHARMa-on-HLfit`
Family function for GLMs and mixed models with Poisson and zero-truncated Poisson response.Poisson Tpoisson
Applying post-fit procedures on spaMM resultsDHARMa glht lmerTest multcomp post-fit RLRsim
Prediction from a model fitget_fixefVar get_intervals get_predCov_var_fix get_predVar get_residVar get_respVar intervals predict predict.HLfit preprocess_fix_corr
Prediction and response variancespredVar
Pseudo R-squaredLR2R2 pseudoR2
Structure of random effectsrandom-effects
Checking the rank of the fixed-effects design matrixget_rankinfo rankinfo
Declare corrFamily constructor for use in formularegister_cF unregister_cF
Structured dispersion modelsresid.model
Extract model residualsresiduals residuals.HLfit
Residual variance extractorresidVar
Salamander mating datasalamander
Lip cancer in Scotland 1975 - 1980Nmatrix scotlip
Masks of seas or landslandMask oceanmask seaMask worldcountries
Seed germination dataseeds
Parallel computations in fitssetNbThreads
Simulate realizations of a fitted model.simulate simulate.HLfit simulate.HLfitlist simulate4boot simulate_ranef
Inference in mixed models, in particular spatial GLMMsspaMM-package spaMM
Parametric bootstrapspaMM2boot spaMM_boot
Fitting generalized linear models without initial-value or divergence headachesspaMM_glm spaMM_glm.fit
spaMM conventions and differences from related fitting proceduresspaMM-conventions
A flashy color palette.spaMM.colors
Level (Contour) Plots with better aspect ratio control (for geographical maps, at least)spaMM.filled.contour
Reduce the size of fitted objectsstripHLfit
Summary and print methods for fit and test results.print print.fixedLRT print.HLfit print.HLfitlist summary summary.fixedLRT summary.HLfit summary.HLfitlist
Updates a fitrefit respName update.formula update.HLfit update_formulas update_resp
Extract covariance or correlation components from a fitted model objectbeta_table Corr VarCorr VarCorr.HLfit vcov vcov.HLfit
Tracking progress of fitsverbose
Data from a resistivity experiment for semiconductor materials.wafers
Welding data setwelding
Example of yield stability analysisGxE WinterWheat
Selecting interfaces for parallelisationwrap_parallel
Fixed-effect terms for dyadic interactionsX.antisym X.GCA
S4 classes for structured matrices%*%,Kronfacto,numeric-method %*%,numeric,ZAXlist-method %*%,ZAXlist,Matrix-method %*%,ZAXlist,matrix-method %*%,ZAXlist,numeric-method %*%-methods class:Kronfacto class:missingOrNULL class:ZAXlist crossprod,Kronfacto,Matrix-method crossprod,Kronfacto,matrix-method crossprod,Kronfacto,numeric-method crossprod,ZAXlist,Matrix-method crossprod,ZAXlist,matrix-method crossprod,ZAXlist,numeric-method crossprod-methods dim.Kronfacto Kronfacto Kronfacto-class missingOrNULL missingOrNULL-class t.ZAXlist tcrossprod,ZAXlist,missingOrNULL-method tcrossprod-methods ZAXlist ZAXlist-class