merMod-class {lme4}R Documentation

Class "merMod" of Fitted Mixed-Effect Models

Description

A mixed-effects model is represented as a merPredD object and a response module of a class that inherits from class lmResp. A model with a lmerResp response has class lmerMod; a glmResp response has class glmerMod; and a nlsResp response has class nlmerMod.

Usage

## S3 method for class 'merMod'
anova(object, ..., refit = TRUE, model.names=NULL)
## S3 method for class 'merMod'
terms(x, fixed.only = TRUE, ...)
## S3 method for class 'merMod'
vcov(object, correlation = TRUE, sigm = sigma(object),
use.hessian = NULL, ...)

## S3 method for class 'merMod'
print(x, digits = max(3, getOption("digits") - 3),
      correlation = NULL, symbolic.cor = FALSE,
      signif.stars = getOption("show.signif.stars"), ranef.comp = "Std.Dev.", ...)

## S3 method for class 'merMod'
summary(object, correlation = , use.hessian = NULL, ...)
## S3 method for class 'summary.merMod'
print(x, digits = max(3, getOption("digits") - 3),
      correlation = NULL, symbolic.cor = FALSE,
      signif.stars = getOption("show.signif.stars"),
      ranef.comp = c("Variance", "Std.Dev."), show.resids = TRUE, ...)
## S3 method for class 'merMod'
weights(object, type = c("prior", "working"), ...)

Arguments

object

an R object of class merMod, i.e., as resulting from lmer(), or glmer(), etc.

x

an R object of class merMod or summary.merMod, respectively, the latter resulting from summary(<merMod>).

refit

logical indicating if objects of class lmerMod should be refitted with ML before comparing models. The default is TRUE to prevent the common mistake of inappropriately comparing REML-fitted models with different fixed effects, whose likelihoods are not directly comparable.

model.names

character vectors of model names to be used in the anova table.

fixed.only

logical indicating if only the fixed effects terms are sought, defaults to true. If false, all terms, including random ones are returned.

correlation

(logical) for vcov, indicates whether the correlation matrix as well as the variance-covariance matrix is desired; for print.summary.merMod, indicates whether the correlation matrix of the fixed-effects parameters should be printed.

use.hessian

(logical) indicates whether to use the finite-difference Hessian of the deviance function to compute standard errors of the fixed effects, rather estimating based on internal information about the inverse of the model matrix (see getME(.,"RX")). The default is to to use the Hessian whenever the fixed effect parameters are arguments to the deviance function (i.e. for GLMMs with nAGQ>0), and to use getME(.,"RX") whenever the fixed effect parameters are profiled out (i.e. for GLMMs with nAGQ==0 or LMMs).

use.hessian=FALSE is backward-compatible with older versions of lme4, but may give less accurate SE estimates when the estimates of the fixed-effect (see getME(.,"beta")) and random-effect (see getME(.,"theta")) parameters are correlated.

sigm

the residual standard error; by default sigma(object).

digits

number of significant digits for printing

symbolic.cor

should a symbolic encoding of the fixed-effects correlation matrix be printed? If so, the symnum function is used.

signif.stars

(logical) should significance stars be used?

ranef.comp

character vector of length one or two, indicating if random-effects parameters should be reported on the variance and/or standard deviation scale.

show.resids

should the quantiles of the scaled residuals be printed?

type

type of weights to be returned; either "prior" for the initially supplied weights or "working" for the weights at the final iteration of the penalized iteratively reweighted least squares algorithm.

...

potentially further arguments passed from other methods.

Objects from the Class

Objects of class merMod are created by calls to lmer, glmer or nlmer.

S3 methods

The following S3 methods with arguments given above exist (this list is currently not complete):

summary:

Computes and returns a list of summary statistics of the fitted model, the amount of output can be controlled via the print method, see also summary.

print.summary:

Controls the output for the summary method.

vcov:

Calculate variance-covariance matrix of the fixed effect terms, see also vcov.

anova:

returns the sequential decomposition of the contributions of fixed-effects terms or, for multiple arguments, model comparison statistics. For objects of class lmerMod the default behavior is to refit the models with LM if fitted with REML = TRUE, this can be controlled via the refit argument. See also anova.

See Also

lmer, glmer, nlmer, merPredD, lmerResp, glmResp, nlsResp

Examples

showClass("merMod")
methods(class="merMod")## over 30  (S3) methods available

## -> example(lmer)  for an example of vcov.merMod()

[Package lme4 version 1.1-5 Index]