[.bma {BMS}R Documentation

Extract Parts of a topmod Object

Description

returns a bma (or topmod) object whose

Usage

## S3 method for class 'bma'
bmao[idx]

## S3 method for class 'topmod'
tm[idx]

Arguments

bmao

an object of class 'bma'

idx

index of the best models to be retained

tm

an object of class topmod'

Details

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

Value

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

if bmao is an object of class bma (see bms), bmao[i] returns a bma object whose topmod object (i.e. bmao$topmod has beeen 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.1 Index]