Chapter 4

Back to notes on chapter 3

- p. 104: other references of interest for Jensen's Inequality: Schmitt et al. 1999, Welsh et al. 1987
- p. 107: unfortunately y-axis scales don't match in Figure 4.1
- p. 110: McCarthy (2007) (
*Bayesian Methods in Ecology*, CUP, ISBN 0521850576) has a nicer (real-world) forensic example (Box 2.3, p. 42): specifically, covering the case of Sally Clark, two of whose sons died suspiciously — the $p$ value was quoted as 1 in 73 million, but the inference here is inappropriate (McCarthy actually doesn't work out the details of Bayes' Rule here, it would be interesting to do so and find a more appropriate answer given a reasonable prior). Royall (1997) (*Statistical Evidence: A Likelihood Paradigm*, CRC Press) gives a very important real-world example of statistical inference mattering (a treatment that could have saved lives of many infants was not introduced because evidence of its efficacy was thought to be lacking). - p. 111: note that $\mbox{Prob}(3|L_i)$ is not
*supposed*to add to 1.0 - p. 112 clarification of terminology about priors:
- "flat" = completely uninformative (i.e. uniform probability)
- "weak" = diffuse = mostly uninformative

- p. 130 "which means that" = "so" ? (don't remember what I meant here)
- p. 132: I'm not sure that the descriptions of ranges in the bestiary summaries are completely consistent across distributions
- p. 139: (need more refs to hurdle models, pointers to R packages)
- p. 141: (using WinBUGS/multilevel modeling to fit compounded distributions)
- p. 145: a more efficient way to generate a normal mixture distribution:

```
u1 = sample(1:2,replace=TRUE,size=1000,prob=c(0.3,0.7))
## or less transparently but more efficiently:
u1 = as.numeric(runif(1000)<0.3)+1
meanvec = c(1,5)
sdvec = c(2,1)
rnorm(1000,mean=meanvec[u1],sd=sdvec[u1])
```

This avoids picking twice as many normal deviates as necessary. (Unless you were going to do something like this thousands or millions of times, it wouldn't matter — both ways are almost instantaneous on a 21st-century computer.)

- note that R uses default parameters for the Gamma distribution of
`rate`and`shape`(for S-PLUS compatibility, I think) — in my discussion I always use`scale`instead of`rate`. This is really just a matter of taste, and I might switch to the rate parameterization in the future, to shorten (and clarify?) the discussion.

On to chapter 5 notes

page revision: 3, last edited: 28 May 2009 18:45