Re: [R] power 2x3 exact test

From: Ted Harding <ted.harding_at_nessie.mcc.ac.uk>
Date: Thu, 10 May 2007 18:01:28 +0100 (BST)


On 10-May-07 15:07:10, Thomas Lumley wrote:

> On Thu, 10 May 2007, ted.harding_at_nessie.mcc.ac.uk wrote:

>>
>> Given that you expect some cells to be small, it should not
>> be a severe task to draw up a list of (a1,b1) values which
>> correspond to rejection of the null hypothesis (that both
>> ORs equal 1), and then the simulation using different values
>> of the two odds-ratios will give you the power for each such
>> pair of odds-ratios.
>>
>> The main technical difficulty will be simulation of random
>> tables, conditional on the marginals, with the probabilities
>> as given above.
>>
>> I don't know of a good suggestion for this.
>
> r2dtable().

Thanks for pointing this out! (And if I had astutely done help.search("marginal") I would have found it).

> If this is a power calculation, though, you probably want to > fix only one margin, which is a much simpler problem,

That is probably a fair point (real-life situations where both margins are objectively fixed are probably sparse, to the point where it may almost be worth collecting them as an "exhibition").

But then Bingshan Li is faced with the issue that the power (given the odds-ratio) is then dependent on one of the cell probabilities as a "nuisance parameter". This of course can be eliminated by conditioning on the total number of successes over the dimension whose marginals are fixed; but then we are in effect back to the Fisher Exact Test, whose power is a function of the odds-ratio alone.

I'm still with Duncan Murdoch, in that what's meant by "power" in this case depends very much on what you mean by "alternative hypothesis".

Best wishes to all,
Ted.



E-Mail: (Ted Harding) <ted.harding_at_nessie.mcc.ac.uk> Fax-to-email: +44 (0)870 094 0861
Date: 10-May-07                                       Time: 18:01:13
------------------------------ XFMail ------------------------------

______________________________________________
R-help_at_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 Thu 10 May 2007 - 17:11:12 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Thu 10 May 2007 - 17:31:33 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.