rbiNormGibbs {bayesm} | R Documentation

## Illustrate Bivariate Normal Gibbs Sampler

### Description

`rbiNormGibbs` implements a Gibbs Sampler for the bivariate normal distribution. Intermediate moves are shown and the output is contrasted with the iid sampler. i This function is designed for illustrative/teaching purposes.

### Usage

    rbiNormGibbs(initx = 2, inity = -2, rho, burnin = 100, R = 500)

### Arguments

`initx` | initial value of parameter on x axis (def: 2)
`inity` | initial value of parameter on y axis (def: -2)
`rho` | correlation for bivariate normals
`burnin` | burn-in number of draws (def:100)
`R` | number of MCMC draws (def:500)

### Details

(theta1,theta2) ~ N((0,0), Sigma=matrix(c(1,rho,rho,1),ncol=2))

### Value

R x 2 array of draws

### Author(s)

Peter Rossi, Graduate School of Business, University of Chicago, Peter.Rossi@ChicagoGsb.edu.

### References

For further discussion, see Bayesian Statistics and Marketing by Rossi, Allenby and McCulloch, Chapters 2 and 3.
http://gsbwww.uchicago.edu/fac/peter.rossi/research/bsm.html

### Examples

    ##
    ## Not run:  out=rbiNormGibbs(rho=.95)

[Package bayesm version 2.0-8 Index]