spatBMS-package {spatBMS}R Documentation

Bayesian Model Averaging with uncertain Spatial Effects 0.0.0

Description

This package enables Bayesian Model Averaging with uncertain spatial effects data over the classical normal-conjugate model with many prior options and posterior statistics.

Details

Package: spatBMS
Type: Package
Version: 0.0.0
Date: 2010-10-27
License: Artistic 2.0

The most important function is spatFilt.bms to perform bayesian model sampling augmented with extracted eigenvectors of different underlying spatial weight matrices.
It basically offers to sample data according to different g-priors and model priors, and leaves the choice of different samplers (MCMC samplers and interaction samplers).
The results provide analysis into models according to MCMC frequencies, and according to the posterior likelihood of the best nmodel models (cf. spatFilt.bms).

All functions that come with the bms package are still applicable. The functions coef.bma and summary.bma summarize the most important results.

The plotting functions plot.bma, image.bma, density.bma, and gdensity are the most important plotting functions (inter alia).

Moreover there are other functions for posterior results, such as beta.draws.bma, pmp.bma, and topmodels.bma, while c.bma helps to combine and parallelize sampling chains.

The function zlm estimates a Bayesian linear regression under Zellner's g prior, i.e. estimating a particular model without taking model uncertainty into account.

Finally, the small-scale functions f21hyper, hex2bin and fullmodel.ssq provide addidtional utilities.

Consider the functions topmod and as well as the internal functions .choose.mprior and .choose.gprior for more advanced programming tasks.

Author(s)

Martin Feldkircher

Maintainer: Martin Feldkircher <bms@zeugner.eu>

References

Crespo Cuaresma, Jesus and M. Feldkircher (2010): Spatial Filtering, Model Uncertainty and the Speed of Income Convergence in Europe. Working Papers 160, Oesterreichische Nationalbank.

Feldkircher, M. and S. Zeugner (2009): Benchmark Priors Revisited: On Adaptive Shrinkage and the Supermodel Effect in Bayesian Model Averaging; IMF Working Paper 09-202

See Also

http://bms.zeugner.eu

Examples

  library(BMS)
  data(dataBoston); data(WL.boston)
  # estimating a standard MC3 chain 
  bma1=spatFilt.bms(X.data=dataBoston,WList=WL.boston,burn=1e05,iter=1e05,
              nmodel=100,mcmc="bd",g="bric",mprior="random",mprior.size=(ncol(dataBoston)-1)/2)
  
  estimates.bma(bma1)            
  coef(bma1,exact=TRUE, std.coefs=TRUE) #standard coefficients based on exact likelihoods of the 100 best models
  # look at posterior inclusion probabilities of weight matrices
  pmpW.bma(bma1)
  
  # test for remaining spatial residual autocorrelation
  library(spdep)
  data(boston.soi)
  moran=moranTest.bma(bma1,W=nb2listw(boston.soi))           


[Package spatBMS version 0.0 Index]