Learn R Programming

r2glmm (version 0.1.1)

pqlmer: pqlmer

Description

Fit a GLMM model with multivariate normal random effects using Penalized Quasi-Likelihood for mermod objects.

Usage

pqlmer(formula, family, data, niter = 40, verbose = T, wtdbin = T)

Arguments

formula

The lme4 model formula.

family

a family function of the error distribution and link function to be used in the model.

data

the dataframe containing the variables in the model.

niter

Maximum number of iterations to perform.

verbose

if TRUE, iterations are printed to console.

wtdbin

if TRUE, the binomial weights are used to adjust the final model, which improved covariance model selection. This method is not applied to poisson models.

Value

A pseudo linear mixed model of class "lme" .

See Also

glmmPQL

Examples

Run this code
# NOT RUN {
# Compare lmer PQL with lme PQL

library(MASS)

lmePQL = glmmPQL(y ~ trt + week + I(week > 2), random = ~ 1 | ID,
                  family = binomial, data = bacteria,
                  verbose = FALSE)

merPQL= pqlmer(y ~ trt + week + I(week > 2) + (1 | ID),
               family = binomial, data = bacteria,
               verbose = FALSE)

summary(lmePQL)
summary(merPQL)
# }

Run the code above in your browser using DataLab