Learn R Programming

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

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

4,314

Version

4.4.2

License

GPL (>= 2)

Issues

Pull Requests

Stars

Forks

Maintainer

Giovanny Covarrubias-Pazaran

Last Published

May 26th, 2025

Functions in sommer (4.4.2)

summary.mmer

summary form a GLMM fitted with mmer
GWAS

Genome wide association study analysis
vs

variance structure specification
D.mat

Dominance relationship matrix
CS

Compound symmetry matrix
DT_halfdiallel

half diallel data for corn hybrids
DT_example

Broad sense heritability calculation.
DT_fulldiallel

Full diallel data for corn hybrids
DT_gryphon

Gryphon data from the Journal of Animal Ecology
DT_cornhybrids

Corn crosses and markers
DT_cpdata

Genotypic and Phenotypic data for a CP population
DT_btdata

Blue Tit Data for a Quantitative Genetic Experiment
DT_h2

Broad sense heritability calculation.
DT_expdesigns

Data for different experimental designs
DT_augment

DT_augment design example.
DT_technow

Genotypic and Phenotypic data from single cross hybrids (Technow et al.,2014)
DT_legendre

Simulated data for random regression
DT_ige

Data to fit indirect genetic effects.
DT_rice

Rice lines dataset
DT_mohring

Full diallel data for corn hybrids
DT_sleepstudy

Reaction times in a sleep deprivation study
DT_wheat

wheat lines dataset
anova.mmes

anova form a GLMM fitted with mmes
DT_yatesoats

Yield of oats in a split-block experiment
E.mat

Epistatic relationship matrix
atm

atm covariance structure
atcg1234

Letter to number converter
atcg1234BackTransform

Letter to number converter
bbasis

Function for creating B-spline basis functions (Eilers & Marx, 2010)
bathy.colors

Generate a sequence of colors for plotting bathymetric data.
adiag1

Binds arrays corner-to-corner
add.diallel.vars

add.diallel.vars
DT_polyploid

Genotypic and Phenotypic data for a potato polyploid population
LD.decay

Calculation of linkage disequilibrium decay
H.mat

Combined relationship matrix H
dsm

diagonal covariance structure
csm

customized covariance structure
covm

covariance between random effects
corImputation

Imputing a matrix using correlations
dfToMatrix

data frame to matrix
coef.mmes

coef form a GLMM fitted with mmes
build.HMM

Build a hybrid marker matrix using parental genotypes from inbred individuals
fitted.mmes

fitted form a LMM fitted with mmes
overlay

Overlay Matrix
fixm

fixed indication matrix
imputev

Imputing a numeric or character vector
jet.colors

Generate a sequence of colors alog the jet colormap.
map.plot

Creating a genetic map plot
ism

identity covariance structure
manhattan

Creating a manhattan plot
neMarker

Effective population size based on marker matrix
mmes

mixed model equations solver
pmonitor

plot the change of VC across iterations
logspace

Decreasing logarithmic trend
leg

Legendre polynomial matrix
plot.mmes

plot form a LMM plot with mmes
propMissing

Proportion of missing data
predict.mmes

Predict form of a LMM fitted with mmes
r2

Reliability
randef

extracting random effects
redmm

Reduced Model Matrix
residuals.mmes

Residuals form a GLMM fitted with mmes
rrm

reduced rank covariance structure
simGECorMat

Create a GE correlation matrix for simulation purposes.
stackTrait

Stacking traits in a dataset
stan

Standardize a vector of values in range 0 to 1
sommer-package

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

unstructured indication matrix
usm

unstructured covariance structure
spl2Dmats

Get Tensor Product Spline Mixed Model Incidence Matrices
wald.test

Wald Test for Model Coefficients
spl2Dc

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

variance structure specification
vpredict

vpredict form of a LMM fitted with mmes
tpsmmbwrapper

Get Tensor Product Spline Mixed Model Incidence Matrices
transp

Creating color with transparency
summary.mmes

summary form a GLMM fitted with mmes
tps

Get Tensor Product Spline Mixed Model Incidence Matrices
A.mat

Additive relationship matrix
mmer

mixed model equations for r records
vsr

variance structure specification
ARMA

Autocorrelation Moving average.
AR1

Autocorrelation matrix of order 1.