if (FALSE) {
set.seed(1)
n <- 100
X <- as.matrix(cbind(1, rnorm(n)))
B <- as.matrix(c(1,5))
tau.sq <- 0.1
y <- rnorm(n, X%*%B, sqrt(tau.sq))
lm.obj <- lm(y ~ X-1)
summary(lm.obj)
##Now with bayesLMRef
n.samples <- 500
m.1 <- bayesLMRef(lm.obj, n.samples)
summary(m.1$p.beta.tauSq.samples)
}
Run the code above in your browser using DataLab