coef.bma {BMS}R Documentation

Posterior Inclusion Probabilities and Coefficients from a 'bma' Object


Returns a matrix with aggregate covariate-specific Bayesian model Averaging: posterior inclusion probabilites (PIP), post. exepected values and standard deviations of coefficents, as well as sign probabilites


 ## S3 method for class 'bma'
coef(object, exact = FALSE, = TRUE, include.constant = FALSE, 
    incl.possign = TRUE, std.coefs = FALSE, condi.coef = FALSE, ...) 

 estimates.bma(bmao, exact = FALSE, = TRUE, include.constant = FALSE, 
    incl.possign = TRUE, std.coefs = FALSE, condi.coef = FALSE)


object, bmao

a 'bma' object (cf. bms)


if exact=FALSE, then PIPs, coefficents, etc. will be based on aggregate information from the sampling chain with posterior model distributions based on MCMC frequencies (except in case of enumeration - cf. 'Details');
if exact=TRUE, estimates will be based on the nmodel best models encountered by the sampling chain, with the posterior model distribution based on their exact marginal likelihoods - cf. 'Details' below. orders the resulting matrix according to posteriorr inclusion probabilites, ranks them according to the original data (order of the covariates as in provided in to bms), default TRUE


If include.constant=TRUE then the resulting matrix includes the expected value of the constant in its last row. Default FALSE


If incl.possign=FALSE, then the sign probabilites column (cf. 'Values' below) is omitted from the result. Default TRUE


If std.coefs=TRUE then the expected values and standard deviations are returned in standardized form, i.e. as if the original data all had mean zero and variance 1. If std.coefs=FALSE (default) then both expected values and standard deviations are returned 'as is'.


If condi.coef=FALSE (default) then coefficients β_i and standard deviations are unconditional posterior expected values, as in standard model averaging; if condi.coef=FALSE then they are given as conditional on inclusion (equivalent to β_i / PIP_i).


further arguments for other coef methods


More on the argument exact:
In case the argument exact=TRUE, the PIPs, coefficent statistics and conditional sign probabilities are computed on the basis of the (500) best models the sampling chain encoutered (cf. argument nmodel in bms). Here, the weights for Bayesian model averaging (BMA) are the posterior marginal likelihoods of these best models.
In case exact=FALSE, then these statistics are based on all accepted models (except burn-ins): If mcmc="enumerate" then this are simply all models of the traversed model space, with their marginal likelihoods providing the weights for BMA.
If, however, the bma object bmao was based on an MCMC sampler (e.g. when bms argument mcmc="bd"), then BMA statistics are computed differently: In contrast to above, the weights for BMA are MCMC frequencies, i.e. how often the respective models were encountered by the MCMC sampler. (cf. a comparison of MCMC frequencies and marginal likelihoods for the best models via the function pmp.bma).


A matrix with five columns (or four if incl.possign=FALSE)

Column 'PIP'

Posterior inclusion probabilities ∑ p(γ|i \in γ, Y) / sum p(γ|Y)

Column 'Post Mean'

posterior expected value of coefficients, unconditional E(β|Y)=∑ p(γ|Y) E(β|γ,Y), where E(β_i|γ,i \notin γ, Y)=0 if condi.coef=FALSE, or conditional on inclusion (E(β|Y) / ∑ p(γ|Y, i \in γ) ) if condi.coef=TRUE

Column 'Post SD'

posterior standard deviation of coefficients, unconditional or conditional on inclusion, depending on condi.coef

Column 'Cond.Pos.Sign'

The ratio of how often the coefficients' expected values were positive conditional on inclusion. (over all visited models in case exact=FALSE, over the best models in case exact=TRUE)

Column 'Idx'

the original order of covariates as the were used for sampling. (if included, the constant has index 0)


Martin Feldkircher and Stefan Zeugner

See Also

bms for creating bma objects, pmp.bma for comparing MCMC frequencies and marginal likelihoods.

Check for additional help.


#sample, with keeping the best 200 models:

#standard BMA PIPs and coefficients from the MCMC sampling chain, based on how frequently th emodels were drawn

#standardized coefficents, ordered by index

#coefficents conditional on inclusion:

#same as

#PIPs, coefficients, and signs based on the best 200 models

#... and based on the 50 best models

[Package BMS version 0.3.1 Index]