| pmpW.bma {spatBMS} | R Documentation |
Returns the posterior models probabilites based on the best models encountered by a 'bma' object
pmpW.bma(object)
object |
A spatial filtering bma object see argument nmodel in spatFilt.bms) |
A call to bms with an MCMC sampler (e.g. spatFilt.bms(datafls,mcmc="bd",nmodel=100) uses a Metropolis-Hastings algorithm to sample through the model space - and the frequency of how often models are drawn converges to the distribution of their posterior marginal likelihoods.
While sampling, each 'bma' object stores the best models encountered by its sampling chain with their marginal likelihood and their MCMC frequencies.
pmp.bma then allows for comparing the posterior model probabilities (PMPs) for the two different methods, similar to plotConv.
It calculates the PMPs based on marginal likelihoods (first column) and the PMPs based on MCMC frequencies (second column) for the best x models stored in the bma object.
The correlation of the two columns is an indicator of how well the MCMC sampler has converged to the actual PMP distribution - it is therefore also given in the output of summary.bma.
The second column thus shows the PMPs of the best models relative to all models the call to bms has sampled through (therefore typically the second column adds up to less than one).
However, the first column only relates to the likelihoods of the best models, therefore it adds up to 1. (the marginal likelihoods for the models not retained in the best models cannot be known).
the result is a matrix with rownames corresponding to the names of the weight matrices
There are two columns in the matrix:
PMP (Exact) |
posterior model probabilities based on the posterior likelihoods of the best models in object, relative to all 'best' models |
PMP (MCMC) |
posterior model probabilities of the best models in object based on their MCMC frequencies, relative to all models encountered by object - see 'Details' |
Martin Feldkircher
spatFilt.bms for sampling bma objects
Check http://bms.zeugner.eu for additional help.
# sample BMA for boston housing data MCMC sampler data(dataBoston); data(WL.boston) bma1=spatFilt.bms(X.data=dataBoston,WList=WL.boston,burn=1e04,iter=1e04,nmodel=100) pmpW.bma(bma1)