# Re: [R] mcmcsamp and variance ratios

From: Douglas Bates <bates_at_stat.wisc.edu>
Date: Thu 04 Jan 2007 - 16:18:06 GMT

On 1/3/07, Martin Henry H. Stevens <hstevens@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.

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.

R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Fri Jan 05 03:24:36 2007

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Thu 04 Jan 2007 - 19:31:36 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.