check_CI: Check if zero is within the Credible intervals

Description Usage Arguments Value Note Examples

Description

Check if zero is within the Credible intervals

Usage

1
check_CI(x, prob = 0.95)

Arguments

x

vector holding the parameter draw from a MCMC of a MCMC or HMCMC sampler

probability

quantile for the Creidble interval. Function only support 90 or 95 percent intervals.

Value

a charchter string that indicate whether the effect is signifcant or not

Note

From a Bayesian point of view this a very bad idea... use at your own risk.

Examples

1
2
3
4
5
6
7
foo <- rnorm(1e4, 0.653, 0.192)
check_CI(foo, prob=0.95)
check_CI(bob, prob=0.90)
# apply on a matrix
bar <- matrix(rnorm(1e3*10,0.653, 0.192), ncol=10)
apply(bar, 2, check_CI, prob=0.95)
#END

RoyChristian/startR documentation built on May 9, 2019, 10:34 a.m.