calculateDifferences: Calculate differences between conditions specified in...

Description Usage Arguments Value Examples

View source: R/plotEffects.R

Description

Calculates the differences between the conditions specified in the constraints of a BFBayesFactorConstraint object for each individual.

Usage

1
calculateDifferences(x, effect = c("estimate", "observed"))

Arguments

x

an object of class BFBayesFactorConstraint-class.

effect

the effect differences to be calculated. effect = "estimate" computes the effect differences from the model estimates; effect = "observed" computes the observed effect differences.

Value

calculateDifferences returns an object of class tbl_df, with columns for ID, type of effect, specified constraint, and estimates.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
## Not run: 
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))

calculateDifferences(resStroop, effect = "estimate")
calculateDifferences(resStroop, effect = "observed")

## End(Not run)

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