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 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

4,080

Version

4.2.0.1

License

GPL (>= 2)

Maintainer

Giovanny Covarrubias-Pazaran

Last Published

January 8th, 2023

Functions in sommer (4.2.0.1)

AR1

Autocorrelation matrix of order 1.
ARMA

Autocorrelation Moving average.
D.mat

Dominance relationship matrix
AI

Average Information Algorithm
DT_btdata

Blue Tit Data for a Quantitative Genetic Experiment
DT_cornhybrids

Corn crosses and markers
DT_cpdata

Genotypic and Phenotypic data for a CP population
CS

Compound symmetry matrix
A.mat

Additive relationship matrix
DT_augment

DT_augment design example.
DT_expdesigns

Data for different experimental designs
DT_h2

Broad sense heritability calculation.
DT_halfdiallel

half diallel data for corn hybrids
DT_example

Broad sense heritability calculation.
DT_mohring

Full diallel data for corn hybrids
DT_gryphon

Gryphon data from the Journal of Animal Ecology
DT_polyploid

Genotypic and Phenotypic data for a potato polyploid population
DT_fulldiallel

Full diallel data for corn hybrids
DT_ige

Data to fit indirect genetic effects.
DT_legendre

Simulated data for random regression
EM

Expectation Maximization Algorithm
GWAS

Genome wide association study analysis
DT_yatesoats

Yield of oats in a split-block experiment
MEMMA

Multivariate Efficient Mixed Model Association Algorithm
adiag1

Binds arrays corner-to-corner
atr

atr covariance structure
E.mat

Epistatic relationship matrix
atcg1234

Letter to number converter
H.mat

Combined relationship matrix H
atc

atc covariance structure
add.diallel.vars

add.diallel.vars
anova.mmec

anova form a GLMM fitted with mmec
DT_wheat

wheat lines dataset
anova.mmer

anova form a GLMM fitted with mmer
DT_technow

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

Calculation of linkage disequilibrium decay
bbasis

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

Generate a sequence of colors for plotting bathymetric data.
bivariateRun

bivariateRun functionality
build.HMM

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

diagonal covariance structure
csr

customized covariance structure
csc

customized covariance structure
DT_rice

Rice lines dataset
coef.mmer

coef form a GLMM fitted with mmer
coef.mmec

coef form a GLMM fitted with mmec
DT_sleepstudy

Reaction times in a sleep deprivation study
dfToMatrix

data frame to matrix
leg

Legendre polynomial matrix
dsc

diagonal covariance structure
gvsr

general variance structure specification
jet.colors

Generate a sequence of colors alog the jet colormap.
fixm

fixed indication matrix
fitted.mmec

fitted form a LMM fitted with mmec
fcm

fixed effect constraint indication matrix
fitted.mmer

fitted form a LMM fitted with mmer
imputev

Imputing a numeric or character vector
isc

identity covariance structure
list2usmat

list or vector to unstructured matrix
manhattan

Creating a manhattan plot
predict.mmer

Predict form of a LMM fitted with mmer
randef

extracting random effects
map.plot

Creating a genetic map plot
overlay

Overlay Matrix
mmec

mixed model equations for c coefficients
plot.mmer

plot form a LMM plot with mmer
mmer

mixed model equations for r records
predict.mmec

Predict form of a LMM fitted with mmec
plot.mmec

plot form a LMM plot with mmec
pmonitor

plot the change of VC across iterations
simGECorMat

Create a GE correlation matrix for simulation purposes.
sommer-package

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

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

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

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

Get Tensor Product Spline Mixed Model Incidence Matrices
summary.mmec

summary form a GLMM fitted with mmec
residuals.mmer

Residuals form a GLMM fitted with mmer
residuals.mmec

Residuals form a GLMM fitted with mmec
summary.mmer

summary form a GLMM fitted with mmer
usc

unstructured covariance structure
transp

Creating color with transparency
vsr

variance structure specification
vpredict

vpredict form of a LMM fitted with mmer
tpsmmbwrapper

Get Tensor Product Spline Mixed Model Incidence Matrices
transformConstraints

transformConstraints
unsm

unstructured indication matrix
usr

unstructured covariance structure
vs

variance structure specification
vsc

variance structure specification
wald.test

Wald Test for Model Coefficients