power.grid: Calculate the power of t-test with unequal variances

Description Usage Arguments Value

View source: R/plot.r

Description

Calculate the power of t-test with unequal variances

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
power.grid(
  n1 = 2:30,
  n2 = 2:30,
  mu1 = 0,
  mu2 = 1,
  sd1 = 1,
  sd2 = 1,
  alternative = c("two.sided", "less", "greater"),
  percent = 100,
  alpha = 0.05,
  power = 0.8,
  interpolate.sd2 = FALSE,
  ...
)

Arguments

n1

Vector of samples sizes for untreated, diseased group

n2

Vector of samples sizes for comparison group

mu1

Mean of outcome for untreated group

mu2

Mean of outcome for comparison group

sd1

Standard deviation of outcome for untreated group

sd2

Standard deviation of outcome for comparison group

alternative

String indicating one- or two sided test: "two.sided", "less" or "greater". Default "two.sided"

percent

vector indicating for which percentages of effect size the power curves should be calculated

alpha

Significance level of the test

power

Power of the test

interpolate.sd2

Should the sd2 parameter be interpolated along with percent?

...

Additional arguments passed to pwr.t2n.test()

Value

A data frame with rows corresponding to different designs


stefvanbuuren/RRR documentation built on Sept. 8, 2020, 12:11 a.m.