mnormt.onesided: Bayesian test of one-sided hypothesis about a normal mean

Description Usage Arguments Value Author(s) Examples

Description

Computes a Bayesian test of the hypothesis that a normal mean is less than or equal to a specified value

Usage

1
mnormt.onesided(m0,normpar,data)

Arguments

m0

value of the normal mean to be tested

normpar

vector of mean and standard deviation of the normal prior distribution

data

vector of sample mean, sample size, and known value of the population standard deviation

Value

BF

Bayes factor in support of the null hypothesis

prior.odds

prior odds of the null hypothesis

post.odds

posterior odds of the null hypothesis

postH

posterior probability of the null hypothesis

Author(s)

Jim Albert

Examples

1
2
3
4
5
6
y=c(182,172,173,176,176,180,173,174,179,175)
pop.s=3
data=c(mean(y),length(data),pop.s)
m0=175
normpar=c(170,1000)
mnormt.onesided(m0,normpar,data)

Example output

$BF
[1] 0.5812546

$prior.odds
[1] 1.008011

$post.odds
[1] 0.5859109

$postH
[1] 0.3694476

LearnBayes documentation built on May 1, 2019, 7:03 p.m.