## Not run:
# # simulate mediational data
# a <- .5
# b <- .6
# t_prime <- .3
#
# X <- rnorm(50,0,1)
# M <- a*X + rnorm(50,0,1)
# Y <- t_prime*X + b*M + rnorm(50,0,1)
#
# # run jzs_med
# res <- jzs_med(independent=X,dependent=Y,mediator=M)
#
# # plot posterior distribution of a*b
# plot(res$ab_samples)
#
# # print the exact lower and upper boundary of the interval
# res$CI_ab
# ## End(Not run)
Run the code above in your browser using DataLab