Description Usage Arguments Details Value Author(s) Examples
Simulates from the posterior of a Gaussian-Gaussian model.
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)
|
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 |
No details now.
GaussianGaussian
is still being tested.
Greg Ridgeway gridge@sas.upenn.edu
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.