lmerPlotInt.fnc {languageR}R Documentation

Plot the interaction of two linear numeric predictors in a model fitted with lmer

Description

Visualization of an interaction in a model fitted with lmer of two numeric predictors.

Usage

lmerPlotInt.fnc(lmermodel, xname, yname, intxyname, qntls = seq(0, 1, by = 0.1), view = 30, addStdError = FALSE, ndigits = 2, nlev = 30, which = "matplot", shadow = 0.5, colour = "lightblue")

Arguments

lmermodel an lmer model object
xname name (character string) of first numeric predictor
yname name (character string) of second numeric predictor
intxyname name (character string) of the interaction in the lmer summary
qntls vector of values to be shown for the second numeric predictor, defaults to deciles
view specifies the viewing parameter theta for the perspective plot
addStdError add noise with the standard deviation of the residual error in the lmer model to the plot
ndigits number of digits to show for the second numeric predictor
nlev number of levels for the contour plot
which choices are "matplot" (default), "contour", "persp", "image", and "all", in which case a 2 by 2 panel is shown with all four plots
shadow the amount of shade for the perspective plot
colour the color used for the perspective plot, defaults to "lightblue"

Value

A plot is shown on the graphics device.

Warning

This function should not be used to plot interactions when one of the predictors also has quadratic or higher terms in the model.

Author(s)

R. H. Baayen

Examples

        lexdec.lmer = lmer(RT~BNCw*Frequency+(1|Subject)+(1|Word), data=lexdec)
        lmerPlotInt.fnc(lexdec.lmer, "BNCw", "Frequency", "BNCw:Frequency", which="matplot")

[Package languageR version 0.953 Index]