Description Usage Arguments Value Examples
Function to create diagnostic plots for the group elements of the random effect part of a nested model.
1 | lmediaplots(lme.obj, plottype = "within")
|
lme.obj |
A "lme" object created using package "nlme". Must have a nesting / within component. |
plottype |
Type of the diagnostic plot to create. Either "within" for box/scatter - plots of within-group residuals, or "resvfit" for a plot of the standardized residuals versus fitted values per group, or "qq" for diagnostic plots for assessing the normality of residuals and random effects in the linear mixed-effects fit per group. Default is "within". |
List of plots. One plot for each grouping factor in the model.
1 2 3 4 5 6 7 | # based on example from Pinheiro, Bates (2000) Mixed-Effect Models in S and S-PLUS. Springer.
library(nlme)
fm1Machine <- lme(score ~ Machine, data = Machines, random = ~ 1 | Worker/Machine)
lmediaplots(fm1Machine)
lmediaplots(fm1Machine, plottype = "resvfit")
lmediaplots(fm1Machine, plottype = "qq")
lmediaplots(fm1Machine, plottype = "qq")[1]
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.