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

Version

4.1.7

License

GPL (>= 2)

Maintainer

Giovanny Covarrubias-Pazaran

Last Published

June 16th, 2022

Functions in sommer (4.1.7)

DT_augment

DT_augment design example.
D.mat

Dominance relationship matrix
DT_cpdata

Genotypic and Phenotypic data for a CP population
AR1

Autocorrelation matrix of order 1.
CS

Compound symmetry matrix
A.mat

Additive relationship matrix
ARMA

Autocorrelation Moving average.
AI

Average Information Algorithm
DT_cornhybrids

Corn crosses and markers
DT_btdata

Blue Tit Data for a Quantitative Genetic Experiment
DT_h2

Broad sense heritability calculation.
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_ige

Data to fit indirect genetic effects.
DT_legendre

Simulated data for random regression
DT_expdesigns

Data for different experimental designs
DT_halfdiallel

half diallel data for corn hybrids
DT_polyploid

Genotypic and Phenotypic data for a potato polyploid population
DT_mohring

Full diallel data for corn hybrids
DT_technow

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

Rice lines dataset
DT_sleepstudy

Reaction times in a sleep deprivation study
DT_wheat

wheat lines dataset
H.mat

Combined relationship matrix H
GWAS

Genome wide association study analysis
MEMMA

Multivariate Efficient Mixed Model Association Algorithm
EM

Expectation Maximization Algorithm
bathy.colors

Generate a sequence of colors for plotting bathymetric data.
atcg1234

Letter to number converter
atr

atr covariance structure
DT_yatesoats

Yield of oats in a split-block experiment
dsc

diagonal covariance structure
dfToMatrix

data frame to matrix
adiag1

Binds arrays corner-to-corner
anova.mmec

anova form a GLMM fitted with mmec
dsr

diagonal covariance structure
jet.colors

Generate a sequence of colors alog the jet colormap.
anova.mmer

anova form a GLMM fitted with mmer
E.mat

Epistatic relationship matrix
atc

atc covariance structure
fcm

fixed effect constraint indication matrix
leg

Legendre polynomial matrix
coef.mmec

coef form a GLMM fitted with mmec
add.diallel.vars

add.diallel.vars
LD.decay

Calculation of linkage disequilibrium decay
coef.mmer

coef form a GLMM fitted with mmer
isc

identity covariance structure
imputev

Imputing a numeric or character vector
list2usmat

list or vector to unstructured matrix
manhattan

Creating a manhattan plot
mmer

mixed model equations for r records
overlay

Overlay Matrix
map.plot

Creating a genetic map plot
mmec

mixed model equations for c coefficients
csc

customized covariance structure
fitted.mmec

fitted form a LMM fitted with mmec
csr

customized covariance structure
bbasis

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

Predict form of a LMM fitted with mmer
fitted.mmer

fitted form a LMM fitted with mmer
randef

extracting random effects
pmonitor

plot the change of VC across iterations
plot.mmec

plot form a LMM plot with mmec
build.HMM

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

bivariateRun functionality
fixm

fixed indication matrix
plot.mmer

plot form a LMM plot with mmer
gvsr

general variance structure specification
predict.mmec

Predict form of a LMM fitted with mmec
spl2Dmats

Get Tensor Product Spline Mixed Model Incidence Matrices
spl2Dc

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

Residuals form a GLMM fitted with mmec
residuals.mmer

Residuals form a GLMM fitted with mmer
summary.mmer

summary form a GLMM fitted with mmer
summary.mmec

summary form a GLMM fitted with mmec
spl2Da

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

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

unstructured covariance structure
simGECorMat

Create a GE correlation matrix for simulation purposes.
transp

Creating color with transparency
tpsmmbwrapper

Get Tensor Product Spline Mixed Model Incidence Matrices
sommer-package

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

unstructured covariance structure
unsm

unstructured indication matrix
vsr

variance structure specification
vsc

variance structure specification
wald.test

Wald Test for Model Coefficients
transformConstraints

transformConstraints
vs

variance structure specification
vpredict

vpredict form of a LMM fitted with mmer