mh_mcmc: mh_mcmc

Description Usage Arguments Value

View source: R/em.R

Description

A Metropolis-Hastings algorithm for drawing measurment errors.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
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 June 30, 2021, 12:52 p.m.