
The plmmr (penalized
linear mixed models
in R) package contains functions that fit penalized
linear mixed models to correct for unobserved confounding effects.
Three small datasets ship with plmmr, and tutorials
walking through how to analyze these data sets are documented in the plmmr website.
To install the latest version of the package from GitHub, use this:
devtools::install_github("pbreheny/plmmr")You can also install plmmr from CRAN:
install.packages('plmmr')library(plmmr)
X <- rnorm(100*20) |> matrix(100, 20)
y <- rnorm(100)
fit <- plmm(X, y)
plot(fit)
cvfit <- cv_plmm(X, y)
plot(cvfit)
summary(cvfit)plmmr? And how well does it scale?These questions are addressed in our manuscript describing plmmr,
along with its accompanying GitHub
repository. However, using GWAS data from a study with 1,400 samples
and 800,000 SNPs, a full plmmr analysis will run in about
half an hour using a single core on a laptop.