MixPlot: Plot Individual Responses from GLMM

Description Usage Arguments Details Value See Also Examples

Description

Plot response curve for each individual in a population sample, given a GLMM with one continuous predictor and one (optional) factorial predictor. If the factorial predictor is specified, the response is plotted separately for each individual and each predictor level.

Usage

1
MixPlot(xplode.obj, facet_by = NULL, showData = TRUE)

Arguments

xplode.obj

an object of class xplode.

facet_by

optional. A string specifying the name of the faceting variable (either the participant identification or the factorial predictor).

showData

logical, defines if proportion of binomial responses for each stimulus level are presented. Default is TRUE.

Details

If the model includes only a continuous predictor, the figure consist of a single panel, and each individual's response is assigned a different color. If a factorial predictor is included in the model, the faceting variable can be either the participant identification or the factorial predictor. By default, each panel shows an individual's response, different levels of the factorial predictor are coded by color.

Value

MixPlot returns a ggplot object.

See Also

xplode for objects of class xplode. ggplot2 for creating data visualizations. PsychPlot for plotting a a psychometric function from a GLM.

Examples

1
2
3
4
5
6
7
8
library(lme4)
mod.multi <- glmer(cbind(faster, slower) ~ speed * vibration + (1 + speed| subject), 
family = binomial(link = "probit"), data = vibro_exp3)
xplode.multi <- xplode(model = mod.multi, name.cont = "speed", name.factor = "vibration")

MixPlot(xplode.multi)
#alternative visualization
MixPlot(xplode.multi, facet_by = "vibration", showData = FALSE)

MixedPsy documentation built on Nov. 9, 2021, 1:08 a.m.