aggregateModelsTable: Aggregate the models found by exhaustive or stochastic search

Description Usage Arguments Value Author(s) Examples

Description

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.

Usage

1
  aggregateModelsTable(modelsTable, posterior, cut = 1L)

Arguments

modelsTable

the model configurations in a data frame

posterior

the posterior probabilities of the models

cut

the (integer) cutpoint (see details, default is 1)

Value

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.

Author(s)

Daniel Sabanes Bove daniel.sabanesbove@ifspm.uzh.ch

Examples

 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, ]

hypergsplines documentation built on May 2, 2019, 6:14 p.m.