Description Usage Arguments Details Value References Examples
This function uses Bayesian mixed models to estimate individual effect sizes and to test theoretical order constraints.
1 2 3 4 5 6 7 8 9 10 11 12  constraintBF(
formula,
data,
whichRandom,
ID,
whichConstraint,
rscaleEffects,
iterationsPosterior = 10000,
iterationsPrior = iterationsPosterior * 10,
burnin = 1000,
...
)

formula 
a formula containing the full model. 
data 
a 
whichRandom 
a character vector specifying which factors are random. 
ID 
a character vector of length one specifying which variable holds the subject ID. 
whichConstraint 
a named character vector specifying the constraints placed on certain factors; see Details. 
rscaleEffects 
a named vector of prior settings for individual factors. Values are scales, names are factor names; see Details. 
iterationsPosterior 
the number of iterations to sample from the posterior of the full model. 
iterationsPrior 
the number of iterations to sample from the prior of the full model. 
burnin 
the number of initial iterations to discard from posterior sampling. 
... 
further arguments to be passed to

This function provides a way of testing whether theoretical constraints on
certain effects hold for all subjects. The backend is provided by the
generalTestBF
function from the
BayesFactorpackage
. The input formula is the
full model to be tested. It usually contains an interaction term between
the subject ID and the effect for which constraints are tested (e.g.
ID:condition
). The ID variable is to be specified in ID
and is
usually a random factor to be specified in whichRandom
.
Order constraints on effects should be specified in whichConstraint
,
as a named character vector. Each constraint in the vector can take 2 levels
of the effect. They are of the form:
"effect name" = "condition A" < "condition B"
. In order to impute more
than 2 levels, the same effect name has to be entered with different conditions
as the value. For instance, for testing whether conditions A < B < C, the
input should be: "effect name" = "condition A" < "condition B", "effect name" = "condition B" < "condition C"
.
At this point, constraints can only be tested for the same effect.
Priors have to be specified for all factors in whichConstraint
,
for ID
, and for the interaction between the two. A Detailed description
of the models, priors and methods is given in the documentation of
anovaBF
and more extensively in Rouder et al. (2012).
An object of class BFBayesFactorConstraintclass
.
Rouder, J. N., Morey, R. D., Speckman, P. L., Province, J. M., (2012) Default Bayes Factors for ANOVA Designs. Journal of Mathematical Psychology. 56. p. 356374.
1 2 3 4 5 6 7 8 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.