Learn R Programming

⚠️There's a newer version (4.4.4) 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 and unknown variance-covariance structures (i.e. heterogeneous and unstructured variance models) (Covarrubias-Pazaran, 2016; Maier et al., 2015). REML estimates can be obtained using the Direct-Inversion Newton-Raphson and Direct-Inversion Average Information algorithms. Designed for genomic prediction and genome wide association studies (GWAS), particularly focused in the p > n problem (more coefficients than observations) and dense known covariance structures for levels of random effects. Spatial models can also be fitted using i.e. the two-dimensional spline functionality available in sommer.

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

5,517

Version

4.3.3

License

GPL (>= 2)

Maintainer

Giovanny Covarrubias-Pazaran

Last Published

November 13th, 2023

Functions in sommer (4.3.3)

DT_rice

Rice lines dataset
DT_technow

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

Reaction times in a sleep deprivation study
DT_gryphon

Gryphon data from the Journal of Animal Ecology
anova.mmec

anova form a GLMM fitted with mmec
atcg1234

Letter to number converter
EM

Expectation Maximization Algorithm
atc

atc covariance structure
H.mat

Combined relationship matrix H
dfToMatrix

data frame to matrix
bbasis

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

Generate a sequence of colors for plotting bathymetric data.
add.diallel.vars

add.diallel.vars
LD.decay

Calculation of linkage disequilibrium decay
GWAS

Genome wide association study analysis
MEMMA

Multivariate Efficient Mixed Model Association Algorithm
atr

atr covariance structure
adiag1

Binds arrays corner-to-corner
anova.mmer

anova form a GLMM fitted with mmer
corImputation

Imputing a matrix using correlations
E.mat

Epistatic relationship matrix
DT_yatesoats

Yield of oats in a split-block experiment
dsc

diagonal covariance structure
dsr

diagonal covariance structure
coef.mmec

coef form a GLMM fitted with mmec
csr

customized covariance structure
csc

customized covariance structure
DT_wheat

wheat lines dataset
fcm

fixed effect constraint indication matrix
fitted.mmer

fitted form a LMM fitted with mmer
fitted.mmec

fitted form a LMM fitted with mmec
isc

identity covariance structure
covc

covariance between random effects
imputev

Imputing a numeric or character vector
pmonitor

plot the change of VC across iterations
coef.mmer

coef form a GLMM fitted with mmer
plot.mmec

plot form a LMM plot with mmec
gvsr

general variance structure specification
mmec

mixed model equations for c coefficients
fixm

fixed indication matrix
mmer

mixed model equations for r records
map.plot

Creating a genetic map plot
manhattan

Creating a manhattan plot
simGECorMat

Create a GE correlation matrix for simulation purposes.
r2

Reliability
predict.mmer

Predict form of a LMM fitted with mmer
rrc

reduced rank covariance structure
neMarker

Effective population size based on marker matrix
randef

extracting random effects
bivariateRun

bivariateRun functionality
leg

Legendre polynomial matrix
residuals.mmer

Residuals form a GLMM fitted with mmer
redmm

Reduced Model Matrix
jet.colors

Generate a sequence of colors alog the jet colormap.
build.HMM

Build a hybrid marker matrix using parental genotypes from inbred individuals
overlay

Overlay Matrix
residuals.mmec

Residuals form a GLMM fitted with mmec
logspace

Decreasing logarithmic trend
spl2Dmats

Get Tensor Product Spline Mixed Model Incidence Matrices
list2usmat

list or vector to unstructured matrix
predict.mmec

Predict form of a LMM fitted with mmec
sommer-package

Solving Mixed Model Equations in R
Figure: mai.png
plot.mmer

plot form a LMM plot with mmer
tpsmmbwrapper

Get Tensor Product Spline Mixed Model Incidence Matrices
spl2Da

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

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

summary form a GLMM fitted with mmec
summary.mmer

summary form a GLMM fitted with mmer
stackTrait

Stacking traits in a dataset
vs

variance structure specification
vpredict

vpredict form of a LMM fitted with mmer
spl2Dc

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

unstructured covariance structure
wald.test

Wald Test for Model Coefficients
usr

unstructured covariance structure
unsm

unstructured indication matrix
transp

Creating color with transparency
transformConstraints

transformConstraints
vsr

variance structure specification
vsc

variance structure specification
AR1

Autocorrelation matrix of order 1.
A.mat

Additive relationship matrix
DT_btdata

Blue Tit Data for a Quantitative Genetic Experiment
D.mat

Dominance relationship matrix
AI

Average Information Algorithm
ARMA

Autocorrelation Moving average.
CS

Compound symmetry matrix
DT_h2

Broad sense heritability calculation.
DT_ige

Data to fit indirect genetic effects.
DT_augment

DT_augment design example.
DT_polyploid

Genotypic and Phenotypic data for a potato polyploid population
DT_expdesigns

Data for different experimental designs
DT_cpdata

Genotypic and Phenotypic data for a CP population
DT_legendre

Simulated data for random regression
DT_cornhybrids

Corn crosses and markers
DT_fulldiallel

Full diallel data for corn hybrids
DT_example

Broad sense heritability calculation.
DT_halfdiallel

half diallel data for corn hybrids
DT_mohring

Full diallel data for corn hybrids