Re: [R] Power calculation with measurement error

From: Mike Lawrence <>
Date: Tue, 26 Jun 2007 15:38:45 -0300

On 26-Jun-07, at 2:36 PM, Mike Lawrence wrote:
> On 26-Jun-07, at 8:12 AM, Mike Lawrence wrote:
>> Hi all,
>> Hopefully this will be quick, I'm looking for pointers to packages/
>> functions that would allow me to calculate the power of a t.test when
>> the DV has measurement error. That is, I understand that, ceteris
>> paribus, experiments using measure with more error (lower
>> reliability) will have lower power.
> I came across a reference ( that
> provides a formula for calculating the noncentrality parameter for
> tests using imperfect measures (see Eq. 4), as well as a table of
> some resulting power estimates. However, while I have created a (very
> slow) monte carlo function that so far as I can tell matches their
> results, when I attempt to implement their analytic solution it's way
> off. Can anyone see what I'm doing incorrectly?
> n=100
> r=.5 #reliability
> e=.5 #effect size
> delta=(sqrt(r*n)/2)*e
> power.t.test(n,delta,sig.level=.05,alternative='one.sided')
> Two-sample t test power calculation
> n = 100
> delta = 1.767767
> sd = 1
> sig.level = 0.05
> power = 1
> alternative = one.sided
> NOTE: n is number in *each* group
> Meanwhile, their tables and my monte carlo method say that the power
> in that circumstance should be .7

Found it; I was using power.t.test without being thorough in reading its details. Sorry for the spam, and for anyone that's interested, here's the final analytic solution:

#get power for a t.test, incorporating measurement error.
#n = total number of participants across your 2 groups
#r = estimated reliability of the measure used
#e = measured effect size

} mailing list PLEASE do read the posting guide and provide commented, minimal, self-contained, reproducible code. Received on Tue 26 Jun 2007 - 18:53:33 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 Tue 26 Jun 2007 - 19:32:24 GMT.

Mailing list information is available at Please read the posting guide before posting to the list.