No subject

Troels Ring tring at
Thu Sep 14 22:24:12 CEST 2000

Dear friends.

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
s <- 
to get a p value of 0.0656  and 95% CI of OR of
0.8108857 32.5251110
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[!]
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 ?

Best wishes


r-help mailing list -- Read
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at

More information about the R-help mailing list