1 | model.norm.obs(nobs, Covs, prior, path)
|
nobs |
|
Covs |
|
prior |
|
path |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | ##---- Should be DIRECTLY executable !! ----
##-- ==> Define data, use random,
##-- or do help(data=index) for the standard data sets.
## The function is currently defined as
function (nobs, Covs, prior, path)
{
cat("\n for (i in 1:", nobs, ") {\n mu[i] <- alpha + beta*Treat[i]\n Y[i] ~ dnorm(mu[i],prec)\n }",
file = paste(path, "model.txt", sep = ""), append = T,
sep = "")
cat("\n alpha ~ ", prior$Prior.alpha, file = paste(path,
"model.txt", sep = ""), append = T, sep = "")
cat("\n beta ~ ", prior$Prior.beta, file = paste(path,
"model.txt", sep = ""), append = T, sep = "")
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.