Skip to content

Power curves

1 message · Adaikalavan Ramasamy

#
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: