Learn R Programming

MCMCpack (version 1.7-1)

Markov Chain Monte Carlo (MCMC) Package

Description

Contains functions to perform Bayesian inference using posterior simulation for a number of statistical models. Most simulation is done in compiled C++ written in the Scythe Statistical Library Version 1.0.3. All models return 'coda' mcmc objects that can then be summarized using the 'coda' package. Some useful utility functions such as density functions, pseudo-random number generators for statistical distributions, a general purpose Metropolis sampling algorithm, and tools for visualization are provided.

Copy Link

Version

Install

install.packages('MCMCpack')

Monthly Downloads

22,345

Version

1.7-1

License

GPL-3

Maintainer

Last Published

August 27th, 2024

Functions in MCMCpack (1.7-1)

InvWishart

The Inverse Wishart Distribution
HDPHMMnegbin

Markov Chain Monte Carlo for sticky HDP-HMM with a Negative Binomial outcome distribution
InvGamma

The Inverse Gamma Distribution
MCMCfactanal

Markov Chain Monte Carlo for Normal Theory Factor Analysis Model
MCMCSVDreg

Markov Chain Monte Carlo for SVD Regression
MCMCbinaryChange

Markov Chain Monte Carlo for a Binary Multiple Changepoint Model
MCMChierEI

Markov Chain Monte Carlo for Wakefield's Hierarchial Ecological Inference Model
MCMCdynamicEI

Markov Chain Monte Carlo for Quinn's Dynamic Ecological Inference Model
MCMCdynamicIRT1d_b

Markov Chain Monte Carlo for Dynamic One Dimensional Item Response Theory Model
MCMCirt1d

Markov Chain Monte Carlo for One Dimensional Item Response Theory Model
HMMpanelFE

Markov Chain Monte Carlo for the Hidden Markov Fixed-effects Model
MCMChregress

Markov Chain Monte Carlo for the Hierarchical Gaussian Linear Regression Model
HMMpanelRE

Markov Chain Monte Carlo for the Hidden Markov Random-effects Model
MCMChlogit

Markov Chain Monte Carlo for the Hierarchical Binomial Linear Regression Model using the logit link function
MCMChpoisson

Markov Chain Monte Carlo for the Hierarchical Poisson Linear Regression Model using the log link function
MCMCirtHier1d

Markov Chain Monte Carlo for Hierarchical One Dimensional Item Response Theory Model, Covariates Predicting Latent Ideal Point (Ability)
MCMCirtKdRob

Markov Chain Monte Carlo for Robust K-Dimensional Item Response Theory Model
MCMCoprobit

Markov Chain Monte Carlo for Ordered Probit Regression
MCMCnegbinChange

Markov Chain Monte Carlo for Negative Binomial Regression Changepoint Model
MCMCmnl

Markov Chain Monte Carlo for Multinomial Logistic Regression
MCMCmetrop1R

Metropolis Sampling from User-Written R function
MCMCmixfactanal

Markov Chain Monte Carlo for Mixed Data Factor Analysis Model
MCMCirtKd

Markov Chain Monte Carlo for K-Dimensional Item Response Theory Model
MCMCnegbin

Markov Chain Monte Carlo for Negative Binomial Regression
MCMClogit

Markov Chain Monte Carlo for Logistic Regression
MCMCprobit

Markov Chain Monte Carlo for Probit Regression
MCMCpaircompare2dDP

Markov Chain Monte Carlo for the Two-Dimensional Pairwise Comparisons Model with Dirichlet Process Prior in Yu and Quinn (2021)
MCMCpoissonChange

Markov Chain Monte Carlo for a Poisson Regression Changepoint Model
MCMCquantreg

Bayesian quantile regression using Gibbs sampling
MCMCordfactanal

Markov Chain Monte Carlo for Ordinal Data Factor Analysis Model
MCMCpaircompare2d

Markov Chain Monte Carlo for the Two-Dimensional Pairwise Comparisons Model in Yu and Quinn (2021)
MCMCprobitChange

Markov Chain Monte Carlo for a linear Gaussian Multiple Changepoint Model
MCMCoprobitChange

Markov Chain Monte Carlo for Ordered Probit Changepoint Regression Model
MCMCpaircompare

Markov Chain Monte Carlo for a Pairwise Comparisons Model with Probit Link
MCMCpoisson

Markov Chain Monte Carlo for Poisson Regression
MCbinomialbeta

Monte Carlo Simulation from a Binomial Likelihood with a Beta Prior
MCmultinomdirichlet

Monte Carlo Simulation from a Multinomial Likelihood with a Dirichlet Prior
MCpoissongamma

Monte Carlo Simulation from a Poisson Likelihood with a Gamma Prior
MCMCregress

Markov Chain Monte Carlo for Gaussian Linear Regression
Nethvote

Dutch Voting Behavior in 1989
NoncenHypergeom

The Noncentral Hypergeometric Distribution
MCMCtobit

Markov Chain Monte Carlo for Gaussian Linear Regression with a Censored Dependent Variable
MCMCregressChange

Markov Chain Monte Carlo for a linear Gaussian Multiple Changepoint Model
MCMCresidualBreakAnalysis

Break Analysis of Univariate Time Series using Markov Chain Monte Carlo
make.breaklist

Vector of break numbers
dtomogplot

Dynamic Tomography Plot
PostProbMod

Calculate Posterior Probability of Model
MCnormalnormal

Monte Carlo Simulation from a Normal Likelihood (with known variance) with a Normal Prior
PErisk

Political Economic Risk Data from 62 Countries in 1987
Rehnquist

U.S. Supreme Court Vote Matrix, Rehnquist Court (1994-2004)
Senate

106th U.S. Senate Roll Call Vote Matrix
SupremeCourt

U.S. Supreme Court Vote Matrix
summaryqrssvs

Summarising the results of quantile regression stochastic search variable selection (QR-SSVS).
read.Scythe

Read a Matrix from a File written by Scythe
Wishart

The Wishart Distribution
testpanelSubjectBreak

A Test for the Subject-level Break using a Unitivariate Linear Regression Model with Breaks
mptable

Calculate the marginal posterior probabilities of predictors being included in a quantile regression model.
choicevar

Handle Choice-Specific Covariates in Multinomial Choice Models
plotChangepoint

Posterior Density of Regime Change Plot
testpanelGroupBreak

A Test for the Group-level Break using a Multivariate Linear Regression Model with Breaks
plot.qrssvs

Plot output from quantile regression stochastic search variable selection (QR-SSVS).
SSVSquantreg

Stochastic search variable selection for quantile regression
plotState

Changepoint State Plot
vech

Extract Lower Triangular Elements from a Symmetric Matrix
plotHDPChangepoint

Posterior Changepoint Probabilities from HDP-HMM
write.Scythe

Write a Matrix to a File to be Read by Scythe
procrustes

Procrustes Transformation
xpnd

Expand a Vector into a Symmetric Matrix
topmodels

Shows an ordered list of the most frequently visited models sampled during quantile regression stochastic search variable selection (QR-SSVS).
tomogplot

Tomography Plot
Dirichlet

The Dirichlet Distribution
HDPHSMMnegbin

Markov Chain Monte Carlo for HDP-HSMM with a Negative Binomial outcome distribution
Euro2016

Euro 2016 data
BayesFactor

Create an object of class BayesFactor from MCMCpack output
HDPHMMpoisson

Markov Chain Monte Carlo for sticky HDP-HMM with a Poisson outcome distribution