Re: [R] power 2x3 exact test

From: Thomas Lumley <tlumley_at_u.washington.edu>
Date: Thu, 10 May 2007 08:07:10 -0700 (PDT)

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().

If this is a power calculation, though, you probably want to fix only one margin, which is a much simpler problem, and if the table is not too large it would not be difficult to compute the exact probability for each element of the sample space and so get exact power.

         -thomas

Thomas Lumley			Assoc. Professor, Biostatistics
tlumley_at_u.washington.edu	University of Washington, Seattle

______________________________________________
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 - 16:03:46 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.