Highest posterior probability model

Share:

Description

This function finds the highest posterior probability (HPP) model, which corresponds to the indicator matrix most often visited by the sampler across MCMC iterations.

Usage

1
HPPmodel(mcmc)

Arguments

mcmc

Object of class 'befa'.

Details

The HPP model can only be found if identification with respect to column switching has been restored a posteriori. An error message is returned if this is not the case.

A warning is issued if the HPP model found is not unique.

Value

The function returns an object of class 'hppm.befa' containing:

  • draws: Posterior draws of model parameters corresponding to the HPP model.

  • dedic: Vector of indicators of the the HPP model.

  • prob: Posterior probability of the HPP model.

Author(s)

RĂ©mi Piatek remi.piatek@econ.ku.dk

See Also

post.column.switch

Examples

1
2
3
4
5
6
7
set.seed(6)
Y <- simul.dedic.facmod(N = 200, dedic = rep(1:3, each = 5))
mcmc <- befa(Y, Kmax = 5, iter = 1000)
mcmc <- post.column.switch(mcmc)
hppm <- HPPmodel(mcmc)
hppm$prob
hppm$dedic