tests/simple.model.r

NR <- 100
NC <- 2
b <- normal(rnorm(NC),mu=0,tau=0.001)
X <- matrix(rnorm(NR * NC),NR,NC)
tau.y <- uniform(rnorm(1),0,100)

y.hat <- function() {
    X %*% b
}

y <- normal(rnorm(NR),observed=TRUE,mu=y.hat,tau=tau.y)

run.model(list(b,tau.y,y.hat,y), iterations=1e4, burn=1e3, adapt=1e3, thin=10)
armstrtw/rcppbugs documentation built on June 3, 2017, 10:03 p.m.