[R] power 2x3 exact test
(Ted Harding)
ted.harding at nessie.mcc.ac.uk
Thu May 10 19:01:28 CEST 2007
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 ------------------------------
More information about the R-help
mailing list