Learn R Programming

glmmsr: fit GLMMs with various approximation methods

Generalized linear mixed models (GLMMs) are an important and widely-used model class. In R, we can fit these models with the lme4 package, but there are some limitations. First, except in very simple cases, lme4 uses a Laplace approximation to the likelihood for inference, which may be of poor quality in some cases. Second, it is difficult to fit some GLMMs, such as pairwise comparison models, with lme4. The glmmsr package offers progress on both of these problems.

A user must choose which method to use to approximate the likelihood. In addition to the Laplace and adaptive Gaussian quadrature approximations, which are borrowed from lme4, the likelihood may be approximated by the sequential reduction approximation, or an importance sampling approximation. These methods provide an accurate approximation to the likelihood in some situations where it is not possible to use adaptive Gaussian quadrature.

The vignette provides more information about the different approximations.

The interface of glmmsr allows easy fitting of pairwise comparison and many other interesting models, which are difficult to fit with lme4. See the vignette for some examples.

Installing glmmsr

You can glmmsr from CRAN with

install.packages("glmmsr")

You can install the development version of glmmsr from GitHub by running

devtools::install_github("heogden/glmmsr")

Documentation

To view the vignette for glmmsr, use

browseVignettes("glmmsr")

or see here

Copy Link

Version

Install

install.packages('glmmsr')

Monthly Downloads

70

Version

0.2.3

License

GPL (>= 2)

Issues

Pull Requests

Stars

Forks

Maintainer

Last Published

February 4th, 2019

Functions in glmmsr (0.2.3)

calibration_parameters

Parameters needed to calibrate the cluster tree
three_level

A dataset simulated from a three-level model
two_level

A dataset simulated from a two-level model
find_modfr_glmm

Parse a formula (and possibly subformulas)
coef.glmmFit

Extract Model Coefficients for a glmmFit object
glmm

Fit a GLMM
continuous_beliefs

A vector of terms in the factorization of a graphical model, of mixed continuous types.
summary.glmmFit

Summarize a glmmFit object
summaryGlmmFit

Construct a summaryGlmmFit object
find_approximation_name

Find the name of the likelihood approximation used for fitting
find_lfun_glmm

Find the log-likelihood function
print.summaryGlmmFit

Print summaryGlmmFit object
set_lme4_control

Control of Mixed Model Fitting
glmmFit

Construct a glmmFit object
glmmsr

glmmsr: fit GLMMs with various approximation methods
optimize_glmm

Maximize the approximated log-likelihood
print.glmmFit

Print glmmFit object
cluster_graph

The beliefs for the clusters and sepsets of a cluster tree, of mixed continuous types.
vcov.glmmFit

Calculate Variance-Covariance Matrix for a glmmFit object