\HeaderA{spatBMS-package}{Bayesian Model Averaging with uncertain Spatial Effects 0.0.0}{spatBMS.Rdash.package}
\aliasA{spatBMS}{spatBMS-package}{spatBMS}
\keyword{package}{spatBMS-package}
\begin{Description}\relax
This package enables Bayesian Model Averaging with uncertain spatial effects data over the classical normal-conjugate model with many prior options and posterior statistics.
\end{Description}
\begin{Details}\relax
\Tabular{ll}{
Package: & spatBMS\\
Type: & Package\\
Version: & 0.0.0\\
Date: & 2010-10-27\\
License: & Artistic 2.0\\
}
The most important function is \code{\LinkA{spatFilt.bms}{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 \code{nmodel} models (cf. \code{\LinkA{spatFilt.bms}{spatFilt.bms}}).

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

The plotting functions \code{\LinkA{plot.bma}{plot.bma}}, \code{\LinkA{image.bma}{image.bma}}, \code{\LinkA{density.bma}{density.bma}}, and \code{\LinkA{gdensity}{gdensity}} are the most important plotting functions (inter alia).

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

The function \code{\LinkA{zlm}{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 \code{\LinkA{f21hyper}{f21hyper}}, \code{\LinkA{hex2bin}{hex2bin}} and \code{\LinkA{fullmodel.ssq}{fullmodel.ssq}} provide addidtional utilities.

Consider the functions \code{\LinkA{topmod}{topmod}} and as well as the internal functions \code{.choose.mprior} and \code{.choose.gprior} for more advanced programming tasks.
\end{Details}
\begin{Author}\relax
Martin Feldkircher 

Maintainer: Martin Feldkircher <bms@zeugner.eu>
\end{Author}
\begin{References}\relax
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
\end{References}
\begin{SeeAlso}\relax
\url{http://bms.zeugner.eu}
\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
  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))           

\end{ExampleCode}
\end{Examples}

