What do you mean by "power curves" ? Is it the power of a study as the effect size varies or power output of a machine with some other parameter ?
I usually generate a sequence of numbers (for the x-axis) that spans the range of interest and calculate its output. # Example 1 f <- function(x) sin(x) x <- seq(0, 10, by=0.01) y <- f(x) plot(x, y, type="l") Or you can call plot(f, xlim=c(0, 10) ) # Example 2 plot(2:100, power.t.test(2:100, delta=1, sd=1, sig.level=0.05)$power) Regards, Adai On Mon, 2004-11-15 at 01:19, Duncan Harris wrote: > How do I draw/calculate power curves in R? > > Cheers, > > Duncan. > > ______________________________________________ > [EMAIL PROTECTED] mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html ______________________________________________ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html