Description Usage Arguments Details Value Note Author(s) References See Also Examples
This function computes Bayes factors corresponding to restrictions on a full model.
1 2 3 4 5 6 |
formula |
a formula containing the full model for the analysis (see Examples) |
data |
a data frame containing data for all factors in the formula |
whichRandom |
a character vector specifying which factors are random |
whichModels |
which set of models to compare; see Details |
neverExclude |
a character vector containing a regular expression (see help for regex for details) that indicates which terms to always keep in the analysis |
iterations |
How many Monte Carlo simulations to generate, if relevant |
progress |
if |
rscaleFixed |
prior scale for standardized, reduced fixed effects. A number of preset values can be given as strings; see Details. |
rscaleRandom |
prior scale for standardized random effects |
rscaleCont |
prior scale for standardized slopes |
multicore |
if |
method |
approximation method, if needed. See
|
noSample |
if |
See the help for anovaBF
and
anovaBF
or details.
Models, priors, and methods of computation are provided in Rouder et al. (2012) and Liang et al (2008).
An object of class BFBayesFactor
, containing the
computed model comparisons
The function generalTestBF
can compute Bayes
factors for all restrictions of a full model against the
null hypothesis that all effects are 0. The total number
of tests computed – if all tests are requested – will
be 2^K - 1 for K factors or
covariates. This number increases very quickly with the
number of tested predictors. An option is included to
prevent testing too many models:
options('BFMaxModels')
, which defaults to 50,000,
is the maximum number of models that will be analyzed at
once. This can be increased by increased using
options
.
It is possible to reduce the number of models tested by
only testing the most complex model and every restriction
that can be formed by removing one factor or interaction
using the whichModels
argument. See the help for
anovaBF
for details.
Richard D. Morey (richarddmorey@gmail.com)
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. 356-374.
Liang, F. and Paulo, R. and Molina, G. and Clyde, M. A. and Berger, J. O. (2008). Mixtures of g-priors for Bayesian Variable Selection. Journal of the American Statistical Association, 103, pp. 410-423
lmBF
, for testing specific models, and
regressionBF
and anovaBF
for other
functions for testing multiple models simultaneously.
1 2 3 4 5 6 7 |
Loading required package: coda
Loading required package: Matrix
************
Welcome to BayesFactor 0.9.12-2. If you have questions, please contact Richard Morey (richarddmorey@gmail.com).
Type BFManual() to open the manual.
************
Bayes factor analysis
--------------
[1] shape + ID : 313165.3 <U+00B1>1.07%
[2] color + ID : 313268.2 <U+00B1>0.9%
[3] shape + color + ID : 1329350 <U+00B1>1.61%
[4] shape + color + shape:color + ID : 471112.9 <U+00B1>2.15%
[5] ID : 111516.6 <U+00B1>0%
Against denominator:
Intercept only
---
Bayes factor type: BFlinearModel, JZS
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.