mnormt.twosided: Bayesian test of a two-sided hypothesis about a normal mean

Description Usage Arguments Value Author(s) Examples

Description

Bayesian test that a normal mean is equal to a specified value using a normal prior

Usage

1
mnormt.twosided(m0, prob, t, data)

Arguments

m0

value of the mean to be tested

prob

prior probability of the hypothesis

t

vector of values of the prior standard deviation under the alternative hypothesis

data

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

Value

bf

vector of values of the Bayes factor in support of the null hypothesis

post

vector of posterior probabilities of the null hypothesis

Author(s)

Jim Albert

Examples

1
2
3
4
5
6
7
8
m0=170
prob=.5
tau=c(.5,1,2,4,8)
samplesize=10
samplemean=176
popsd=3
data=c(samplemean,samplesize,popsd)
mnormt.twosided(m0,prob,tau,data)

Example output

$bf
[1] 1.462146e-02 3.897038e-05 1.894326e-07 2.591162e-08 2.309739e-08

$post
[1] 1.441076e-02 3.896887e-05 1.894325e-07 2.591162e-08 2.309739e-08

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