post.var {BMS}R Documentation

Posterior Variance and Deviance

Description

Returns posterior residual variance, deviance, or pseudo R-squared, according to the chosen prior structure

Usage

post.var(object, exact = FALSE, ...)

Arguments

object

A bma object (as produced by bms) or a zlm object.

exact

When exact=FALSE, then deviance will be based on MCMC frequencies, if exact=TRUE then it will be based on
analytical posterior model probabilities - cf. argument exact in coef.bma.

...

further arguments passed to or from other methods

Details

post.var: Posterior residual variance as according to the prior definitions contained in object
post.pr2: A pseudo-R-squared corresponding to unity minus posterior variance over dependent variance.
deviance.bma: returns the deviance of a bma model as returned from bms.
deviance.zlm: returns the deviance of a zlm model.

See Also

bms for creating bma objects and priors, zlm object.

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

Examples


 data(datafls)
  
 mm=bms(datafls[,1:10])
 deviance(mm)/nrow(datafls) # is equivalent to
 post.var(mm)
 
 post.pr2(mm) # is equivalent to
 1 - post.var(mm) / ( var(datafls[,1])*(1-1/nrow(datafls)) )
 

[Package BMS version 0.3.5 Index]