?? 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 + -