[.bma {BMS} | R Documentation |
returns a bma (or topmod) object whose
## S3 method for class 'bma' bmao[idx] ## S3 method for class 'topmod' tm[idx]
bmao |
an object of class 'bma' |
idx |
index of the best models to be retained |
tm |
an object of class |
Both funtions are equivalent: they serve to select a subset of the best models in a bma object.
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 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])