📄 schools_model.txt.svn-base
字号:
# Bugs model file for 8 schools analysis from Section 5.5 of "Bayesian Data
# Analysis". Save this into the file "schools.bug" in your R working directory.
model {
for (j in 1:J){ # J=8, the number of schools
y[j] ~ dnorm (theta[j], tau.y[j]) # data model: the likelihood
tau.y[j] <- pow(sigma.y[j], -2) # tau = 1/sigma^2
}
for (j in 1:J){
theta[j] ~ dnorm (mu.theta, tau.theta) # hierarchical model for theta
}
tau.theta <- pow(sigma.theta, -2) # tau = 1/sigma^2
mu.theta ~ dnorm (0.0, 1.0E-6) # noninformative prior on mu
sigma.theta ~ dunif (0, 1000) # noninformative prior on sigma
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -