mh_mcmc: mh_mcmc

View source: R/em.R

mh_mcmcR Documentation

mh_mcmc

Description

A Metropolis-Hastings algorithm for drawing measurment errors.

Usage

mh_mcmc(
  startval = 0,
  iters = 500,
  burnin = 100,
  drawsd = sqrt(4),
  betmat,
  m,
  pi,
  mu,
  sig,
  y,
  x,
  tau
)

Arguments

startval

The first value in the markov chain

iters

The total number of measurement error draws to make

burnin

The number of draws to drop

drawsd

Trial values are drawn from N(0, sd=drawsd), default is 4

betmat

LxK matrix of parameter values with L the number of quantiles and K the dimension of the covariates

m

The dimension of the measurement error

pi

The probability of each mixture component (should have length equal to m)

mu

The mean of each mixture component (should have length equal to m)

sig

The standard deviation of each mixture component (should have length equal to m)

y

particular value of y

x

particular value of x

tau

an L-vector of all the quantiles where betas were estimated

Value

vector of draws of measurement error


bcallaway11/qrme documentation built on May 16, 2024, 12:02 p.m.