gibbsNormal2: Gibbs sampler for a normal random sample with a conjugate...

Description Usage Arguments Examples

Description

Simulates realisations from the posterior distribution for the mean and precision in a normal distribution based on a random sample and a conjugate normal-gamma prior distribution by using a Gibbs sampler

Usage

1
  gibbsNormal2(N, initial, priorparam, n, xbar, s)

Arguments

N

length of MCMC chain

initial

starting value for the algorithm

priorparam

prior parameters b,c,g,h

n

size of random sample

xbar

mean of random sample

s

standard deviation of random sample

Examples

1
mcmcAnalysis(gibbsNormal2(N=100,initial=c(5.41,25),priorparam=c(5.41,0.25,2.5,0.1),n=23,xbar=5.4848,s=0.1882),rows=2)


Search within the mas3321 package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.