Learn R Programming

gremlin

R package for mixed-effects model REML incorporating Generalized Inverses (so, with some mental gymnastics: GREMLIN).

See the latest developments:

Overview of main branches:

  • master branch is the most recent production version (often the same as what is available from the R CRAN mirrors)

  • devel branch is a preview of the next release which should be functional and error/bug free, but proceed with caution

To install gremlin:

  • From R:
    • see the package page for the latest release of gremlin on CRAN where you can download the source.
    • install the latest release of the package directly in R:
install.packages("gremlin")

then select your favorite CRAN mirror

library(devtools)

# Install `master` branch
install_github("matthewwolak/gremlin")

# Install `devel` branch
install_github("matthewwolak/gremlin", ref = "devel")

Examples

  • Estimating autosomal additive and dominance genetic variances
library(gremlin)
library(nadiv)  #<-- needed for creating inverse relatedness matrices

# Set up a subset of data for the example
warcolak$IDD <- warcolak$ID

# Create generalized inverse matrices
Ainv <- makeAinv(warcolak[, 1:3])$Ainv
Dinv <- makeD(warcolak[, 1:3])$Dinv

# Basic model structure is as follows:
## Fixed effects of sex
## ID  = autosomal additive genetic variance term
## IDD = autosomal dominance genetic variance term
grAD <- gremlin(trait1 ~ sex-1,
	random = ~ ID + IDD,
	ginverse = list(ID = Ainv, IDD = Dinv),
	data = warcolak)

# Summary
nrow(warcolak)
summary(grAD)

Copy Link

Version

Install

install.packages('gremlin')

Monthly Downloads

611

Version

1.0.1

License

GPL-3 | file LICENSE

Issues

Pull Requests

Stars

Forks

Maintainer

Matthew Wolak

Last Published

June 25th, 2020

Functions in gremlin (1.0.1)

logLik.gremlin

Methods to extract log-likelihood and information criterion of a gremlin model.
fixef.gremlin

Fixed Effect Estimates of class ‘gremlin’
Mrode11

Weight gain data.
covFun

(Co)variance parameter transformations.
anova.gremlin

anova() for gremlin objects
deltaSE

Delta Method to Calculate Standard Errors for Functions of (Co)variances.
nobs.gremlin

Number of observations in data from gremlin model fit objects
gremlin-package

Mixed-Effects REML Incorporating Generalized Inverses
gremlin

Mixed-effect modeling functions.
gremlinControl

Advanced Options for Mixed-effect modeling functions.
reml

REML optimization algorithms for mixed-effect models.
remlIt

Mixed-effect model Restricted Maximum Likelihood (REML) iterations.
runtime

Time to execute the gremlin model
residuals.gremlin

Residuals of class ‘gremlin’
summary.gremlin

Gremlin model summary.
tr

Matrix trace methods.