Learn R Programming

sommer: Solving Mixed Model Equations in R

Structural multivariate-univariate linear mixed model solver for estimation of multiple random effects with unknown variance-covariance structures (e.g., heterogeneous and unstructured) and known covariance among levels of random effects (e.g., pedigree and genomic relationship matrices) (Covarrubias-Pazaran, 2016; Maier et al., 2015; Jensen et al., 1997). REML estimates can be obtained using the Direct-Inversion Newton-Raphson and Direct-Inversion Average Information algorithms for the problems r x r (r being the number of records) or using the Henderson-based average information algorithm for the problem c x c (c being the number of coefficients to estimate). Spatial models can also be fitted using the two-dimensional spline functionality available.

Installation

You can install the development version of sommer from GitHub:

devtools::install_github('covaruber/sommer')

Development

The sommer package is under active development. If you are an expert in mixed models, statistics or programming and you know how to implement of the following:

  • the minimum degree ordering algorithm
  • the symbolic cholesky factorization
  • automatic differentiation
  • generalized linear models

please help us to take sommer to the next level. Drop me an email or push some changes through github :)

Copy Link

Version

Install

install.packages('sommer')

Monthly Downloads

5,230

Version

4.4.7

License

GPL (>= 2)

Issues

Pull Requests

Stars

Forks

Maintainer

Giovanny Covarrubias-Pazaran

Last Published

September 11th, 2026

Functions in sommer (4.4.7)

dsm

diagonal covariance structure
atm

atm covariance structure
covm

covariance between random effects
coef.mmes

coef form a GLMM fitted with mmes
MNR

Multivariate Newton-Raphson algorithm
H.mat

Combined relationship matrix H
corImputation

Imputing a matrix using correlations
dfToMatrix

data frame to matrix
anova.mmes

anova form a GLMM fitted with mmes
csm

customized covariance structure
fixm

fixed indication matrix
plot.mmes

plot form a LMM plot with mmes
r2

Reliability
randef

extracting random effects
mmer

mixed model equations for r records
mmes

mixed model equations solver
ism

identity covariance structure
pmonitor

plot the change of VC across iterations
fitted.mmes

fitted form a LMM fitted with mmes
predict.mmes

Predict form of a LMM fitted with mmes
residuals.mmes

Residuals form a GLMM fitted with mmes
tpsmmbwrapper

Get Tensor Product Spline Mixed Model Incidence Matrices
usm

unstructured covariance structure
spl2Dmats

Get Tensor Product Spline Mixed Model Incidence Matrices
spl2Dc

Two-dimensional penalised tensor-product of marginal B-Spline basis.
unsm

unstructured indication matrix
vsm

variance structure specification
summary.mmes

summary form a GLMM fitted with mmes
vpredict

vpredict form of a LMM fitted with mmes
sommer-package

Solving Mixed Model Equations in R
Figure: mai.png
AR1

Autocorrelation matrix of order 1.
GWAS

Genome wide association study analysis
E.mat

Epistatic relationship matrix
vsr

variance structure specification
D.mat

Dominance relationship matrix
CS

Compound symmetry matrix
ARMA

Autocorrelation Moving average.
A.mat

Additive relationship matrix
summary.mmer

summary form a GLMM fitted with mmer
vs

variance structure specification