AiEvalmcmc {aihuman}R Documentation

Gibbs sampler for the main analysis

Description

See Appendix S5 for more details.

Usage

AiEvalmcmc(
  data,
  rho = 0,
  Sigma0.beta.inv = NULL,
  Sigma0.alpha.inv = NULL,
  sigma0 = NULL,
  beta = NULL,
  alpha = NULL,
  theta = NULL,
  delta = NULL,
  n.mcmc = 5 * 10,
  verbose = FALSE,
  out.length = 10,
  beta.zx.off = FALSE,
  theta.z.off = FALSE
)

Arguments

data

A data.frame or matrix of which columns consists of pre-treatment covariates, a binary treatment (Z), an ordinal decision (D), and an outcome variable (Y). The column names of the latter three should be specified as "Z", "D", and "Y" respectively.

rho

A sensitivity parameter. The default is 0 which implies the unconfoundedness assumption (Assumption 4).

Sigma0.beta.inv

Inverse of the prior covariance matrix of beta. The default is a diagonal matrix with 0.01 diagonal entries.

Sigma0.alpha.inv

Inverse of the prior covariance matrix of alpha. The default is a diagonal matrix with 0.01 diagonal entries.

sigma0

Prior variance of the cutoff points (theta and delta)

beta

Initial value for beta.

alpha

Initial value for alpha.

theta

Initial value for theta.

delta

Initial value for delta.

n.mcmc

The total number of MCMC iterations. The default is 50.

verbose

A logical argument specified to print the progress on the screen. The default is FALSE.

out.length

An integer to specify the progress on the screen. If verbose = TRUE, every out.length-th iteration is printed on the screen. The default is 10.

beta.zx.off

A logical argument specified to exclude the interaction terms (Z by X) from the model. The default is FALSE.

theta.z.off

A logical argument specified to set same cutoffs theta for treatment and control group. The default is FALSE.

Value

An object of class mcmc containing the posterior samples.

Examples

data(synth)
sample_mcmc = AiEvalmcmc(data = synth, n.mcmc = 2)


[Package aihuman version 0.1.0 Index]