Description Usage Arguments Details Value Author(s) References Examples
This function compares different linear models on the basis of their Bayes factors and by graphically comparing posterior model probabilities.
1 |
form.list |
a list of linear models, each expressed by a model formula, that should be compared; the models must all be applicable to the same data frame and use the same response variable |
data |
a data frame to be analyzed |
l |
the number of models to be compared; defaults to all models in the form.list |
Note that a list containing several appropriate models for the data frame should be prepared beforehand. See the example for how to do this.
A list with model parameter probabilities is silently returned.
Robert van Hulst
van Hulst, R. 2018. Evaluating Scientific Evidence. ms.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | ## Not run:
data(PlantGrowth)
frmlst <- list(
model0 = formula(weight ~ 1),
model1 = formula(weight ~ group) )
Bregbf(form.list=frmlst, data=PlantGrowth)
data(fev)
frmlst.fev <- list(
formula(FEV ~ Age),
formula(FEV ~ Smoke),
formula(FEV ~ Age + Smoke),
formula(FEV ~ Age * Smoke)
)
Bregbf(frmlst.fev, fev)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.