This is a wrapper function to the dotplot() function in the lattice-package.
# S3 method for estex
plot(x, which="dfbetas", sort=FALSE, to.sort=NA, abs=FALSE, cutoff=0,
parameters=seq_len(ncol(estex$alt.fixed)),
groups=seq_len(nrow(estex$alt.fixed)), …)
An object as returned by the influence() function, containing the altered estimates of a mixed effects regression model.
Select which measure of influence is to be plotted. Available options are: "dfbetas"
to visualize dfbetas, "cook"
to plot the cook's distances, "pchange"
to plot the percentage change, and "sigtest"
to plot the test statistic of a parameter estimate after deletion of specific cases.
If sort=TRUE
The values of the selected measure of influence are ordered based on magnitude before visualization. If sort=FALSE
(default) no sorting takes place.
Specify on which variable the values of the selected measure of influence must be sorted. If only one variable present (either in the model, or due to the selection specified in parameters
), this parameter can be omitted. If multiple variables are visualized, and sort=TRUE, specification of to.sort
is required, or an error is returned.
If abs=TRUE
, the absolute values of the values of the selected measure of influence are visualized, while if abs=FALSE
(default), both positive and negative values are possible. If both abs=TRUE
and sort=TRUE
, the abs
parameters precedes the sort
parameter, and thus the absolute values of the selected measure of influence are sorted.
Values of the selected measure of influence exceeding the specified (cutoff
) value are plotted visually different from values not exceeding the cutoff. If cutoff=0
(default), no such differentiation is made in the way values are plotted.
Used to define a selection of parameters. If left unspecified (default), values for the selected measure of influence are visualized for parameters in the model.
Used to define a selection of nesting groups that should be visualized. If left unspecified (default), the values of the selected measure of influence for all nesting groups are shown.
Further arguments passed on to the dotplot() function.
influence
, dfbetas.estex
,
cooks.distance.estex
, pchange
, sigtest
data(school23)
model <- lmer(math ~ structure + SES + (1 | school.ID), data=school23)
alt.est <- influence(model, "school.ID")
plot(alt.est, which="dfbetas")
plot(alt.est, which="cook", sort=TRUE)
Run the code above in your browser using DataLab