plotEffects: Plot a BFBayesFactorConstraint object

Description Usage Arguments Value Examples

View source: R/plotEffects.R

Description

Plots observed vs estimated individual effects for each level of the effect for which constraints are defined.

Usage

1
plotEffects(x, .raw = FALSE)

Arguments

x

an object of class BFBayesFactorConstraint-class.

.raw

if FALSE, outputs the plot. If TRUE returns the data.frame that is used for making the plot.

Value

A ggplot object if .raw = FALSE. A data.frame otherwise, with columns for ID, type of effect, specified constraint, estimates, and ordering of estimate from smallest to largest.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
data(stroop)

resStroop <- constraintBF(rtS ~ ID*cond,
                          data = stroop,
                          whichRandom = "ID",
                          ID = "ID",
                          whichConstraint = c(cond = "2 > 1"),
                          rscaleEffects = c("ID" = 1, "cond" = 1/6, "ID:cond" = 1/10))

plotEffects(resStroop)

quid documentation built on Dec. 9, 2021, 9:06 a.m.