Description Usage Arguments Value Author(s) Examples
This function reduces the model configurations to
meta-models which distinguish only 0, 1, 2, ...,
cut
degrees of freedom, that is, degrees of
freedom greater or equal than cut
are seen as
identical. The function returns the meta-model strings
for each single model, and the posterior probabilities of
these meta-models, ordered from top to bottom.
1 | aggregateModelsTable(modelsTable, posterior, cut = 1L)
|
modelsTable |
the model configurations in a data frame |
posterior |
the posterior probabilities of the models |
cut |
the (integer) cutpoint (see details, default is 1) |
a list with elements metaConfig
and
metaProb
containing the meta-model strings for
each single model and the posterior probabilities of the
meta-models, respectively.
Daniel Sabanes Bove daniel.sabanesbove@ifspm.uzh.ch
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | ## get some data
attach(longley)
## get model data
md <- modelData(y=Employed,
X=cbind(GNP, Armed.Forces))
## get a list of all possible models with this data
exRes <- exhaustive(md)$models
exRes
## get meta-model table
aggRes <- aggregateModelsTable(modelsTable=exRes[, 1:2],
posterior=exRes$post)
aggRes$metaProb
## the top meta model
topMeta <- names(aggRes$metaProb)[1L]
topMeta
## models corresponding to top meta-model
exRes[aggRes$metaConfig == topMeta, ]
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.