library(DGB)
Computes confidence interval for a difference in population means in a 2-group design.
Arguments: - alpha: alpha level for 1-alpha confidence - mj: sample mean in group j - sdj: sample standard deviation in group j - nj: sample size in group j
Values: - estimate, SE, df, lower limit, upper limit for both equal variance and unequal variance methods
alpha = .05 m1 = 34.2 sd1 = 5.712 n1 = 10 m2 = 41.5 sd2 = 6.451 n2 = 10 ci.mean.is(alpha, m1, m2, sd1, sd2, n1, n2)
Computes sample size required to estimate a population mean difference with desired precision in a 2-group design.
Arguments: - alpha: alpha level for 1-alpha confidence - var: planning value of average within-group DV variance - w: desired confidence interval width - r: desired n2/n1 ratio
Values: - required sample size per group (or n1 when r not equal to 1)
alpha = .05 var = 37.1 w = 5 r = 1 size.ci.mean.is(alpha, var, w, r)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.