tring at mail1.stofanet.dk
Thu Sep 14 22:24:12 CEST 2000
I wanted to get an impression of the odds ratio of two treatments:
1) 11 survival 4 deaths
2) 5 survival 9 deaths
I know I could use
to get a p value of 0.0656 and 95% CI of OR of
but wanted instead a bayesian estimate using prior beta(1,1) for both
I came up with
x1 <- seq(0,1,by=0.01)
x2 <- seq(0,1,by=0.01)
post1 <- dbeta(x1,12,5)
post2 <- dbeta(x2,6,10)
ORR <- (post1/(1-post1))/(post2/(1-post2))
ORR <- ORR[!is.na(ORR)]
but this did not behave well at all.
I thought I would get about the same mean for OR (4.656126) as with Fisher
test - but not at all.
How can I sample from the distribution of the OR in a proper way ?
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