mem.plotran {hamlet}R Documentation

Plot random effects histograms for a fitted mixed-effects model

Description

This plot creates histogram plots for the columns extracted from random effects from a model fit. This is useful for model diagnostics, such as observing deviations from normality in the random effects.

Usage

mem.plotran(fit, breaks = 100)

Arguments

fit

A fitted mixed-effects model generated either through the lme4 or the nlme package.

breaks

Number of breaks in the histograms (passed to the 'hist'-function)

Author(s)

Teemu Daniel Laajala <teelaa@utu.fi>

See Also

mem.getcomp, mem.plotresid

Examples

data(vcaplong)

exdat <- vcaplong[vcaplong[,"Group"] %in% c("Vehicle", "ARN"),]

library(lme4)
f1 <- lmer(log2PSA ~ 1 + DrugWeek + DrugWeek:ARN + (1 + DrugWeek|ID), data = exdat)

ranef(f1) # Histograms are plotted for these columns
mem.plotran(f1)

[Package hamlet version 0.9.6 Index]