[R] Power curves

Duncan Murdoch murdoch at stats.uwo.ca
Mon Apr 14 12:25:59 CEST 2008


Louisa Hay wrote:
>  
> Hi,
> I am trying to create a power curve to show how the power of a t-test varies depending on the mean. Any ideas how I should go about this?
> Louisa
The pt() function supports a non-centrality parameter, so you can do 
this calculation directly.

For other situations where the non-null distribution isn't easy to work 
with, there's always simulation.  Just simulate a large number of 
samples, and compute how many of them are rejected.

Duncan Murdoch



More information about the R-help mailing list