Skip to content

Commit 1aba68a

Browse files
committed
fixed typo in 12.3 ARM
1 parent 88bbf51 commit 1aba68a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ARM/Ch.12/12.3_PartialPoolingWithPredictors.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,10 @@ radon_no_pool.sf1 <- stan(file='radon_no_pool.stan', data=dataList.2,
4545
iter=1000, chains=4)
4646
print(radon_no_pool.sf1)
4747
post.unpooled <- extract(radon_no_pool.sf1)
48-
unpooled <- colMeans(post.unpooled$factor)
48+
unpooled <- colMeans(post.unpooled$a)
4949
sd.unpooled <- rep(NA,85)
5050
for (n in 1:85) {
51-
sd.unpooled[n] <- sd(post.unpooled$factor[,n])
51+
sd.unpooled[n] <- sd(post.unpooled$a[,n])
5252
}
5353

5454
## Comparing-complete pooling & no-pooling (Figure 12.2)

0 commit comments

Comments
 (0)