[.bma {BMS}R Documentation

Extract Parts of a topmod Object

Description

returns a bma (or topmod) object whose

Usage

## S3 method for class 'bma'
x[i, ...]

## S3 method for class 'topmod'
x[i, ...]

Arguments

x

an object of class 'bma' or of class topmod

i

index of the best models to be retained

...

arguments such as 'drop' will not have an effect

Details

Both functions are equivalent: they serve to select a subset of the best models in a bma object.

Value

If x is a topmod object (see topmod), then x[i] returns a topmod object that only retains the models specified by i

if x is an object of class bma (see bms), x[i] returns a bma object whose topmod object (i.e. x$topmod has been adjusted accordingly)

Note

Note that the method parameter drop is of no importance here. Moreover the corresponding assignment operator [<- is of no use.

Author(s)

Martin Feldkircher and Stefan Zeugner

See Also

[ for the default method, bms for crating bma objects

Check http://bms.zeugner.eu for additional help.

Examples

#sample some BMA
 data(datafls)
 mm=bms(datafls[,1:11])
 
#plotConv for all models 
 plotConv(mm)

#plotConv for the best 20 models 
 plotConv(mm[1:20])

#model binary for the second best model 
topmodels.bma(mm[2])

#similar:
as.vector(mm$topmod[2]$bool_binary())

#exactly the same
as.vector(mm[2]$topmod$bool_binary())


#print stats for second best model
print(mm$topmod[2])





[Package BMS version 0.3.4 Index]