This function generates the outcomes using Gibbs sampling under the given treatment assignment and edge information.
chaingibbs(
pars,
n.obs,
treatment,
covariates,
initprob = 0.5,
yvalues = c(0, 1),
Neighborind,
Neighborpar,
n.burn
)a set of parameters
the number of Gibbs samples.
a set of given treatment assignment of length m.
given confounder(s):
NULL: no confounder.
a vector of length m: under unique confounder.
a [q x m] matrix: a set of q different confounders.
an initial probability generating outcomes. Defaults to initprob = 0.5
distinct binary values for outcomes. Defaults to (0,1).
a list of matrix specifying edge information of which first column illustrates a type of variables (1:outcome, 2:treatment, 3~:confounders) and of which second column presents the index of those variable.
index for parameters in the order of Neighborind.
the number of burn-in sample in Gibbs sampling (\(\ge\) n.obs).
a [n.obs x m] matrix each row of which consists of outcomes.