[R] confidence intervals

Torsten Hothorn Torsten.Hothorn at rzmail.uni-erlangen.de
Wed Jun 12 09:11:08 CEST 2002


> Hello,
> I wonder if anyone has a function for calculating confidence intervals for
> ratios. I have mortality rates calculated for several groups from sample
> data -- but these can be treated as ratios?).  

Do you mean a conficence interval for a ratio parameter (e.g. ratio of
means) or for measurements that are defined as ratios?

In the first case the exp of the t.test conf ints of the log-transformed
data can be used (under the assumption of log-normality):

R> x <- rlnorm(20)
R> y <- rlnorm(20)
R> exp(t.test(log(x),log(y),var.equal=TRUE)$conf.int)
[1] 0.7530694 3.5936215
attr(,"conf.level")
[1] 0.95

(works with wilcox.{test,exact} for the ratio of medians, too).

In the second one, you'll probably have to think about the parameter to
calculate confidence intervals for ...

Torsten

> I am entertaining the idea of
> bootstrapping them.
> Any help would be greatly appreciated.
> TIA, Marwan
> 
> 
> ----------------------------------------------------------------------------
> ------------
> Marwan Khawaja - http://departments.aub.edu.lb/~mk36/  If you have MS
> Internet Explorer!
> ----------------------------------------------------------------------------
> ------------
> 
> -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
> r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
> Send "info", "help", or "[un]subscribe"
> (in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
> _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
> 

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list