mem.plotran | R Documentation |
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.
mem.plotran(fit, breaks = 100)
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) |
Teemu Daniel Laajala <teelaa@utu.fi>
mem.getcomp
, mem.plotresid
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.