Linear Mixed Models - An Introduction with Applications in Veterinary Research

R Codes and Datasets for Duchateau, L. and Janssen, P. and Rowlands, G. J. (1998). Linear Mixed Models. An Introduction with applications in Veterinary Research. International Livestock Research Institute.


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.

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("VetResearchLMM")

1.1.0 by Muhammad Yaseen, 5 months ago


https://myaseen208.com/VetResearchLMM/, https://github.com/myaseen208/VetResearchLMM/


Report a bug at https://github.com/myaseen208/VetResearchLMM/issues


Browse source code at https://github.com/cran/VetResearchLMM


Authors: Muhammad Yaseen [aut, cre] (affiliation: School of Mathematical and Statistical Sciences , Clemson University , Clemson , South Carolina , USA) , Luc Duchateau [ctb] , Paul Janssen [ctb] , John Rowlands [ctb]


Documentation:   PDF Manual  


GPL-2 license


Suggests collapse, emmeans, ggplot2, lme4, lmerTest, multcomp, nlme, quarto, report, testthat


See at CRAN