em.algo.inner: Inner part of EM-algorithm for QR with measurement error

Description Usage Arguments Value

View source: R/em.R

Description

Does the heavy-lifting of the EM-algorithm for QR with measurment error

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
em.algo.inner(
  formla,
  data,
  betmat,
  tau,
  m = 1,
  pi = 1,
  mu = 0,
  sig = 1,
  simstep = "MH",
  iters = 400,
  burnin = 200,
  drawsd = 4,
  cl = 1,
  messages = FALSE
)

Arguments

formla

y ~ x

data

a data.frame that contains y and x

betmat

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

tau

An L-vector indicating which quantiles have been estimated

m

The number of components of the mixture distribution for 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)

simstep

Whether to use MH in EM algorithm or importance sampling in EM algorithm. "MH" for MH, and "ImpSamp" for importance sampling. Default is MH.

iters

How many iterations to use in the simulation step (default is 400)

burnin

How many iterations to drop in the simulation step (default is 200)

drawsd

The starting standard deviation for the measurement error term.

cl

The numbe of clusters to use for parallel computation (default is 1 so that computation is not done in parallel)

messages

Whether or not to report details of estimation procedure (default is FALSE)

Value

A list of QR parameters and parameters for mixture of normals for the measurement error term


bcallaway11/qrme documentation built on June 30, 2021, 12:52 p.m.