Learn R Programming

VetResearchLMM: Linear Mixed Models - An Introduction with Applications in Veterinary Research

Introduction

VetResearchLMM provides datasets and reproducible R examples for Linear Mixed Models: An Introduction with Applications in Veterinary Research by Duchateau, Janssen, and Rowlands.

Current package maintenance includes the School of Mathematical and Statistical Sciences, Clemson University.

Installation

Stable Version

Install the stable version from CRAN:

install.packages("VetResearchLMM")

Development Version

Install the development version from GitHub:

if (!requireNamespace("devtools", quietly = TRUE)) {
  install.packages("devtools")
}

devtools::install_github("myaseen208/VetResearchLMM", build_vignettes = TRUE)

Example

data(ex31, package = "VetResearchLMM")
str(ex31)

Modern examples use collapse::fmutate() for compact preprocessing, ggplot2 for figures, optional report_mixed_model() for easystats-style interpretation, and optional emmeans_mixed_model() for estimated marginal means and post hoc comparisons.

if (requireNamespace("lme4", quietly = TRUE) &&
    requireNamespace("emmeans", quietly = TRUE)) {
  data(ex125, package = "VetResearchLMM")
  fit <- lme4::lmer(Pcv ~ dose * Drug + (1 | Region / Drug), data = ex125)
  if (requireNamespace("report", quietly = TRUE)) {
    report::report(fit)
  }
  emmeans_mixed_model(fit, ~ dose | Drug, lmer.df = "asymptotic")
  emmeans_mixed_model(
    fit,
    ~ dose | Drug,
    pairwise = TRUE,
    lmer.df = "asymptotic"
  )
}

Articles

The package includes Quarto articles covering the package overview, mixed model methodology, book example mapping, and ggplot2 plotting workflows. These articles are intended for pkgdown and applied users working through the book.

License

This package is free and open source software, licensed under GPL.

Copy Link

Version

Install

install.packages('VetResearchLMM')

Monthly Downloads

198

Version

1.1.0

License

GPL-2

Issues

Pull Requests

Stars

Forks

Maintainer

Muhammad Yaseen

Last Published

May 5th, 2026

Functions in VetResearchLMM (1.1.0)

ex32

ex32 from Duchateau, L. and Janssen, P. and Rowlands, G. J. (1998).Linear Mixed Models. An Introduction with applications in Veterinary Research. International Livestock Research Institute.
ex121

ex121 from Duchateau, L. and Janssen, P. and Rowlands, G. J. (1998).Linear Mixed Models. An Introduction with applications in Veterinary Research. International Livestock Research Institute.
ex124

ex124 from Duchateau, L. and Janssen, P. and Rowlands, G. J. (1998).Linear Mixed Models. An Introduction with applications in Veterinary Research. International Livestock Research Institute.
ex31

ex31 from Duchateau, L. and Janssen, P. and Rowlands, G. J. (1998).Linear Mixed Models. An Introduction with applications in Veterinary Research. International Livestock Research Institute.
report_mixed_model

Report a Fitted Mixed Model
Examp3.2

Examp3.2 from Duchateau, L. and Janssen, P. and Rowlands, G. J. (1998).Linear Mixed Models. An Introduction with applications in Veterinary Research. International Livestock Research Institute.
ex33

ex33 from Duchateau, L. and Janssen, P. and Rowlands, G. J. (1998).Linear Mixed Models. An Introduction with applications in Veterinary Research. International Livestock Research Institute.
Examp3.3

Examp3.3 from Duchateau, L. and Janssen, P. and Rowlands, G. J. (1998).Linear Mixed Models. An Introduction with applications in Veterinary Research. International Livestock Research Institute.
emmeans_mixed_model

Estimated Marginal Means for a Fitted Mixed Model
VetResearchLMM-package

VetResearchLMM: Linear Mixed Models for Veterinary Research Examples
Examp2.4.3.1

Examp2.4.3.1 from Duchateau, L. and Janssen, P. and Rowlands, G. J. (1998).Linear Mixed Models. An Introduction with applications in Veterinary Research. International Livestock Research Institute.
Examp1.3.2

Examp1.3.2 from Duchateau, L. and Janssen, P. and Rowlands, G. J. (1998).Linear Mixed Models. An Introduction with applications in Veterinary Research. International Livestock Research Institute.
Examp2.5.3.1

Examp2.5.3.1 from Duchateau, L. and Janssen, P. and Rowlands, G. J. (1998).Linear Mixed Models. An Introduction with applications in Veterinary Research. International Livestock Research Institute.
ex125

ex125 from Duchateau, L. and Janssen, P. and Rowlands, G. J. (1998).Linear Mixed Models. An Introduction with applications in Veterinary Research. International Livestock Research Institute.
Examp2.5.1.1

Examp2.5.1.1 from Duchateau, L. and Janssen, P. and Rowlands, G. J. (1998).Linear Mixed Models. An Introduction with applications in Veterinary Research. International Livestock Research Institute.
ex127

ex127 from Duchateau, L. and Janssen, P. and Rowlands, G. J. (1998).Linear Mixed Models. An Introduction with applications in Veterinary Research. International Livestock Research Institute.
Examp2.5.2.1

Examp2.5.2.1 from Duchateau, L. and Janssen, P. and Rowlands, G. J. (1998).Linear Mixed Models. An Introduction with applications in Veterinary Research. International Livestock Research Institute.
Examp2.6.1

Examp2.6.1 from Duchateau, L. and Janssen, P. and Rowlands, G. J. (1998).Linear Mixed Models. An Introduction with applications in Veterinary Research. International Livestock Research Institute.
Examp2.5.4.1

Examp2.5.4.1 from Duchateau, L. and Janssen, P. and Rowlands, G. J. (1998).Linear Mixed Models. An Introduction with applications in Veterinary Research. International Livestock Research Institute.
Examp2.4.2.2

Examp2.4.2.2 from Duchateau, L. and Janssen, P. and Rowlands, G. J. (1998).Linear Mixed Models. An Introduction with applications in Veterinary Research. International Livestock Research Institute.
Examp2.2.1.7

Examp2.2.1.7 from Duchateau, L. and Janssen, P. and Rowlands, G. J. (1998).Linear Mixed Models. An Introduction with applications in Veterinary Research. International Livestock Research Institute.
Examp3.1

Examp3.1 from Duchateau, L. and Janssen, P. and Rowlands, G. J. (1998).Linear Mixed Models. An Introduction with applications in Veterinary Research. International Livestock Research Institute.