Re: [R] Power curves

From: Duncan Murdoch <murdoch_at_stats.uwo.ca>
Date: Mon, 14 Apr 2008 06:25:59 -0400

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



R-help_at_r-project.org 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 Mon 14 Apr 2008 - 10:31:54 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 Mon 14 Apr 2008 - 11:30:29 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.

list of date sections of archive