Learn R Programming

⚠️There's a newer version (0.2.3) of this package.Take me there.

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 install version 0.1.0 of glmmsr from CRAN with

install.packages("glmmsr")

You can install this development version of glmmsr 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

11

Version

0.1.1

License

GPL (>= 2)

Issues

Pull Requests

Stars

Forks

Maintainer

Helen Ogden

Last Published

March 13th, 2016

Functions in glmmsr (0.1.1)

cluster_graph

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

Construct a glmmFit object
calibration_parameters

Parameters needed to calibrate the cluster tree
find_lfun_glmm

Find the log-likelihood function
three_level

A dataset simulated from a three-level model
summary.glmmFit

Summarize a glmmFit object
glmmsr

glmmsr: fit GLMMs with various approximation methods
continuous_beliefs

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

Fit a GLMM
print.summaryGlmmFit

Print summaryGlmmFit object
print.glmmFit

Print glmmFit object
two_level

A dataset simulated from a two-level model
optimize_glmm

Maximize the approximated log-likelihood
find_approximation_name

Find the name of the likelihood approximation used for fitting
find_modfr_glmm

Parse a formula (and possibly subformulas)
summaryGlmmFit

Construct a summaryGlmmFit object