inst/snippet/power-t-test01d.R

pow <- function(effect) {
    power.t.test(delta=effect,n=50)$power
}
effect = seq(0,2,by=0.05)
plot <- xyplot(pow(effect) ~ effect, type='l',
    ylab="power", xlab="effect size",
    main="Power of a 2-sample test (n=50)")

Try the fastR package in your browser

Any scripts or data that you put into this service are public.

fastR documentation built on May 2, 2019, 5:53 p.m.