post.conj.norm.norm: Compute normal conjugate posterior

Description Usage Arguments Value Examples

Description

Given a sample of data from a normal distribution with known variance / standard deviation, and a normal prior for the expectation of the data, compute the parameters of the posterior for the expectation.

Usage

1
post.conj.norm.norm(z, known.sd, prior.mean, prior.sd)

Arguments

z

A numeric vector (assumed to be drawn from a normal distribution with known variance / standard deviation)

known.sd

The known standard deviation of the data distribution.

prior.mean

The expectation of the normal prior.

prior.sd

The standard devation of the normal prior.

Value

A list containing the mean and standard deviation of the conjugate posterior distribution.

Examples

1
post.conj.norm.norm(rnorm(100), 1, 2, 4)

mdedge/stfspack documentation built on May 9, 2019, 8:17 a.m.