Learn R Programming

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

6,187

Version

4.3.5

License

GPL (>= 2)

Issues

Pull Requests

Stars

Forks

Last Published

July 31st, 2024

Functions in sommer (4.3.5)

DT_fulldiallel

Full diallel data for corn hybrids
DT_expdesigns

Data for different experimental designs
DT_mohring

Full diallel data for corn hybrids
DT_h2

Broad sense heritability calculation.
DT_example

Broad sense heritability calculation.
DT_ige

Data to fit indirect genetic effects.
DT_gryphon

Gryphon data from the Journal of Animal Ecology
DT_polyploid

Genotypic and Phenotypic data for a potato polyploid population
DT_halfdiallel

half diallel data for corn hybrids
DT_legendre

Simulated data for random regression
E.mat

Epistatic relationship matrix
MEMMA

Multivariate Efficient Mixed Model Association Algorithm
DT_technow

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

Expectation Maximization Algorithm
H

Two-way id by features table
DT_yatesoats

Yield of oats in a split-block experiment
GWAS

Genome wide association study analysis
DT_wheat

wheat lines dataset
DT_sleepstudy

Reaction times in a sleep deprivation study
DT_rice

Rice lines dataset
anova.mmec

anova form a GLMM fitted with mmec
LD.decay

Calculation of linkage disequilibrium decay
atcg1234

Letter to number converter
add.diallel.vars

add.diallel.vars
H.mat

Combined relationship matrix H
atc

atc covariance structure
atcg1234BackTransform

Letter to number converter
atr

atr covariance structure
anova.mmer

anova form a GLMM fitted with mmer
adiag1

Binds arrays corner-to-corner
corImputation

Imputing a matrix using correlations
csc

customized covariance structure
bathy.colors

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

coef form a GLMM fitted with mmec
covc

covariance between random effects
bivariateRun

bivariateRun functionality
build.HMM

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

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

fitted form a LMM fitted with mmec
isc

identity covariance structure
csr

customized covariance structure
imputev

Imputing a numeric or character vector
fitted.mmer

fitted form a LMM fitted with mmer
dsr

diagonal covariance structure
coef.mmer

coef form a GLMM fitted with mmer
fcm

fixed effect constraint indication matrix
dsc

diagonal covariance structure
dfToMatrix

data frame to matrix
gvsr

general variance structure specification
fixm

fixed indication matrix
leg

Legendre polynomial matrix
list2usmat

list or vector to unstructured matrix
overlay

Overlay Matrix
neMarker

Effective population size based on marker matrix
jet.colors

Generate a sequence of colors alog the jet colormap.
mmec

mixed model equations for c coefficients
logspace

Decreasing logarithmic trend
manhattan

Creating a manhattan plot
map.plot

Creating a genetic map plot
mmer

mixed model equations for r records
propMissing

Proportion of missing data
predict.mmer

Predict form of a LMM fitted with mmer
redmm

Reduced Model Matrix
r2

Reliability
plot.mmer

plot form a LMM plot with mmer
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
residuals.mmec

Residuals form a GLMM fitted with mmec
randef

extracting random effects
stackTrait

Stacking traits in a dataset
simGECorMat

Create a GE correlation matrix for simulation purposes.
spl2Dc

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

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

Residuals form a GLMM fitted with mmer
summary.mmec

summary form a GLMM fitted with mmec
spl2Dmats

Get Tensor Product Spline Mixed Model Incidence Matrices
spl2Db

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

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

reduced rank covariance structure
vpredict

vpredict form of a LMM fitted with mmer
vs

variance structure specification
usc

unstructured covariance structure
transformConstraints

transformConstraints
tpsmmbwrapper

Get Tensor Product Spline Mixed Model Incidence Matrices
tps

Get Tensor Product Spline Mixed Model Incidence Matrices
summary.mmer

summary form a GLMM fitted with mmer
unsm

unstructured indication matrix
usr

unstructured covariance structure
transp

Creating color with transparency
wald.test

Wald Test for Model Coefficients
vsr

variance structure specification
vsc

variance structure specification
AR1

Autocorrelation matrix of order 1.
DT_cpdata

Genotypic and Phenotypic data for a CP population
D.mat

Dominance relationship matrix
CS

Compound symmetry matrix
A.mat

Additive relationship matrix
AI

Average Information Algorithm
ARMA

Autocorrelation Moving average.
DT_btdata

Blue Tit Data for a Quantitative Genetic Experiment
DT_augment

DT_augment design example.
DT_cornhybrids

Corn crosses and markers