Learn R Programming

⚠️There's a newer version (4.4.1) 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')

Vignettes

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
  • factor analytic structure
  • 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,275

Version

4.3.4

License

GPL (>= 2)

Maintainer

Giovanny Covarrubias-Pazaran

Last Published

March 17th, 2024

Functions in sommer (4.3.4)

DT_h2

Broad sense heritability calculation.
DT_btdata

Blue Tit Data for a Quantitative Genetic Experiment
DT_halfdiallel

half diallel data for corn hybrids
DT_ige

Data to fit indirect genetic effects.
DT_mohring

Full diallel data for corn hybrids
MEMMA

Multivariate Efficient Mixed Model Association Algorithm
EM

Expectation Maximization Algorithm
DT_polyploid

Genotypic and Phenotypic data for a potato polyploid population
DT_yatesoats

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

Epistatic relationship matrix
DT_sleepstudy

Reaction times in a sleep deprivation study
DT_rice

Rice lines dataset
adiag1

Binds arrays corner-to-corner
anova.mmec

anova form a GLMM fitted with mmec
DT_legendre

Simulated data for random regression
atc

atc covariance structure
anova.mmer

anova form a GLMM fitted with mmer
GWAS

Genome wide association study analysis
H.mat

Combined relationship matrix H
DT_technow

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

Build a hybrid marker matrix using parental genotypes from inbred individuals
coef.mmec

coef form a GLMM fitted with mmec
DT_wheat

wheat lines dataset
LD.decay

Calculation of linkage disequilibrium decay
add.diallel.vars

add.diallel.vars
bivariateRun

bivariateRun functionality
bbasis

Function for creating B-spline basis functions (Eilers & Marx, 2010)
gvsr

general variance structure specification
dfToMatrix

data frame to matrix
csr

customized covariance structure
imputev

Imputing a numeric or character vector
isc

identity covariance structure
jet.colors

Generate a sequence of colors alog the jet colormap.
logspace

Decreasing logarithmic trend
manhattan

Creating a manhattan plot
map.plot

Creating a genetic map plot
overlay

Overlay Matrix
fcm

fixed effect constraint indication matrix
mmec

mixed model equations for c coefficients
pmonitor

plot the change of VC across iterations
fitted.mmec

fitted form a LMM fitted with mmec
dsc

diagonal covariance structure
plot.mmec

plot form a LMM plot with mmec
predict.mmec

Predict form of a LMM fitted with mmec
dsr

diagonal covariance structure
residuals.mmec

Residuals form a GLMM fitted with mmec
residuals.mmer

Residuals form a GLMM fitted with mmer
predict.mmer

Predict form of a LMM fitted with mmer
atr

atr covariance structure
bathy.colors

Generate a sequence of colors for plotting bathymetric data.
coef.mmer

coef form a GLMM fitted with mmer
spl2Da

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

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

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

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

plot form a LMM plot with mmer
corImputation

Imputing a matrix using correlations
fixm

fixed indication matrix
atcg1234

Letter to number converter
fitted.mmer

fitted form a LMM fitted with mmer
mmer

mixed model equations for r records
simGECorMat

Create a GE correlation matrix for simulation purposes.
rrc

reduced rank covariance structure
r2

Reliability
neMarker

Effective population size based on marker matrix
propMissing

Proportion of missing data
vsc

variance structure specification
vsr

variance structure specification
atcg1234BackTransform

Letter to number converter
usr

unstructured covariance structure
usc

unstructured covariance structure
covc

covariance between random effects
wald.test

Wald Test for Model Coefficients
leg

Legendre polynomial matrix
csc

customized covariance structure
list2usmat

list or vector to unstructured matrix
randef

extracting random effects
redmm

Reduced Model Matrix
stackTrait

Stacking traits in a dataset
transformConstraints

transformConstraints
tpsmmbwrapper

Get Tensor Product Spline Mixed Model Incidence Matrices
spl2Dmats

Get Tensor Product Spline Mixed Model Incidence Matrices
transp

Creating color with transparency
unsm

unstructured indication matrix
summary.mmec

summary form a GLMM fitted with mmec
summary.mmer

summary form a GLMM fitted with mmer
vs

variance structure specification
vpredict

vpredict form of a LMM fitted with mmer
DT_augment

DT_augment design example.
A.mat

Additive relationship matrix
AR1

Autocorrelation matrix of order 1.
AI

Average Information Algorithm
ARMA

Autocorrelation Moving average.
CS

Compound symmetry matrix
D.mat

Dominance relationship matrix
DT_cpdata

Genotypic and Phenotypic data for a CP population
DT_cornhybrids

Corn crosses and markers
DT_example

Broad sense heritability calculation.
DT_gryphon

Gryphon data from the Journal of Animal Ecology
DT_fulldiallel

Full diallel data for corn hybrids
DT_expdesigns

Data for different experimental designs