calcRegCoeffs: Calculates Posterior Expectations, Standard Deviations and...

Description Usage Arguments Value Note Author(s) References See Also Examples

View source: R/calcRegCoeffs.R

Description

Calculates posterior expectations, standard deviations and (optional) highest probability density (HPD) intervals for the multinomial logit (MNL) regression coefficients (using boa.hpd from package boa) and also offers some other analyses like plotting paths and autocorrelation functions (ACFs) for the corresponding MCMC draws.

Usage

1
2
3
calcRegCoeffs(outList, hBase = 1, thin = 1, M0 = outList$Mcmc$M0, 
              grLabels = paste("Group", 1:outList$Prior$H), 
              printHPD = TRUE, plotPaths = TRUE, plotACFs = TRUE)

Arguments

outList

specifies a list containing the outcome (return value) of an MCMC run of mcClustExtended, dmClustExtended or MNLAuxMix.

hBase

specifies the cluster/group which should serve as baseline cluster/group.

thin

An integer specifying the thinning parameter (default is 1).

M0

specifies the number of the first MCMC draw after burn-in (default is outList$Mcmc$M0).

grLabels

A character vector giving user-specified names for the clusters/groups.

printHPD

If TRUE (default) a LaTeX-style table containing the highest probability density (HPD) intervals for each MNL regression coefficient is calculated (using boa.hpd from package boa) and also printed.

plotPaths

If TRUE (default) the paths of the MCMC draws of the MNL regression coefficients are drawn for each cluster/group (without thinning).

plotACFs

If TRUE (default) the autocorrelation function (ACF) for the MCMC draws of the regression coefficients are drawn for each cluster/group (with thinning and burn-in discarded).

Value

A list containing:

[[h]], h=1,..,H

A matrix containing posterior expectation ("Post Exp"), standard deviation ("Post Sd") and HPD interval ("HPD Lower B", "HPD Upper B") for the MNL regression coefficients in cluster/group h except for the baseline cluster/group.

regCoeffsAll

A matrix containing posterior expectation ("Post Exp") and (in parenthesis) standard deviation ("Post Sd") for the MNL regression coefficients for all clusters/groups.

Note

Note, that in contrast to the literature (see References), the numbering (labelling) of the states of the categorical outcome variable (time series) in this package is sometimes 0,...,K (instead of 1,...,K), however, there are K+1 categories (states)!

Author(s)

Christoph Pamminger <christoph.pamminger@gmail.com>

References

Sylvia Fruehwirth-Schnatter, Christoph Pamminger, Andrea Weber and Rudolf Winter-Ebmer, (2011), "Labor market entry and earnings dynamics: Bayesian inference using mixtures-of-experts Markov chain clustering". Journal of Applied Econometrics. DOI: 10.1002/jae.1249 http://onlinelibrary.wiley.com/doi/10.1002/jae.1249/abstract

Christoph Pamminger and Sylvia Fruehwirth-Schnatter, (2010), "Model-based Clustering of Categorical Time Series". Bayesian Analysis, Vol. 5, No. 2, pp. 345-368. DOI: 10.1214/10-BA606 http://ba.stat.cmu.edu/journal/2010/vol05/issue02/pamminger.pdf

See Also

boa.hpd, acf, mcClustExtended, dmClustExtended, MNLAuxMix

Examples

1
2
# please run the examples in mcClustExtended, dmClustExtended and 
# MNLAuxMix

bayesMCClust documentation built on May 29, 2017, 3:31 p.m.