llcont.glmerMod: Extract Cluster-wise Log Likelihoods for Generalized Linear...

View source: R/llcont.glmerMod.R

llcont.glmerModR Documentation

Extract Cluster-wise Log Likelihoods for Generalized Linear Mixed Effects Models

Description

A function for extracting the cluster-wise log likelihoods of a generalized linear mixed effects model fitted via lme4. This function returns the cluster-wise log likelihoods, evaluated at the ML estimates.

Usage

## S3 method for class 'glmerMod'
llcont(x, ...)

Arguments

x

An object of class glmerMod.

...

Additional arguments.

Value

A vector of log-likelihoods whose length is the number of clusters.

References

Douglas Bates, Martin Maechler, Ben Bolker, Steve Walker (2015). Fitting Linear Mixed-Effects Models Using lme4. Journal of Statistical Software, 67(1), 1-48. doi: 10.18637/jss.v067.i01.

Merkle, E. C., You, D. and Preacher, K. J., 2016. Testing Nonnested Structural Equation Models. Psychological Methods, 21(2), 151. https://arxiv.org/pdf/1402.6720v3

Examples

## Not run: 
data(finance, package="smdata")

lme4fit <- glmer(corr ~ jmeth + (1 | item), data = finance,
                 family = binomial, nAGQ = 20)

# clusterwise log likelihood
llcont(lme4fit)

## End(Not run)  

nctingwang/merDeriv documentation built on Aug. 17, 2022, 3:06 p.m.