bnpconmediation: Posterior Means and 95% C.I.s of the conditional NIE, NDE and...

Description Usage Arguments Value

View source: R/func_conmediation.R

Description

Obtain posterior means and credible intervals of the effects.

Usage

1
2
3
bnpconmediation(dataTreatment, dataControl, prior, mcmc, state, status = TRUE,
  na.action, q = 2, NN = 10, n1 = 10, n0 = 10, extra.thin = 0,
  cond.values = c(45, 35), col.values = c(1, 2), seed = 12345)

Arguments

dataTreatment

The observed data under Z=1

dataControl

The observed data under Z=0

prior

a list giving the prior information

mcmc

a list giving the MCMC parameters

state

a list giving the current value of the parameters

status

a logical variable indicating whether this run is new (TRUE) or the continuation of a previous analysis (FALSE)

na.action

a function that indicates what should happen when the data contain NAs

q

A dimension of the observed data, i.e., number of covariates plus 2

NN

Number of samples drawn for each iteration from the joint distribution of the mediator and the covariates. Default is 100.

n1

Number of observations under Z=1

n0

Number of observations under Z=0

extra.thin

Giving the extra thinning interval

cond.values

conditional values of the covariates

col.values

columns orders of the conditional covariates among all covariates

seed

Value to be given to the seed

Value

ENIE Posterior mean of the Natural Indirect Effect (NIE)

ENDE Posterior mean of the Natural Direct Effect (NDE)

ETE Posterior mean of the Total Effect (TE)

IE.c.i 95% C.I. of the NIE

DE.c.i 95% C.I. of the NDE

TE.c.i 95% C.I. of the TE

Y11 Posterior samples of Y11

Y00 Posterior samples of Y00

Y10 Posterior samples of Y10


BNPMediation documentation built on July 7, 2017, 9:02 a.m.