print.topmod {BMS}R Documentation

Printing topmod Objects

Description

Print method for objects of class 'topmod', typically the best models stored in a 'bma' object

Usage

## S3 method for class 'topmod'
print(x, ...)

Arguments

x

an object of class 'topmod' - see topmod

...

additional arguments passed to link{print}

Details

See pmp.bma for an explanation of likelihood vs. MCMC frequency concepts

Value

if x contains more than one model, then the function returns a 2-column matrix:

Row Names

show the model binaries in hexcode

Column 'Marg.Log.Lik'

shows the marginal log-likelihoods of the models in x

Column 'MCMC Freq'

shows the MCMC frequencies of the models in x

if x contains only one model, then more detailed information is shown for this model:

first line

'Model Index' provides the model binary in hexcode, 'Marg.Log.Lik' its marginal log likelhood, 'Sampled Freq.' how often it was accepted (function ncount() in topmod)

Estimates

first column: covariate indices included in the model, second column: posterior expected value of the coefficients, third column: their posterior standard deviations (excluded if no coefficients were stored in the topmod object - cf. argument bbeta in topmod)

Included Covariates

the model binary

Additional Statistics

any custom additional statistics saved with the model

See Also

topmod for creating topmod objects, bms for their typical use, pmp.bma for comparing posterior model probabilities

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

Examples


# do some small-scale BMA for demonstration
data(datafls)
mm=bms(datafls[,1:10],nmodel=20)

#print info on the best 20 models
print(mm$topmod)
print(mm$topmod,digits=10)

#equivalent:
cbind(mm$topmod$lik(),mm$topmod$ncount())



#now print info only for the second-best model:
print(mm$topmod[2])

#compare 'Included Covariates' to:
topmodels.bma(mm[2])

#and to
as.vector(mm$topmod[2]$bool_binary())



[Package BMS version 0.3.5 Index]