testHypothesis | R Documentation |
This is the primary function in this package. It takes two matrices of prior and posterior cell means, a data.frame
containing information about the factor levels in the design, and what effect you want to test. It computes a Bayes factor related to the hypothesis that the effect is present in the cell means.
testHypothesis(priorCMs, postCMs, factors, testedFactors, dmFactors = testedFactors, contrastType = NULL, testFunction = testFunction_SDDR, usedFactorLevels = NULL)
priorCMs |
Numeric matrix. Cell means sampled from the priors. The columns must correspond to the rows of factors but do not need to be named. |
postCMs |
Numeric matrix. Cell means sampled from the posterior distribution. The columns must correspond to the rows of factors but do not need to be named. |
factors |
A |
testedFactors |
Character vector. The factors for which to perform the hypothesis test as a vector of factor names. A single factor name results in the test of the main effect of the factor. Multiple factor names result in the test of the interaction of all of those factors. You may provide either a vector with multiple elements, e.g. |
dmFactors |
Character vector or formula. The factors to use to construct the design matrix. Like |
contrastType |
Character, function, or list. The contrast to use to create the design matrix. If character, can be any of the function names on the documentation page for |
testFunction |
A function that takes two matrices of prior and posterior effect parameters, in that order. For example, see |
usedFactorLevels |
A |
The return value depends on the choice of testFunction
. See testFunction_SDDR
for an example.
See testHypotheses
for performing multiple tests at once. See groupEffectParameters
for pairwise comparisons of effect parameters.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.