GaussianGaussian: Gaussian-Gaussian hierarchical model

Description Usage Arguments Details Value Author(s) Examples

View source: R/hhsim.R

Description

Simulates from the posterior of a Gaussian-Gaussian model.

Usage

1
2
3
4
5
6
GaussianGaussian(Y,
		sigma2=rep(1,length(Y)),
                 nDraws=100,
                 s1=0.001,s2=0.001,
                 a=0,A=1000,
                 t1=0.001,t2=0.001)

Arguments

Y

a vector of numbers

sigma2

vector of known σ2

nDraws

number of MCMC draws

s1,s2

prior parameters for σ^-2

a,A

mean and variance of the prior for m, the mean of the thetas

t1,t2

prior parameters for τ^-2

Details

No details now.

Value

GaussianGaussian is still being tested.

Author(s)

Greg Ridgeway gridge@sas.upenn.edu

Examples

1
2
3
4
5
6
N <- 50
theta <- rnorm(N,0,1)
Y <- rnorm(N,theta,1)
sigma2 <- rgamma(N,10,rate=10)
niter=100 
GaussianGaussian(Y,sigma2,niter)

gregridgeway/hhsim documentation built on May 17, 2019, 8:36 a.m.