[.bma {BMS} | R Documentation |
returns a bma (or topmod) object whose
## S3 method for class 'bma' x[i, ...] ## S3 method for class 'topmod' x[i, ...]
x |
an object of class 'bma' or of class |
i |
index of the best models to be retained |
... |
arguments such as 'drop' will not have an effect |
Both functions are equivalent: they serve to select a subset of the best models in a bma object.
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 that the method parameter drop
is of no importance here. Moreover the corresponding assignment operator [<-
is of no use.
Martin Feldkircher and Stefan Zeugner
[
for the default method, bms
for crating bma objects
Check http://bms.zeugner.eu for additional help.
#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])