Skip to content
Prev 4765 / 5632 Next

[R-meta] sd of blups vs tau in RE model

Please see below for my responses.

Best,
Wolfgang
But this is not true as demonstrated with the code I provided.
Please try out what happens when you change k to different values. It has no systematic effect on mean(blups$se^2).
I am a bit confused by your question, as you are not using the BLUPs to compute this; you are using the estimated coefficient and value of tau^2. Also, looking at the proportion larger than 0 isn't the best example because this will be ~50% eithre way. So let's compare:

pnorm(0.1, coef(res), sqrt(res$tau2), lower.tail=FALSE)
mean(blups$pred > 0.1)

As you will see, these are not the same. The latter yields a smaller proportion since the distribution of the BLUPs is not as wide as the estimated distribution of true effects based on the model estimates. We can seee this with:

hist(blups$pred, freq=FALSE, breaks=50)
curve(dnorm(x, coef(res), sqrt(res$tau2)), add=TRUE, lwd=3)