Learn R Programming

BaM (version 1.0.3)

norm.known.var: norm.known.var

Description

A function to calculate posterior quanties for a normal-normal model with known variance (pages 70-72). It produces the posterior mean, variance, and 95% credible interval for user-specified prior.

Usage

norm.known.var(data.vec,pop.var,prior.mean,prior.var)

Arguments

data.vec

a vector of assumed normally distributed data

pop.var

known population variance

prior.mean

mean of specified prior distribution for mu

prior.var

variance of specified prior distribution for mu

Author

Jeff Gill