beta.draws.bma {BMS}R Documentation

Coefficients of the Best Models

Description

Returns a matrix whose columns are the (expected value or standard deviations of) coefficients for the best models in a bma object.

Usage

beta.draws.bma(bmao, stdev = FALSE)

Arguments

bmao

a 'bma' object (as e.g. resulting from bms)

stdev

if stdev=FALSE then beta.draws.bma returns the (conditional) posterior expected values of the coefficients (i.e. 'Bayesian coefficients'). If stdev=TRUE it returns their posterior standard deviations.

Value

Each column presents the coefficients for the model indicated by its column name. The zero coefficients are the excluded covariates per model. Note that the coefficients returned are only those of the best (100) models encountered by the bma object (cf. argument nmodels of bms).

For aggregate coefficients please refer to coef.bma.

Note

Note that the elements of beta.draws.bma(bmao) correspond to bmao$topmod$betas()

See Also

bms for creating bms objects, coef.bma for aggregate coefficients

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

Examples



  #sample a bma object:
  data(datafls)
  mm=bms(datafls,burn=500,iter=5000,nmodel=20)
  
  #coefficients for all
  beta.draws.bma(mm) 
  
  #standard deviations for the fourth- to eight best models
  beta.draws.bma(mm[4:8],TRUE); 


[Package BMS version 0.3.5 Index]