LMMstar stands for Linear Mixed Models - statistical analysis in R. It is companion R package for the course “Statistical analysis of correlated and repeated measurements for health science researchers” taught by the section of Biostatistics of the University of Copenhagen. It provides functions for computing summary statistics and obtaining graphical displays of longitudinal data, as well as for statistical modeling and statistical inference using mixed models. In particular, it implements linear mixed models where the model for the variance-covariance of the residuals is specified via patterns (compound symmetry, toeplitz, unstructured, …), possibly stratified on a categorical variable. Statistical uncertainty for mean, variance, and correlation parameters is performed based on the observed information. Statistical testing can be performed for arbitrary linear or non-linear combination(s) of model coefficients. For linear combinations, a Satterthwaite approximation of the degrees of freedom is available. Normalized residuals are provided to assess model misspecification. Predictions can be computed conditional to covariates only or also to outcome values.
This package builds on existing software:
lava
for simulating datamultcomp
for adjusting for multiple comparisonsggplot2
for graphical displays
You can download the latest stable version on CRAN
using:
install.packages("LMMstar")
or download the development version from GitHub
:
library(remotes)
install_github("bozenne/LMMstar")
For the later you will need a fairly recent R version (>=4.0.0) and, for windows users, Rtools. You can check both using:
paste0(R.Version()[c("major","minor")], collapse = ".")
pkgbuild::find_rtools()
[1] "4.1.1" [1] TRUE
citation("LMMstar")
To cite the 'LMMstar' package in publications use the following text: Ozenne B, Forman J (2024). _LMMstar: Repeated measurement models for discrete times_. R package version 1.1.0. A BibTeX entry for LaTeX users is @Manual{, title = {LMMstar: Repeated measurement models for discrete times}, author = {Brice Ozenne and Julie Forman}, year = {2024}, note = {R package version 1.1.0}, }
For an overview of the package see the following vignette ./vignettes/overview.pdf.
For an introduction to partial residual see this other vignette ./vignettes/partial-residuals.pdf