[Rd] power.t.test (PR#13891)

Michael Dewey info at aghmed.fsnet.co.uk
Sat Aug 15 14:42:56 CEST 2009


At 00:35 14/08/2009, michaell at unimelb.edu.au wrote:

>Full_Name: Michael J. Lew
>Version: R version 2.9.1 (2009-06-26)
>OS: OS X
>Submission from: (NULL) (210.49.195.149)
>
>
>The default function power.t.test gives inaccurate values, particularly with
>large sig.level.
>There are two reasons for me to propose that power.t.test is inaccurate:
>
>1. When sig.level approaches 1, so should the power. However,
>power.t.test('n'=5,'d'=1,'sig.level'=1) yields a power of 0.9430769. I've
>compared it to the equivalent function in the 'pwr' package, pwr.t.test, and
>while power.t.test gives a smooth function with respect to sig.level, it
>deivates systematically more and more as sig.level is increased.
>pwr.t.test('n'=5,'d'=1,'sig.level'=1) gives the correct power of 1.

I think you need to set strict=TRUE when your example gives a power of 1 here.


>2. I've run empirical simulations and found that the power predicted by
>pwr.t.test is correct and so it is clear that power.t.test is inaccurate.
>
>______________________________________________
>R-devel at r-project.org mailing list
>https://stat.ethz.ch/mailman/listinfo/r-devel

Michael Dewey
http://www.aghmed.fsnet.co.uk



More information about the R-devel mailing list