Learn R Programming

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

6,187

Version

4.3.6

License

GPL (>= 2)

Issues

Pull Requests

Stars

Forks

Last Published

October 20th, 2024

Functions in sommer (4.3.6)

DT_fulldiallel

Full diallel data for corn hybrids
DT_gryphon

Gryphon data from the Journal of Animal Ecology
DT_ige

Data to fit indirect genetic effects.
DT_legendre

Simulated data for random regression
DT_expdesigns

Data for different experimental designs
E.mat

Epistatic relationship matrix
DT_sleepstudy

Reaction times in a sleep deprivation study
GWAS

Genome wide association study analysis
DT_yatesoats

Yield of oats in a split-block experiment
H

Two-way id by features table
MEMMA

Multivariate Efficient Mixed Model Association Algorithm
EM

Expectation Maximization Algorithm
DT_rice

Rice lines dataset
DT_wheat

wheat lines dataset
DT_technow

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

add.diallel.vars
H.mat

Combined relationship matrix H
atc

atc covariance structure
atcg1234

Letter to number converter
atcg1234BackTransform

Letter to number converter
anova.mmec

anova form a GLMM fitted with mmec
adiag1

Binds arrays corner-to-corner
LD.decay

Calculation of linkage disequilibrium decay
atr

atr covariance structure
bathy.colors

Generate a sequence of colors for plotting bathymetric data.
csc

customized covariance structure
corImputation

Imputing a matrix using correlations
anova.mmer

anova form a GLMM fitted with mmer
build.HMM

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

bivariateRun functionality
bbasis

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

fixed indication matrix
gvsr

general variance structure specification
coef.mmec

coef form a GLMM fitted with mmec
dfToMatrix

data frame to matrix
coef.mmer

coef form a GLMM fitted with mmer
fcm

fixed effect constraint indication matrix
dsr

diagonal covariance structure
csr

customized covariance structure
imputev

Imputing a numeric or character vector
isc

identity covariance structure
dsc

diagonal covariance structure
fitted.mmec

fitted form a LMM fitted with mmec
covc

covariance between random effects
fitted.mmer

fitted form a LMM fitted with mmer
neMarker

Effective population size based on marker matrix
leg

Legendre polynomial matrix
map.plot

Creating a genetic map plot
list2usmat

list or vector to unstructured matrix
jet.colors

Generate a sequence of colors alog the jet colormap.
manhattan

Creating a manhattan plot
logspace

Decreasing logarithmic trend
mmec

mixed model equations for c coefficients
mmer

mixed model equations for r records
predict.mmer

Predict form of a LMM fitted with mmer
propMissing

Proportion of missing data
pmonitor

plot the change of VC across iterations
plot.mmec

plot form a LMM plot with mmec
r2

Reliability
randef

extracting random effects
residuals.mmec

Residuals form a GLMM fitted with mmec
overlay

Overlay Matrix
redmm

Reduced Model Matrix
plot.mmer

plot form a LMM plot with mmer
predict.mmec

Predict form of a LMM fitted with mmec
stackTrait

Stacking traits in a dataset
spl2Dc

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

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

Create a GE correlation matrix for simulation purposes.
spl2Db

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

reduced rank covariance structure
residuals.mmer

Residuals form a GLMM fitted with mmer
sommer-package

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

Get Tensor Product Spline Mixed Model Incidence Matrices
usc

unstructured covariance structure
summary.mmer

summary form a GLMM fitted with mmer
summary.mmec

summary form a GLMM fitted with mmec
vpredict

vpredict form of a LMM fitted with mmer
tpsmmbwrapper

Get Tensor Product Spline Mixed Model Incidence Matrices
transformConstraints

transformConstraints
vs

variance structure specification
unsm

unstructured indication matrix
transp

Creating color with transparency
vsc

variance structure specification
vsr

variance structure specification
wald.test

Wald Test for Model Coefficients
tps

Get Tensor Product Spline Mixed Model Incidence Matrices
usr

unstructured covariance structure
AR1

Autocorrelation matrix of order 1.
CS

Compound symmetry matrix
A.mat

Additive relationship matrix
D.mat

Dominance relationship matrix
DT_augment

DT_augment design example.
ARMA

Autocorrelation Moving average.
AI

Average Information Algorithm
DT_example

Broad sense heritability calculation.
DT_cpdata

Genotypic and Phenotypic data for a CP population
DT_h2

Broad sense heritability calculation.
DT_btdata

Blue Tit Data for a Quantitative Genetic Experiment
DT_cornhybrids

Corn crosses and markers
DT_polyploid

Genotypic and Phenotypic data for a potato polyploid population
DT_mohring

Full diallel data for corn hybrids
DT_halfdiallel

half diallel data for corn hybrids