Re: [R] Coverage Probability

2012-03-19 Thread hubinho
Thank you very much again. But in this case I get the coverage probability as an average over all values for the odds ratio. I need a coverage probability for every value for the odds ratio. So the coverage probability for odds ratio = 1, than for odds ratio = 2 and so on. Sorry to bother you ag

Re: [R] Coverage Probability

2012-03-19 Thread hubinho
Thank you very much. This was, was i needed. Unfortunately I have one futher problem with this Code. I don't only need the coverage probability for one but for a range of different odds ratios. (for example [1;30]). I tried it with a loop but I get an error. I think again, that I'm almost there but

[R] Coverage Probability

2012-03-19 Thread hubinho
Hello. I'm allready this far. I have a function which is calculating the lower (l) and upper (u) limit for a confidence interval for the odds ratio. For example for 5 simulated 2x2 tables the upper and lower limits are: > u [1] 2.496141 7.436524 8.209161 4.313587 3.318612 > l [1] -0.9718608 1.1

[R] Simulating n 2x2 tables with the same odds ratio

2012-03-09 Thread hubinho
Hello. I'm looking for a method to simulate n different 2x2 tables having all the same odds ratio. For example. I need 100 tables with odds ratio 1 100 tables with odds ratio 2 100 tables with odds ratio 3 and so on. All tables should have the same marginal frequencies. Thank you -- View th