From p.dalgaard at biostat.ku.dk  Sat Aug 15 16:14:10 2009
From: p.dalgaard at biostat.ku.dk (Peter Dalgaard)
Date: Sat, 15 Aug 2009 16:14:10 +0200
Subject: [Rd] power.t.test (PR#13891)
In-Reply-To: <Zen-1McIbE-0002z8-1r@smarthost03.mail.zen.net.uk>
References: <20090813233514.62E9E282EF50@mail.pubhealth.ku.dk>
	<Zen-1McIbE-0002z8-1r@smarthost03.mail.zen.net.uk>
Message-ID: <4A86C2B2.2060401@biostat.ku.dk>

Michael Dewey wrote:
> 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.

Thanks. Yes. strict=TRUE was designed for people bothered by the 
behaviour as d approaches zero, but this is essentially the same issue. 
I do find it somewhat odd that people take Neyman-Pearson theory so 
literally that they insist on counting rejections with the opposite sign 
as the truth as "successes"...




-- 
    O__  ---- Peter Dalgaard             ?ster Farimagsgade 5, Entr.B
   c/ /'_ --- Dept. of Biostatistics     PO Box 2099, 1014 Cph. K
  (*) \(*) -- University of Copenhagen   Denmark      Ph:  (+45) 35327918
~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk)              FAX: (+45) 35327907



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