Penalized Linear Mixed Models for Correlated Data

Fits penalized linear mixed models that correct for unobserved confounding factors. 'plmmr' infers and corrects for the presence of unobserved confounding effects such as population stratification and environmental heterogeneity. It then fits a linear model via penalized maximum likelihood. Originally designed for the multivariate analysis of single nucleotide polymorphisms (SNPs) measured in a genome-wide association study (GWAS), 'plmmr' eliminates the need for subpopulation-specific analyses and post-analysis p-value adjustments. Functions for the appropriate processing of 'PLINK' files are also supplied. For examples, see the package homepage < https://pbreheny.github.io/plmmr/>.


GitHub version CRAN version R-CMD-check Codecov test coverage

plmmr

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.

Installation

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')

Minimal example

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)

So how fast is 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.

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("plmmr")

4.3.0 by Patrick J. Breheny, 4 months ago


https://pbreheny.github.io/plmmr/, https://github.com/pbreheny/plmmr/


Report a bug at https://github.com/pbreheny/plmmr/issues/


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


Authors: Tabitha K. Peter [aut] , Anna C. Reisetter [aut] (ORCID: , Yujing Lu [aut] , Oscar A. Rysavy [aut] , Patrick J. Breheny [aut, cre] (ORCID:


Documentation:   PDF Manual  


GPL-3 license


Imports biglasso, data.table, glmnet, Matrix, ncvreg, parallel, utils

Depends on bigalgebra, bigmemory

Suggests bigsnpr, bigstatsr, graphics, grDevices, knitr, MASS, rmarkdown, R.utils, tinytest, withr

Linking to BH, bigmemory, Rcpp, RcppArmadillo


See at CRAN