[R] mcmcsamp and variance ratios
Douglas Bates
bates at stat.wisc.edu
Thu Jan 4 17:18:06 CET 2007
On 1/3/07, Martin Henry H. Stevens <hstevens at muohio.edu> wrote:
> Hi folks,
> I have assumed that ratios of variance components (Fst and Qst in
> population genetics) could be estimated using the output of mcmcsamp
> (the series on mcmc sample estimates of variance components).
> What I have started to do is to use the matrix output that included
> the log(variances), exponentiate, calculate the relevant ratio, and
> apply either quantile or or HPDinterval to get confidence intervals.
> This seems too simple but I can't think of what is wrong with it.
Why bother exponentiating? I'm not sure what ratios you want but if
they are ratios of two of the variances that are columns of the matrix
then you just need to take the difference of the logarithms. I expect
that the quantiles and HPDintervals would be better behaved, in the
sense of being based on a distribution that is close to symmetric, on
the scale of the logarithm of the ratio instead of the ratio itself.
Quantiles calculated for the logarithm of the ratio will map to
quantiles of the ratio. However, if you really do feel that you must
report an HPDinterval on the ratio then you would need to exponentiate
the logarithm of the ratio before calculating the interval.
Technically the HPD interval of the ratio is not the same as
exponentiating the end points of the HPDinterval of the logarithm of
the ratio but I doubt that the differences would be substantial.
More information about the R-help
mailing list